/* The guest booking page: one card, four steps, the confirmation card and the manage view. Loaded by /booking (with
   portal.css and scheduler.css) and by a website's mounted /_booking/ page (with scheduler.css and the site's own
   customer-account theme), so colours come from the account tokens when present and from plain fallbacks otherwise.
   Every target is at least 24×24 CSS px; motion stops under prefers-reduced-motion. */
.booking-shell { max-width: 860px; }
.booking-card { --booking-line: var(--ww-account-border, var(--line-2, rgba(20, 32, 50, 0.16))); --booking-accent: var(--ww-account-accent, var(--metal, #144570)); --booking-accent-text: var(--ww-account-accent-text, var(--metal-ink, #f2f7fb)); --booking-muted: var(--muted, #6d7683); --booking-surface: var(--ww-account-surface, var(--surface-2, #f7f9fb)); }
.booking-main { min-width: 0; }
.booking-card h3 { margin: 18px 0 10px; font-size: 1.15rem; }
.booking-card h3:focus-visible, .booking-done-heading:focus-visible { outline: 2px solid var(--booking-accent); outline-offset: 4px; border-radius: 4px; }
.booking-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; counter-reset: step; }
.booking-steps li { counter-increment: step; padding: 6px 12px 6px 8px; border: 1px solid var(--booking-line); border-radius: 999px; font-size: 0.85rem; color: var(--booking-muted); display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.booking-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; font-size: 0.72rem; }
.booking-steps li[aria-current=step] { background: var(--booking-accent); color: var(--booking-accent-text); border-color: var(--booking-accent); font-weight: 600; }
.booking-steps li.is-done { border-color: var(--booking-accent); color: inherit; }
.booking-steps li.is-done::before { content: "✓"; }
.booking-chosen { margin: 0 0 8px; font-weight: 600; }
.booking-form { display: grid; gap: 12px; }
.booking-form .portal-field { margin: 0; }
.booking-note { padding: 10px 12px; border-left: 3px solid var(--booking-accent); background: var(--booking-surface); border-radius: 6px; }
.booking-step-actions { margin-top: 6px; }
.booking-step-actions .portal-button, .booking-actions .portal-button, .booking-copy .portal-button, .booking-grid-step { min-height: 44px; min-width: 44px; }
.booking-message { margin: 0; }
.booking-message:empty { display: none; }

/* Options: a radio per thing guests can book, with its photos, details and "from" price. */
.booking-options { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.booking-options legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.booking-option { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--booking-line); border-radius: 12px; cursor: pointer; }
.booking-option:has(input:checked) { border-color: var(--booking-accent); box-shadow: 0 0 0 1px var(--booking-accent); background: var(--booking-surface); }
.booking-option:focus-within { outline: 2px solid var(--booking-accent); outline-offset: 2px; }
.booking-option input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--booking-accent); }
.booking-option-text { display: grid; gap: 6px; min-width: 0; }
.booking-option-title { font-weight: 600; font-size: 1.05rem; }
.booking-option-meta, .booking-option-price { color: var(--booking-muted); font-size: 0.9rem; }
.booking-option-price { color: inherit; font-weight: 600; }
.booking-option-description { margin: 0; }
.booking-photos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
.booking-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; scroll-snap-align: start; }
.booking-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 0.9rem; }
.booking-details dt { color: var(--booking-muted); }
.booking-details dd { margin: 0; }

/* When: counts, then the free times or the month grid. */
.booking-when { display: grid; gap: 12px; }
.booking-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.booking-when-fixed { margin: 0; font-weight: 600; }
.booking-when-left { margin: 0; }
.booking-slots { border: 1px solid var(--booking-line); border-radius: 12px; padding: 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.booking-slots legend { font-weight: 600; padding: 0 6px; }
.booking-slots .booking-empty { grid-column: 1 / -1; margin: 0; }
.booking-slot { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 44px; padding: 6px 10px; border: 1px solid var(--booking-line); border-radius: 8px; cursor: pointer; }
.booking-slot:has(input:checked) { border-color: var(--booking-accent); box-shadow: 0 0 0 1px var(--booking-accent); background: var(--booking-surface); }
.booking-slot:focus-within { outline: 2px solid var(--booking-accent); outline-offset: 2px; }
.booking-slot input { width: 24px; height: 24px; margin: 0; accent-color: var(--booking-accent); }
.booking-slot-time { font-weight: 600; }
.booking-slot-meta { grid-column: 2; font-size: 0.82rem; color: var(--booking-muted); }
.booking-slot-meta:empty { display: none; }

.booking-grid-wrap { display: grid; gap: 8px; }
.booking-grid-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.booking-grid-title { margin: 0; font-weight: 600; }
.booking-grid-step { padding: 0 14px; font-size: 1.3rem; line-height: 1; }
.booking-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.booking-grid th { font-size: 0.78rem; font-weight: 600; color: var(--booking-muted); padding: 4px 0; }
.booking-night { position: relative; min-height: 48px; height: 48px; padding: 4px; border: 1px solid var(--booking-line); border-radius: 8px; text-align: center; cursor: pointer; vertical-align: top; }
.booking-night[aria-hidden=true] { border: 0; cursor: default; }
.booking-night:focus-visible { outline: 2px solid var(--booking-accent); outline-offset: 1px; }
.booking-night.is-closed { color: var(--booking-muted); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, 0.05) 6px 7px); cursor: not-allowed; }
.booking-night.is-selected { background: var(--booking-accent); color: var(--booking-accent-text); border-color: var(--booking-accent); }
.booking-night.is-checkout { box-shadow: inset 0 0 0 2px var(--booking-accent); }
.booking-night-number { display: block; font-weight: 600; }
.booking-night-left, .booking-night-price { display: block; font-size: 0.7rem; line-height: 1.2; }
.booking-grid-summary { margin: 0; font-weight: 600; min-height: 1.4em; }
.booking-grid-list summary { cursor: pointer; font-size: 0.9rem; }
.booking-grid-list ul { margin: 6px 0 0; padding-left: 18px; font-size: 0.9rem; }

/* Who and review. */
.booking-left:empty, .booking-live:empty { display: none; }
.booking-intake { border: 1px solid var(--booking-line); border-radius: 12px; padding: 12px; margin: 0; display: grid; gap: 10px; }
.booking-intake legend { font-weight: 600; padding: 0 6px; }
.booking-privacy { margin: 0; }
.booking-summary { display: grid; gap: 4px; margin: 0 0 12px; }
.booking-summary p { margin: 0; }
.booking-summary-title { font-weight: 600; font-size: 1.05rem; }
.booking-quote { display: grid; gap: 6px; margin: 0 0 12px; }
.booking-lines { margin: 0; padding-left: 18px; }
.booking-total { margin: 0; font-weight: 600; }
.booking-money { margin: 0; }
.booking-terms-block { display: grid; gap: 8px; margin: 0 0 12px; }
.booking-terms { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--booking-surface); font-size: 0.92rem; }
.booking-form .scheduler-check { align-items: flex-start; gap: 10px; }
.booking-form .scheduler-check input { width: 24px; height: 24px; margin: 0; flex: 0 0 auto; accent-color: var(--booking-accent); }
.booking-retry { padding-top: 6px; border-top: 1px solid var(--booking-line); }

/* The confirmation card and the manage view. */
.booking-done .booking-done-heading { margin-bottom: 6px; }
.booking-reference { margin: 0 0 12px; font-weight: 600; letter-spacing: 0.02em; }
.booking-next { margin: 0 0 12px; }
.booking-countdown { margin: 0 0 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-actions { margin: 12px 0; }
/* Links that act as buttons (Pay now, Add to calendar, Manage) look like the page's buttons on a mounted page too. */
.booking-actions a.portal-button { display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid var(--booking-line); border-radius: var(--ww-account-radius, var(--radius-sm, 10px)); color: inherit; font-weight: 600; text-decoration: none; }
.booking-actions a.portal-button.primary { background: var(--booking-accent); color: var(--booking-accent-text); border-color: var(--booking-accent); }
.booking-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.booking-copy .portal-field { margin: 0; }
.booking-keep { margin: 8px 0 0; }
.booking-keep .portal-link-button { font: inherit; font-size: inherit; padding: 0; min-height: 24px; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.booking-contact { margin: 12px 0 0; }
.booking-cancel, .booking-reschedule { display: grid; gap: 10px; margin: 12px 0; padding: 12px; border: 1px solid var(--booking-line); border-radius: 12px; }
.booking-cancel-question { margin: 0; font-weight: 600; }
/* The waitlist join form and the "leave the waitlist?" question (public/booking-ui.js). */
.booking-waitlist, .booking-leave { display: grid; gap: 10px; margin: 12px 0; padding: 12px; border: 1px solid var(--booking-line); border-radius: 12px; }
.booking-waitlist h4 { margin: 0; font-size: 1rem; }
.booking-waitlist-offer { display: grid; gap: 10px; justify-items: start; margin-top: 10px; }
.booking-card .portal-button[hidden] { display: none; }
.booking-account { margin-top: 24px; }
.booking-signin-row { margin: 8px 0 0; }
.booking-loading { margin: 8px 0; }

@media (max-width: 700px) {
  .booking-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .booking-grid { border-spacing: 2px; }
  .booking-night { height: 44px; min-height: 44px; padding: 2px; }
  .booking-night-left, .booking-night-price { font-size: 0.62rem; }
  .booking-copy { grid-template-columns: 1fr; }
  .booking-copy .portal-button { width: 100%; }
  .booking-step-actions .portal-button, .booking-actions .portal-button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .booking-card *, .booking-card *::before, .booking-card *::after { transition: none !important; animation: none !important; }
  .booking-photos { scroll-behavior: auto; }
}
