/* Public booking experience */
.booking-body { display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); }
.bk { width: min(1040px, 100%); }
.bk-card {
  display: grid; grid-template-columns: 320px 1fr;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow-lg);
  overflow: hidden; min-height: 560px; animation: rise 0.55s var(--spring);
}
.bk-side { padding: 32px 28px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; background: linear-gradient(180deg, color-mix(in oklab, var(--c) 7%, transparent), transparent 60%); }
.bk-host { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.bk-host .avatar { width: 40px; height: 40px; font-size: 0.9rem; }
.bk-title { font-size: 1.65rem; font-weight: 750; letter-spacing: -0.03em; }
.bk-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-weight: 560; font-size: 0.92rem; }
.bk-facts li { display: flex; align-items: center; gap: 10px; }
.bk-facts li#fact-when { color: var(--text); font-weight: 650; }
.bk-facts svg { width: 18px; height: 18px; color: var(--c); }
.bk-desc { color: var(--muted); font-size: 0.92rem; white-space: pre-line; }
.bk-banner { margin-top: auto; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in oklab, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in oklab, var(--warn) 35%, transparent); font-size: 0.86rem; }
.bk-banner strong { display: block; margin-bottom: 2px; }

.bk-main { position: relative; padding: 28px 32px 32px; min-width: 0; display: grid; }
.bk-step { grid-area: 1 / 1; opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); display: grid; }
.bk-step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.bk-step.is-leaving { opacity: 0; transform: translateX(-24px); }

/* Calendar + times layout: the time column is always reserved so the
   calendar never changes size when a day is picked. */
.bk-step[data-step="calendar"] { grid-template-columns: 1fr 200px; gap: 24px; }
.bk-cal { min-width: 0; display: flex; flex-direction: column; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bk-cal-head h2 { font-size: 1.1rem; font-weight: 650; }
.bk-cal-nav { display: flex; gap: 4px; }
.bk-cal-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; transition: background 0.15s, transform 0.15s; }
.bk-cal-nav button:hover { background: var(--surface-2); }
.bk-cal-nav button:active { transform: scale(0.94); }
.bk-cal-nav button:disabled { opacity: 0.35; cursor: default; }
.bk-weekdays, .bk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bk-weekdays span { text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 4px 0 8px; }
.bk-day { aspect-ratio: 1; border-radius: 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 0.95rem; position: relative; display: grid; place-items: center; transition: background 0.15s, color 0.15s, transform 0.15s var(--spring); }
.bk-day.pad { visibility: hidden; }
.bk-day.open { background: color-mix(in oklab, var(--c) 11%, var(--surface)); color: color-mix(in oklab, var(--c) 85%, var(--text)); cursor: pointer; }
.bk-day.open:hover { background: color-mix(in oklab, var(--c) 20%, var(--surface)); transform: scale(1.04); }
.bk-day.open::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--c); opacity: 0.7; }
.bk-day.selected, .bk-day.selected:hover { background: var(--c); color: var(--on-accent); box-shadow: 0 8px 18px -8px color-mix(in oklab, var(--c) 80%, transparent); }
.bk-day.selected::after { background: var(--on-accent); }
.bk-day.today:not(.selected) { box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.bk-day:disabled { cursor: default; }
.bk-day:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.bk-days.loading { opacity: 0.45; pointer-events: none; transition: opacity 0.2s; }
.bk-times-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.88rem; padding: 8px 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--c) 25%, transparent); border-top-color: var(--c); animation: spin 0.8s linear infinite; flex: none; }

.bk-tz { margin-top: auto; padding-top: 16px; position: relative; }
.tz-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 0.85rem; max-width: 100%; }
.tz-btn:hover { color: var(--text); background: var(--surface-2); }
.tz-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-btn .chev { width: 14px; height: 14px; }
.tz-pop { position: absolute; bottom: calc(100% - 8px); left: 0; width: min(340px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 10px; z-index: 20; animation: pop 0.2s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.tz-pop input { margin-bottom: 8px; }
.tz-pop ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.tz-pop li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.88rem; }
.tz-pop li:hover, .tz-pop li.active { background: var(--surface-2); }
.tz-pop li.selected { color: var(--c); font-weight: 650; }
.tz-pop li small { color: var(--muted); font-variant-numeric: tabular-nums; }

/* The inner wrapper is absolutely positioned so the time list never stretches the card; it scrolls within the calendar's height instead. */
.bk-times { min-width: 0; position: relative; overflow: hidden; }
.bk-times-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.bk-times-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; min-height: 36px; }
.bk-times-head h3 { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-times-list { display: grid; grid-template-columns: 1fr; gap: 6px; overflow-y: auto; flex: 1; min-height: 0; align-content: start; padding: 2px 4px 28px 2px; scrollbar-width: none; mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
.bk-times-list::-webkit-scrollbar { display: none; }
.slot { padding: 8px 10px; border-radius: 10px; font-weight: 650; font-size: 0.88rem; line-height: 1.2; border: 1.5px solid color-mix(in oklab, var(--c) 45%, transparent); background: var(--surface); color: var(--c); transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s; white-space: nowrap; animation: slot-in 0.3s var(--ease) both; animation-delay: calc(var(--i, 0) * 20ms); }
@keyframes slot-in { from { opacity: 0; transform: translateY(6px); } }
.slot:hover { border-color: var(--c); background: color-mix(in oklab, var(--c) 8%, var(--surface)); }
.slot:active { transform: scale(0.98); }
.slot.picked { background: var(--c); border-color: transparent; color: var(--on-accent); }
.bk-times-empty { color: var(--muted); font-size: 0.9rem; padding: 10px 0; }
.bk-times-hint { color: var(--muted); font-size: 0.88rem; padding: 8px 0; line-height: 1.5; }

/* Form step */
.bk-step[data-step="form"] { align-content: start; max-width: 460px; }
.bk-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: 6px 8px 6px 4px; border-radius: 8px; margin-bottom: 10px; justify-self: start; }
.bk-back:hover { color: var(--text); background: var(--surface-2); }
.bk-step[data-step="form"] h2 { font-size: 1.3rem; margin-bottom: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#submit-btn { margin-top: 6px; position: relative; }
#submit-btn.busy span { visibility: hidden; }
#submit-btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in oklab, var(--on-accent) 40%, transparent); border-top-color: var(--on-accent); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Done step */
.bk-done { text-align: center; max-width: 440px; margin: 0 auto; align-self: center; }
.check { width: 72px; height: 72px; margin: 0 auto 16px; }
.check svg { width: 72px; height: 72px; stroke: var(--ok); stroke-width: 2.5; }
.check circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 0.6s var(--ease) forwards; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.4s 0.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.bk-done h2 { font-size: 1.5rem; }
.bk-done .done-card { text-align: left; align-items: flex-start; }
.bk-done .done-card strong { font-size: 1.05rem; }
.bk-done .done-card span { font-size: 1.1rem; font-weight: 650; }
.bk-done .done-card .muted { font-size: 0.85rem; font-weight: 500; }
.bk-done .done-card .btn { align-self: stretch; }

@media (max-width: 860px) {
  .booking-body { padding: 0; align-items: start; }
  .bk-card { grid-template-columns: 1fr; border-radius: 0; min-height: 100dvh; border: 0; }
  .bk-side { border-right: 0; border-bottom: 1px solid var(--border); padding: 24px 20px 20px; }
  .bk-title { font-size: 1.4rem; }
  .bk-main { padding: 20px 16px 28px; }
  .bk-step[data-step="calendar"] { grid-template-columns: 1fr; gap: 20px; }
  .bk-times-inner { position: static; }
  .bk-times-list { grid-template-columns: repeat(3, 1fr); mask-image: none; padding-bottom: 0; overflow: visible; }
  .bk-tz { padding-top: 12px; }
  .tz-pop { bottom: auto; top: calc(100% + 6px); }
  .powered { padding-bottom: 20px; }
}
