/* ============================================================
   Demo booking flow. Loaded only on book.html, after styles.css,
   and built entirely on the site's own tokens (--bg, --surface, --ink,
   --muted, --accent, --accent-dark, --accent-soft, --warm, --line,
   --radius, --font-display, --ease).
   ============================================================ */
.bk { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.bk-main { min-width: 0; }
.bk-stepper { list-style: none; display: flex; gap: clamp(10px, 2vw, 22px); padding: 0; margin: 0 0 22px; }
.bk-step { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.bk-step-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 0.8rem; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.bk-step.is-current { color: var(--ink); }
.bk-step.is-current .bk-step-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.bk-step.is-done { color: var(--accent-dark); cursor: pointer; padding: 9px; margin: -9px; }
.bk-step.is-done .bk-step-n { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-dark); }
.bk-step.is-done:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.bk-step + .bk-step::before { content: ""; width: 18px; height: 1px; background: var(--line); margin-right: 4px; }
@media (max-width: 599px) { .bk-step-name { display: none; } .bk-step.is-current .bk-step-name { display: inline; } }

.bk-live { min-height: 1.4em; margin: 0 0 6px; color: var(--accent-dark); font-weight: 600; font-size: 0.95rem; }
.bk-panels { position: relative; }
.bk-panels.nudge { animation: bkNudge 0.4s var(--ease, ease); }
@keyframes bkNudge { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.bk-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 16px); padding: clamp(20px, 3vw, 32px); transition: opacity 0.35s var(--ease, ease), transform 0.35s var(--ease, ease); }
.bk-panel.is-entering { opacity: 0; transform: translateY(10px); }
.bk-q { font-family: var(--font-display, inherit); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; margin: 0; outline: none; }
.bk-help { color: var(--muted); margin: 8px 0 0; max-width: 56ch; }
.bk-sub { font-size: 1rem; margin: 26px 0 10px; }
.bk-note, .bk-sum-note { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; }
.bk-empty { color: var(--muted); padding: 14px 0; }

/* choices are real radios: the input is visually hidden, the label is the control */
.bk-radio { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.bk-choices { display: grid; gap: 10px; margin-top: 18px; }
.bk-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-choice { position: relative; display: block; cursor: pointer; border: 1.5px solid var(--field-line, var(--line)); border-radius: 12px; padding: 14px 16px; background: var(--bg); transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.bk-choice:hover { border-color: var(--accent); }
.bk-choice:active { transform: scale(0.99); }
.bk-choice:has(.bk-radio:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.bk-choice:has(.bk-radio:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.bk-choice:has(.bk-radio:disabled) { cursor: not-allowed; color: var(--muted); text-decoration: line-through; }
.bk-choice.is-day:has(.bk-radio:disabled) { text-decoration: none; }
.bk-choice-body { display: grid; gap: 3px; }
.bk-choice-title { font-weight: 600; }
.bk-choice-meta { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.bk-choice-sub { color: var(--muted); font-size: 0.86rem; }
.bk-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.bk-choice.is-pill { padding: 9px 14px; border-radius: 999px; }
.bk-choice.is-pill .bk-choice-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.bk-choice.is-pill .bk-choice-title { white-space: nowrap; }
.bk-choice.is-pill .bk-choice-meta { font-size: 0.8rem; }
.bk-inline { margin-top: 6px; }

.bk-days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-top: 18px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bk-choice.is-day { flex: none; width: 66px; text-align: center; padding: 10px 6px; scroll-snap-align: start; }
.bk-choice.is-day .bk-choice-body { gap: 0; }
.bk-day-dow { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bk-day-num { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.bk-day-mon { font-size: 0.74rem; color: var(--muted); }
.bk-choice.is-day.is-off { color: var(--muted); }
.bk-day-state { font-size: 0.75rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.bk-choice.is-day { width: 74px; }
.bk-choice.is-slot .bk-tag { margin-left: 6px; }
.bk-choice.is-day .bk-tag { margin: 4px 0 0; }
.bk-slots .bk-group { margin-top: 12px; }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.bk-choice.is-slot { text-align: center; padding: 11px 8px; font-variant-numeric: tabular-nums; }
.bk-choice.is-taken { background: transparent; }

.bk-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 18px; }
.bk-field { display: grid; gap: 6px; }
.bk-field.is-wide { grid-column: 1 / -1; }
.bk-field label { font-weight: 600; font-size: 0.95rem; }
.bk-field label small { color: var(--muted); font-weight: 400; }
.bk-field input, .bk-field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--field-line, var(--line)); border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; }
.bk-field input:focus, .bk-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bk-field.is-error input, .bk-field.is-error textarea { border-color: var(--error, #b42318); }
.bk-error { color: var(--error, #b42318); font-size: 0.88rem; margin: 0; }
.bk-error[hidden] { display: none; }

.bk-policy { grid-column: 1 / -1; margin: 6px 0 0; }
.bk-form .bk-note { grid-column: 1 / -1; margin: 0; }
.bk-nav { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); grid-column: 1 / -1; }
.bk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.12s; }
.bk-btn:active { transform: scale(0.97); }
.bk-next { background: var(--accent); color: #fff; margin-left: auto; }
.bk-next:hover { background: var(--accent-dark); }
.bk-next:disabled { opacity: 0.7; cursor: wait; }
.bk-back { background: transparent; color: var(--accent-dark); border-color: var(--line); }
.bk-back:hover { border-color: var(--accent); }
.bk-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* the live summary is the clinic's plan card: warm paper, ruled */
.bk-summary { position: sticky; top: calc(var(--ark-bar-h, 36px) + var(--header-h, 64px) + 16px); background: var(--warm, var(--surface)); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius, 16px); padding: clamp(18px, 2vw, 24px); }
.bk-summary .bk-sum div { border-top-color: rgba(27, 36, 48, 0.14); }
.bk-sum-title { margin: 0 0 8px; font-size: 1rem; }
.bk-sum { margin: 0; display: grid; }
.bk-sum div { display: grid; grid-template-columns: 86px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.94rem; }
.bk-sum dt { color: var(--muted); }
.bk-sum dd { margin: 0; font-weight: 600; transition: color 0.3s; }
.bk-sum-sub { display: block; font-weight: 400; font-size: 0.85em; color: var(--muted); margin-top: 2px; }
.bk-sum div.is-empty dd { color: var(--muted); font-weight: 400; }

.bk-done { text-align: left; }
.bk-tick { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 999px; background: var(--accent); color: #fff; margin-bottom: 14px; }
.bk-tick svg { width: 26px; height: 26px; }
.bk-tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: bkTick 0.5s var(--ease, ease) 0.2s forwards; }
@keyframes bkTick { to { stroke-dashoffset: 0; } }
.bk-done .bk-sum { margin-top: 18px; }
.bk-demo { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--warm, var(--accent-soft)); font-weight: 600; font-size: 0.95rem; }
.bk.is-done .bk-summary { display: none; }
.bk.is-done .bk-stepper { display: none; }

@media (max-width: 899px) {
  .bk { grid-template-columns: 1fr; }
  .bk-summary { position: static; order: 2; }
  .bk-services { grid-template-columns: 1fr; }
  .bk-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-panel, .bk-panels.nudge { transition: none; animation: none; }
  .bk-panel.is-entering { opacity: 1; transform: none; }
  .bk-tick path { animation: none; stroke-dashoffset: 0; }
}

/* service groups, tags, and the visits arranged by phone */
.bk-group { grid-column: 1 / -1; margin: 10px 0 -2px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bk-group:first-child { margin-top: 0; }
.bk-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--warm, var(--accent-soft)); color: var(--ink); font-style: normal; font-size: 0.72rem; font-weight: 600; vertical-align: middle; }
.bk-phone-only { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.bk-phone-row { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; }
.bk-tel { margin-top: 10px; }
