/* Booking flow v5 (placeholder demo, nothing is sent). Colours and type from css/tokens.css only. */
.bk { --bk-line: rgba(var(--brand-rgb), .18); --bk-soft: rgba(var(--brand-rgb), .06); --bk-muted: rgba(var(--brand-rgb), .72);
  --bk-r: 14px; --bk-tap: 48px; --bk-sticky: var(--bk-top, calc(var(--bar) + 16px));
  max-width: var(--c); margin: 0 auto var(--gap); padding: 0 var(--pad); font: 400 var(--t-body)/var(--lh-body) var(--f); color: var(--brand); }
.bk *, .bk *::before, .bk *::after { box-sizing: border-box; }
.bk-top .h1 { margin-bottom: 20px; }
.bk-intro { text-align: center; margin: 0 auto 40px; max-width: var(--c-col); }
.bk-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.bk button { font: inherit; color: inherit; cursor: pointer; }
.bk button:disabled { cursor: default; }
.bk a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bk :focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.bk-h:focus { outline: none; }

/* layout: card left, sticky summary right */
.bk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.bk-card { grid-column: 1; grid-row: 1; background: var(--white); border-radius: var(--bk-r); padding: 40px 48px 48px; box-shadow: 0 10px 40px rgba(var(--brand-rgb), .08); min-height: 520px; min-width: 0; }
.bk-sum { grid-column: 2; grid-row: 1; position: sticky; top: var(--bk-sticky); background: var(--brand); color: var(--white); border-radius: var(--bk-r); padding: 28px 28px 30px; }
.bk-sum-h { font-weight: 700; font-size: var(--t-mh); line-height: var(--lh-mh); margin: 0 0 16px; }
.bk-sum-l { margin: 0 0 24px; display: grid; gap: 14px; }
.bk-sum-l div { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.22); }
.bk-sum-l dt { font-size: 18px; line-height: 24px; opacity: .8; }
.bk-sum-l dd { margin: 0; font-weight: 700; }
.bk-sum-l dd.is-open { font-weight: 400; opacity: .8; }
.bk-sum-bar { display: none; }
.bk-sum-f { font-size: 18px; line-height: 27px; margin: 0; }
.bk-sum-f a { color: var(--white); }
.is-done .bk-grid { grid-template-columns: minmax(0, 760px); justify-content: center; }
.is-done .bk-sum { display: none; }

/* progress */
.bk-prog { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bk-pi { width: 100%; min-height: var(--bk-tap); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 0 6px; border: 0; background: none; text-align: left; }
.bk-pi::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--bk-line); transition: background .3s var(--ease); }
.bk-pn { display: none; }
.bk-pl { font-size: 18px; line-height: 22px; color: var(--bk-muted); }
.bk-prog li.is-done .bk-pi::before, .bk-prog li.is-cur .bk-pi::before { background: var(--brand); }
.bk-prog li.is-cur .bk-pl { color: var(--brand); font-weight: 700; }
.bk-prog li.is-done .bk-pi:not(:disabled) .bk-pl { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.is-wait .bk-prog, .is-done .bk-prog { display: none; }

/* steps */
.bk-step[hidden] { display: none; }
.bk-step.is-in { animation: bk-in .35s var(--ease) both; }
@keyframes bk-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bk-h { font-size: var(--t-h2); line-height: var(--lh-h2); font-weight: 700; margin: 0 0 8px; }
.bk-hint { color: var(--bk-muted); margin: 0 0 24px; }
.bk-back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--bk-tap); padding: 0 12px 0 0; margin: -8px 0 8px; border: 0; background: none; font-size: 18px; }
.bk-back svg { width: 22px; height: 22px; }
.bk-back:hover span { text-decoration: underline; text-underline-offset: 4px; }

/* buttons */
.bk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 32px; border: 2px solid var(--brand); border-radius: 999px;
  background: var(--brand); color: var(--white) !important; font-weight: 700 !important; letter-spacing: .3px; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.bk-btn:hover { background: var(--white); color: var(--brand) !important; }
.bk-btn:disabled { opacity: .4; pointer-events: none; }
.bk-ghost { background: transparent; color: var(--brand) !important; }
.bk-ghost:hover { background: var(--bk-soft); }

/* step 1: date chips */
.bk-dates { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 4px 16px; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: var(--bk-line) transparent; }
.bk-chip { flex: 0 0 auto; scroll-snap-align: start; width: 96px; min-height: 112px; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 10px 6px;
  border: 1.5px solid var(--bk-line); border-radius: 12px; background: var(--white); transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
.bk-chip .d1 { font-size: 18px; line-height: 22px; }
.bk-chip .d2 { font-size: 32px; line-height: 38px; font-weight: 700; }
.bk-chip .d3 { font-size: 18px; line-height: 22px; color: var(--bk-muted); }
.bk-chip:hover:not(:disabled) { border-color: var(--brand); }
.bk-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--white); }
.bk-chip[aria-pressed="true"] .d3 { color: var(--white); }
.bk-chip:disabled { opacity: .4; text-decoration: line-through; }

/* step 2: persons stepper */
.bk-stepper { display: flex; align-items: center; gap: 28px; margin: 24px 0 28px; }
.bk-sb { width: 64px; height: 64px; display: grid; place-items: center; border: 1.5px solid var(--brand); border-radius: 50%; background: var(--white); transition: background .2s var(--ease), color .2s var(--ease); }
.bk-sb svg { width: 26px; height: 26px; }
.bk-sb:hover:not(:disabled) { background: var(--brand); color: var(--white); }
.bk-sb:disabled { opacity: .35; }
.bk-pv { margin: 0; min-width: 120px; display: grid; justify-items: center; }
.bk-pv output { font-size: 56px; line-height: 60px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bk-pv span { font-size: 18px; color: var(--bk-muted); }
.bk-group { background: var(--bk-soft); border-radius: 12px; padding: 16px 20px; margin: 0 0 28px; }
.bk-group a { font-weight: 700; display: inline-flex; align-items: center; min-height: var(--bk-tap); }

/* step 3: time slots */
.bk-slot-g { margin: 0 0 24px; }
.bk-slot-g h3 { font-size: var(--t-mh); line-height: var(--lh-mh); font-weight: 700; margin: 0 0 12px; }
.bk-slot-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.bk-slot { min-height: 56px; display: grid; place-items: center; align-content: center; padding: 6px 4px; border: 1.5px solid var(--bk-line); border-radius: 10px; background: var(--white);
  font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
.bk-slot:hover:not(:disabled) { border-color: var(--brand); }
.bk-slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--white); }
.bk-slot:disabled { background: var(--bk-soft); border-color: transparent; color: var(--bk-muted); font-weight: 400; }
.bk-slot:disabled .t { text-decoration: line-through; }
.bk-slot small { font-size: 18px; line-height: 20px; font-weight: 400; }

/* step 4: form (no entrance stagger on fields; focus never resizes) */
.bk-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 16px; }
.bk-full { grid-column: 1 / -1; }
.bk-field label { display: block; font-size: 18px; line-height: 24px; font-weight: 700; margin-bottom: 6px; }
.bk-field input:not([type="checkbox"]), .bk-field textarea { width: 100%; min-height: 56px; padding: 13px 16px; border: 1.5px solid var(--bk-line); border-radius: 10px;
  background: var(--white); color: var(--brand); font: 400 var(--t-body)/28px var(--f); transition: border-color .2s var(--ease); }
.bk-field textarea { resize: vertical; min-height: 104px; }
.bk-field input:focus, .bk-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18); }
.bk-field input[aria-invalid="true"] { border-color: #a4262c; }
.bk-err { color: #a4262c; font-size: 18px; line-height: 24px; margin: 6px 0 0; }
.bk-chk label { display: flex; gap: 14px; align-items: flex-start; font-weight: 400; font-size: var(--t-body); line-height: var(--lh-body); cursor: pointer; min-height: var(--bk-tap); }
.bk-chk input { flex: 0 0 auto; width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--brand); }
.bk-form .bk-btn { justify-self: start; margin-top: 8px; }

/* wait */
.bk-wait { display: grid; justify-items: center; text-align: center; padding: 80px 0; }
.bk-spin { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--bk-line); border-top-color: var(--brand); margin-bottom: 24px; animation: bk-rot .8s linear infinite; }
@keyframes bk-rot { to { transform: rotate(360deg); } }

/* done */
.bk-done { text-align: center; }
.bk-check { width: 76px; height: 76px; margin: 8px auto 20px; display: block; color: var(--brand); }
.bk-check circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: bk-draw .6s var(--ease) forwards; }
.bk-check path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: bk-draw .4s .45s var(--ease) forwards; }
@keyframes bk-draw { to { stroke-dashoffset: 0; } }
.bk-thanks { margin: 0 0 28px; }
.bk-ticket { text-align: left; border: 1.5px solid var(--bk-line); border-radius: var(--bk-r); background: var(--cream); padding: 24px 28px; margin: 0 0 24px; animation: bk-pop .5s .25s var(--ease) both; }
@keyframes bk-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.bk-num { margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1.5px dashed var(--bk-line); }
.bk-num strong { font-size: 28px; letter-spacing: 1px; margin-left: 6px; }
.bk-ticket dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.bk-ticket dt { font-size: 18px; line-height: 24px; color: var(--bk-muted); }
.bk-ticket dd { margin: 0; font-weight: 700; }
.bk-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

/* phone: summary becomes a compact sticky bar above the card */
@media (max-width: 900px) {
  .bk { padding: 0 16px; }
  .bk-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bk-card, .bk-sum { grid-column: 1; }
  .bk-sum { grid-row: 1; top: var(--bk-top, var(--bar)); z-index: 5; padding: 0 18px; min-height: 56px; display: flex; align-items: center; border-radius: 12px; box-shadow: 0 6px 20px rgba(var(--brand-rgb), .25); }
  .bk-card { grid-row: 2; padding: 24px 20px 32px; min-height: 0; }
  .bk-sum-h, .bk-sum-l, .bk-sum-f { display: none; }
  .bk-sum-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; }
  .bk-sum-bar .is-open { font-weight: 400; opacity: .75; }
  .bk-dot { opacity: .6; }
  .bk-prog { margin-bottom: 20px; gap: 6px; }
  .bk-pl { font-size: 18px; }
  .bk-prog li:not(.is-cur) .bk-pl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bk-dates { margin: 0 -20px; padding: 4px 20px 14px; scroll-padding: 0 20px; }
  .bk-chip { width: 84px; min-height: 104px; }
  .bk-slot-l { grid-template-columns: repeat(3, 1fr); }
  .bk-form { grid-template-columns: 1fr; }
  .bk-form .bk-btn, .bk-actions .bk-btn { width: 100%; }
  .bk-ticket { padding: 20px; }
  .bk-ticket dl { grid-template-columns: 1fr; }
  .is-done .bk-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .bk *, .bk *::before, .bk *::after { animation: none !important; transition: none !important; }
  .bk-check circle, .bk-check path { stroke-dashoffset: 0; }
  .bk-spin { border-top-color: var(--brand); }
}
