/*  booking.css
    ---------------------------------------------------------------------------
    Styling for the booking flow. Reuses the live site's warm-sand design tokens
    (defined in ../styles.css) so the flow feels native. This file owns only the
    booking-specific atoms; it inherits :root tokens from the main stylesheet.

    Full custom control of every input and label — the reason we built our own
    flow instead of embedding HubSpot's iframe. Restyle here freely; the engine
    never assumes a class beyond the `bk-` namespace it renders.
    ------------------------------------------------------------------------- */

.bk-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--s4) var(--s2);
  background: var(--paper);
  color: var(--ink);
}

/*  The engine renders every screen into #booking-root, the shell's grid item.
    A grid item defaults to min-width:auto, so it grows to its widest content
    (a card full of day tabs / time buttons) and blows past the viewport on
    phones — the page scrolls sideways. Pin it to the column: min-width:0 lets
    it shrink, width/max-width clamp it to the card size. The card then follows
    at width:100%. Fixes the whole flow, not just the slot picker.  */
#booking-root {
  min-width: 0;
  width: 100%;
  max-width: 560px;
}

.bk-card {
  width: 100%;
  max-width: 560px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.4);
  padding: var(--s5) var(--s4);
  box-shadow: 0 24px 60px -32px rgba(36, 31, 26, 0.35);
}

/*  Entrance — gentle, matches the site's reveal feel.  */
[data-bk-anim] { animation: bk-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes bk-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  [data-bk-anim] { animation: none; }
}

/*  ── Type ───────────────────────────────────────────────────────────────  */

.bk-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent-ink);
  margin: 0 0 var(--s2);
}

.bk-title    { font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.1; margin: 0 0 var(--s2); }
.bk-question { font-size: clamp(1.35rem, 4vw, 1.7rem); line-height: 1.2; margin: 0 0 var(--s1); }
.bk-body     { color: var(--ink-soft); line-height: 1.6; margin: 0 0 var(--s3); }
.bk-help     { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 var(--s3); }

.bk-fineprint {
  margin: var(--s3) 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.bk-fineprint a { color: var(--accent-ink); text-underline-offset: 3px; }

/*  ── Progress ───────────────────────────────────────────────────────────  */

.bk-progress { margin: 0 0 var(--s4); }

.bk-progress-bar {
  height: 5px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.bk-progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.bk-progress-label {
  margin: var(--s1) 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/*  ── Options (choice + boolean) ─────────────────────────────────────────  */

.bk-options { display: grid; gap: var(--s1); }
.bk-options--row { grid-template-columns: 1fr 1fr; gap: var(--s2); }

.bk-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  width: 100%;
  padding: var(--s2) var(--s3);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}
.bk-option:hover  { border-color: var(--accent); }
.bk-option:active { transform: scale(0.99); }

.bk-option.is-on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--paper));
  box-shadow: inset 0 0 0 1px var(--accent);
}

.bk-option--inline { align-items: center; justify-content: center; text-align: center; }

.bk-option-label { font-weight: 600; font-size: 1.02rem; }
.bk-option-note  { font-size: 0.85rem; color: var(--ink-soft); }

/*  ── Fields ─────────────────────────────────────────────────────────────  */

.bk-field { display: block; margin: 0 0 var(--s3); }

.bk-field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.bk-field input,
.bk-field textarea {
  width: 100%;
  padding: var(--s2);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.bk-field input:focus,
.bk-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.bk-field textarea { resize: vertical; min-height: 84px; }

/*  ── Buttons ────────────────────────────────────────────────────────────  */

.bk-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s4);
}

.bk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--s2) var(--s3);
  border-radius: 99px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s, opacity 0.18s, background 0.18s;
}
.bk-btn:active { transform: scale(0.98); }
.bk-btn[disabled] { opacity: 0.6; cursor: progress; }

.bk-btn--primary { background: var(--accent); color: var(--paper-bright); }
.bk-btn--primary:hover { background: var(--accent-ink); }

.bk-btn--ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.bk-btn--ghost:hover { color: var(--ink); border-color: var(--ink-soft); }

.bk-arrow { transition: transform 0.18s; }
.bk-btn--primary:hover .bk-arrow { transform: translateX(3px); }

/*  Intro start button isn't in a nav row — give it room.  */
.bk-intro .bk-btn--primary { margin-top: var(--s2); }

/*  ── Summary / review ───────────────────────────────────────────────────  */

.bk-summary { list-style: none; margin: 0 0 var(--s2); padding: 0; }
.bk-summary li {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line);
}
.bk-summary li span   { color: var(--ink-soft); }
.bk-summary li strong { text-align: right; }

/*  ── Done ───────────────────────────────────────────────────────────────  */

.bk-done { text-align: center; }
.bk-check {
  width: 56px; height: 56px;
  margin: 0 auto var(--s3);
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, var(--paper));
  color: var(--accent-ink);
  font-size: 1.7rem; font-weight: 700;
}

/*  ── Slot picker (live Square availability) ─────────────────────────────  */

.bk-slots-loading {
  padding: var(--s4) 0;
  text-align: center;
  color: var(--ink-soft);
}

/*  Day tabs — horizontal scroll on mobile so a two-week window never wraps
    into a cramped grid; the active day reads clearly.  */
.bk-days {
  display: flex;
  gap: var(--s1);
  overflow-x: auto;
  padding-bottom: var(--s1);
  margin: 0 0 var(--s3);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.bk-day {
  flex: 0 0 auto;
  padding: var(--s1) var(--s2);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.bk-day:hover  { border-color: var(--accent); }
.bk-day.is-on  { border-color: var(--accent); background: var(--accent); color: var(--paper-bright); }

/*  Time grid — auto-fills as many columns as fit; 2-up on phones, more on
    wider screens, with comfortable tap targets.  */
.bk-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--s1);
}
.bk-slot {
  padding: var(--s2) var(--s1);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}
.bk-slot:hover  { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.bk-slot:active { transform: scale(0.97); }

/*  ── Errors ─────────────────────────────────────────────────────────────  */

.bk-error {
  display: block;
  min-height: 1.1em;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #b3402f;
}
.bk-error--global { text-align: center; margin-top: var(--s2); }

@media (prefers-color-scheme: dark) {
  .bk-error { color: #e89a8c; }
}
