/* The Home1st waitlist form (site.js builds it inside [data-waitlist]), from the design previews' shared form.
   Everything is scoped to .h1w. Themed from style.css through the custom properties listed in site.js; layout
   through data-layout="stack|grid" on the host. Inputs are 50 px tall with 17 px text (no iOS zoom); the button is
   54 px. */
.h1w {
  --_accent: var(--h1-accent, #a1251d); --_accent-ink: var(--h1-accent-ink, #fff);
  --_bg: var(--h1-field-bg, #fff); --_bd: var(--h1-field-border, #6b757c); --_r: var(--h1-radius, 8px);
  --_err: var(--h1-error, #b42318); --_ink: var(--h1-ink, #1f1f1f); --_muted: var(--h1-muted, #4d555b);
  --_focus: var(--h1-focus, #126f91); --_gap: var(--h1-gap, 18px);
  display: block; width: 100%; min-width: 0; box-sizing: border-box;
  container: h1w / inline-size;
  font-family: var(--h1-font, inherit); color: var(--_ink); font-size: 16px; line-height: 1.45;
  text-align: left; letter-spacing: normal; text-transform: none;
}
.h1w *, .h1w *::before, .h1w *::after { box-sizing: border-box; }
.h1w p { margin: 0; max-width: none; }
.h1w [hidden] { display: none !important; }

.h1w-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--_gap) 14px; align-items: start; }
.h1w-field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.h1w-field { min-inline-size: 0; }
.h1w-label {
  display: block; float: none; width: auto; margin: 0 0 6px; padding: 0;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--_ink);
}
.h1w-in .h1w-label { font-weight: 400; }
.h1w-opt { font-weight: 400; color: var(--_muted); }

.h1w-input {
  display: block; width: 100%; min-height: 50px; margin: 0; padding: 10px 14px;
  font: 400 17px/1.3 var(--h1-font, inherit); color: var(--_ink);
  background: var(--_bg); border: 1.5px solid var(--_bd); border-radius: var(--_r);
  box-shadow: none; -webkit-appearance: none; appearance: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.h1w-input::placeholder { color: #737b81; opacity: 1; }
.h1w-input:hover { border-color: var(--_ink); }
.h1w-input:focus { outline: none; border-color: var(--_focus); box-shadow: 0 0 0 3px var(--_bg), 0 0 0 6px var(--_focus); }
.h1w-input[aria-invalid="true"] { border: 2px solid var(--_err); padding: 9.5px 13.5px; }
.h1w-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--_bg), 0 0 0 6px var(--_err); }

.h1w-select { position: relative; }
.h1w-select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; margin-top: -7px; pointer-events: none;
  border-right: 2px solid var(--_ink); border-bottom: 2px solid var(--_ink); transform: rotate(45deg);
}
.h1w-select select { padding-right: 44px; cursor: pointer; }
.h1w-select select:invalid { color: var(--_muted); }
.h1w-select select option { color: #1f1f1f; }

/* date of birth: Month, Day, Year with their labels under the boxes so the boxes line up with a paired field */
.h1w-dob { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 10px; max-width: 340px; }
.h1w-dob .h1w-input { text-align: left; font-variant-numeric: tabular-nums; }
.h1w-sub { display: block; margin: 4px 0 0 2px; font-size: 14.5px; line-height: 1.3; color: var(--_muted); }

.h1w-addr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 14px; }
.h1w-f-state { grid-column: 1 / span 2; }
.h1w-f-zip { grid-column: 3 / -1; }
.h1w-f-state .h1w-input { text-transform: uppercase; }

.h1w-err {
  display: flex; align-items: flex-start; gap: 7px; margin: 7px 0 0 !important;
  font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--_err);
}
.h1w-err svg { flex: none; margin-top: 1px; }

.h1w-submit {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; margin: calc(var(--_gap) + 6px) 0 0;
  padding: 12px 20px; border: 0; border-radius: var(--_r); cursor: pointer;
  font: 700 18px/1.2 var(--h1-font, inherit); letter-spacing: .005em; color: var(--_accent-ink); background: var(--_accent);
  transition: filter .12s ease, transform .06s ease;
}
.h1w-submit:hover { filter: brightness(.9); }
.h1w-submit:active { transform: translateY(1px); }
.h1w-submit:focus-visible { outline: 3px solid var(--_focus); outline-offset: 3px; }
.h1w-call { margin-top: 12px !important; font-size: 15px; color: var(--_muted); }
.h1w-call a { display: inline-block; padding: 12px 0; margin: -12px 0; color: var(--_ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.h1w-call a:focus-visible, .h1w-again:focus-visible { outline: 3px solid var(--_focus); outline-offset: 2px; border-radius: 3px; }

/* sending: the button waits; the status line under it carries errors and notices (role=status) */
.h1w-submit[disabled] { cursor: progress; filter: saturate(.6) brightness(1.05); }
.h1w-status { margin-top: 14px !important; padding: 12px 14px; border-radius: var(--_r); font-size: 15.5px; line-height: 1.45; outline: none; }
.h1w-status[data-tone="error"] { background: #fdf0ee; color: #8a1c13; border: 1.5px solid #f0c2bc; }
.h1w-status[data-tone="note"] { background: #eef5f8; color: var(--_ink); border: 1.5px solid #d3e4eb; }
.h1w-status a { color: inherit; font-weight: 700; white-space: nowrap; }
.h1w-privacy { margin-top: 6px !important; font-size: 14px; color: var(--_muted); }
/* the hidden field simple bots fill in */
.h1w-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* the success panel */
.h1w-done {
  padding: 28px 24px 22px; border-radius: calc(var(--_r) + 4px); background: var(--h1-done-bg, #eef5f8);
  color: var(--_ink); outline: none;
}
.h1w-done:focus-visible { outline: 3px solid var(--_focus); outline-offset: 3px; }
.h1w-done-icon { display: block; color: var(--h1-done-accent, #126f91); margin-bottom: 12px; }
.h1w-done-icon svg { display: block; }
.h1w-done-title { font-size: 23px; font-weight: 700; line-height: 1.25; margin-bottom: 8px !important; }
.h1w-done-text { font-size: 16px; line-height: 1.55; color: var(--_ink); max-width: 46ch !important; }
.h1w-again {
  display: inline-flex; align-items: center; min-height: 44px; margin: 10px 0 0 -2px; padding: 0 2px;
  background: none; border: 0; cursor: pointer; font: 700 16px/1.2 var(--h1-font, inherit);
  color: var(--h1-done-accent, #126f91); text-decoration: underline; text-underline-offset: 3px;
}

/* wider forms */
@container h1w (min-width: 448px) {
  .h1w-f-first, .h1w-f-last { grid-column: span 3; }
  .h1w-f-city { grid-column: 1 / span 3; }
  .h1w-f-state { grid-column: 4 / span 1; }
  .h1w-f-zip { grid-column: 5 / -1; }
}
@container h1w (min-width: 512px) {
  .h1w[data-layout="grid"] .h1w-f-insurance, .h1w[data-layout="grid"] .h1w-f-dob,
  .h1w[data-layout="grid"] .h1w-f-phone, .h1w[data-layout="grid"] .h1w-f-email { grid-column: span 3; }
  .h1w[data-layout="grid"] .h1w-f-street { grid-column: 1 / span 4; }
  .h1w[data-layout="grid"] .h1w-f-apt { grid-column: 5 / -1; }
  .h1w[data-layout="grid"] .h1w-dob { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .h1w-input, .h1w-submit { transition: none; } }
@media (forced-colors: active) { .h1w-select::after { border-color: CanvasText; } .h1w-submit { border: 2px solid ButtonText; } }
