/* ════════════════════════════════════════════════════════════════
   STEPPED LEAD FORM — scoped styles (namespace: .lf / .lf__*).
   Self-contained & removable: delete this file + lead-stepped.html +
   lead-stepped.js. Reuses the site's design tokens from styles.css
   (--sage, --ink, --bg-alt, etc.) but defines no global selectors.
   ════════════════════════════════════════════════════════════════ */

.lf {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 30rem;
}
.lf[hidden] { display: none; }

/* intro heading — restores a "you're booking a free consult" header, mirroring
   the book-widget's head copy + sizing; sits above the step-progress row. */
.lf__intro { margin-bottom: 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.lf__title { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.lf__intro-sub { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.3rem; }

/* progress header */
.lf__head {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.lf__back {
  width: 32px; height: 32px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 1.1rem; line-height: 1;
}
.lf__back[hidden] { display: none; }
.lf__back:hover { border-color: var(--sage); color: var(--sage-deep); }
.lf__progress { display: flex; gap: 0.4rem; margin-inline-end: auto; }
.lf__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--line); transition: background 160ms ease, transform 160ms ease;
}
.lf__dot.is-done { background: var(--sage-soft); }
.lf__dot.is-current { background: var(--sage); transform: scale(1.25); }
.lf__count { font-size: 0.82rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* steps */
.lf__step { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.lf__step:not(.is-active) { display: none; }
.lf__step.is-active { display: block; animation: lf-in 120ms ease-out; }
@keyframes lf-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lf__step.is-active { animation: none; } }

.lf__q {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.25rem, 1vw + 1.05rem, 1.5rem);
  line-height: 1.2; color: var(--ink);
  padding: 0; margin: 0 0 1.1rem; float: none;
}
.lf__sub { font-size: 0.9rem; color: var(--ink-soft); margin: -0.5rem 0 1rem; }

/* chip choices (auto-advance) */
.lf__chips { display: flex; flex-direction: column; gap: 0.6rem; }
/* Reassurance inline with the insurance question — a soft sub-note, not its own line. */
.lf__rates-note { font-size: 0.9rem; font-weight: 400; color: var(--sage-deep); white-space: nowrap; }
.lf__chip {
  display: block; width: 100%; text-align: left;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  font-size: 1rem;   /* no transition — instant hover/select (chips auto-advance on tap) */
}
.lf__chip:hover { border-color: var(--sage); background: var(--bg-alt); }
.lf__chip:active { transform: translateY(1px); }
.lf__chip[aria-pressed="true"] { border-color: var(--sage); background: var(--sage-soft); }

/* text fields */
.lf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 380px) { .lf__row { grid-template-columns: 1fr; } }
.lf__field { margin-bottom: 0.85rem; }
.lf__label { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.lf__input {
  width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font-size: 1rem;
}
.lf__input:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
.lf__input[aria-invalid="true"] { border-color: var(--clay-deep); box-shadow: 0 0 0 3px var(--clay-soft); }

/* slots */
.lf__slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
@media (min-width: 420px) { .lf__slots { grid-template-columns: repeat(3, 1fr); } }
.lf__slot {
  padding: 0.6rem 0.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font-size: 0.86rem; line-height: 1.25; text-align: center;
}
.lf__slot:hover { border-color: var(--sage); }
.lf__slot[aria-pressed="true"] { border-color: var(--sage); background: var(--sage-soft); }
.lf__slot small { display: block; color: var(--ink-mute); font-size: 0.74rem; }
.lf__slots-empty { grid-column: 1 / -1; margin: 0; color: var(--ink-mute); font-size: 0.85rem; line-height: 1.45; }
.lf__slots-empty a { color: var(--ink); font-weight: 600; white-space: nowrap; }
/* Friendly green "you're booked" banner (sage = positive). The "Already booked" card
   styling lives in styles.css — shared .is-booked / .slot-booked. */
.lf__prior-note {
  margin: 0 0 0.85rem; padding: 0.7rem 0.85rem;
  background: var(--sage-soft); color: var(--sage-deep);
  border-radius: var(--radius-sm); font-size: 0.85rem; line-height: 1.45;
}
/* Skeleton pills — only shown if availability is slow (>220ms). Reuses fp-slot-shimmer
   from styles.css (loaded sitewide). */
.lf__slot--skeleton {
  min-height: 3rem; border-color: var(--line-soft);
  background: linear-gradient(100deg, var(--line-soft) 30%, var(--bg-alt) 50%, var(--line-soft) 70%);
  background-size: 300% 100%; animation: fp-slot-shimmer 1.3s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .lf__slot--skeleton { animation: none; } }
.lf__more { display: inline-block; font-size: 0.85rem; margin-bottom: 1rem; color: var(--sage-deep); }

/* Day picker: a scrollable row of day chips above the slot grid (matches the widget). */
.lf__days {
  display: flex; gap: 0.4rem; overflow-x: auto; margin-bottom: 0.7rem;
  padding-bottom: 0.3rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.lf__day {
  flex: 0 0 auto; padding: 0.45rem 0.7rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--ink);
  font-size: 0.82rem; font-weight: 500; line-height: 1.2; text-align: center; white-space: nowrap;
}
.lf__day small { display: block; color: var(--ink-mute); font-size: 0.72rem; font-weight: 400; }
.lf__day:hover { border-color: var(--sage); }
.lf__day[aria-pressed="true"] { border-color: var(--sage); background: var(--sage-soft); color: var(--sage-deep); }
.lf__day[aria-pressed="true"] small { color: var(--sage-deep); }
/* Next-week group: just a soft hairline divider before the next-calendar-week chips (no label). */
.lf__days-next {
  display: inline-flex; gap: 0.4rem; align-items: stretch;
  margin-left: 0.15rem; padding-left: 0.6rem; border-left: 1px solid var(--line-soft);
}

/* shared action button (Continue / submit) */
.lf__actions { margin-top: 1.1rem; }
.lf__action {
  display: flex; width: 100%; align-items: center; justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px; background: var(--sage); color: #fff;
  border: 1px solid var(--sage); font-weight: 500; font-size: 1rem;
  transition: background 140ms ease;
}
.lf__action[hidden] { display: none; }
.lf__action:hover { background: var(--sage-deep); border-color: var(--sage-deep); }
.lf__foot { font-size: 0.78rem; color: var(--ink-mute); text-align: center; margin-top: 0.75rem; }
.lf__foot[hidden] { display: none; }
/* Failure panel — replaces the collapsed form (mirrors .lf__success, clay tone). */
.lf__error-panel { font-size: 0.98rem; line-height: 1.55; color: var(--clay-deep); }
.lf__error-panel[hidden] { display: none; }
.lf__error-panel a { color: var(--clay-deep); text-decoration: underline; font-variant-numeric: tabular-nums; }
.lf-error__headline { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--clay-deep); }

/* success */
.lf__success { font-size: 0.98rem; line-height: 1.55; }
.lf__success[hidden] { display: none; }
.lf-success__headline { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.5rem; }
.lf-success__crisis { font-size: 0.82rem; color: var(--ink-soft); margin-top: 1rem; }
