/* Booking funnel on the shared kit: step 2 (date + time) and step 3 (confirm). */
body:is(.booking-selection-active, .booking-confirm-active) { background: var(--cg-paper); }
body:is(.booking-selection-active, .booking-confirm-active) #app-root { max-width: var(--cg-content-width); background: var(--cg-paper); }
body:is(.booking-selection-active, .booking-confirm-active) #screen-book > .back-pill-auto { display: none !important; }
body:is(.booking-selection-active, .booking-confirm-active) #screen-book { padding: 24px 24px calc(96px + env(safe-area-inset-bottom)); color: var(--cg-ink); background: var(--cg-paper); }
.booking-masthead { flex-direction: row-reverse; }
body:is(.booking-selection-active, .booking-confirm-active) :is(#book-step-2, #book-step-3) { padding: 0; margin-top: 0; }
.booking-layout { display: grid; gap: 32px; }
.booking-eyebrow { margin: 0 0 12px; font: 500 var(--cg-text-micro)/1.5 var(--cg-font-body); letter-spacing: .08em; }
.booking-heading { margin: 0; color: var(--cg-ink); font: 400 32px/1.2 var(--cg-font-display); letter-spacing: 0; }
.booking-description { margin: 20px 0 0; max-width: 29ch; font: 400 var(--cg-text-lead)/1.6 var(--cg-font-body); }
.booking-photo { display: none; }
.booking-calendar { min-width: 0; }
.booking-calendar .cg-section-heading h2 { font-size: var(--cg-title-section); }
.booking-calendar .cg-section-heading > span { font-size: var(--cg-text-caption); }
.booking-calendar .cal-nav { margin: 8px 0 20px; font: 600 var(--cg-text-control)/1.5 var(--cg-font-body); letter-spacing: 0; }
.booking-calendar .cal-nav-btn { border: 1px solid var(--cg-line); color: var(--cg-ink); background: none; border-radius: var(--cg-radius); font: 400 24px/1 var(--cg-font-body); }
.booking-calendar .cal-nav-btn:disabled { opacity: .25; cursor: default; }
.booking-calendar .cal-days-hdr { color: var(--cg-ink); font: 500 var(--cg-text-micro)/1.5 var(--cg-font-body); letter-spacing: .03em; margin-bottom: 12px; }
.booking-calendar .cal-grid { gap: 4px; }
.booking-calendar .cal-day { background: var(--cg-ink); color: var(--cg-paper); border: 1px solid var(--cg-ink); border-radius: var(--cg-radius-sm); font: 500 var(--cg-text-lead)/1 var(--cg-font-body); min-width: 0; min-height: 40px; }
.booking-calendar .cal-day.today { box-shadow: inset 0 -3px var(--cg-red); }
.booking-calendar .cal-day.selected { background: var(--cg-red); border-color: var(--cg-red); color: var(--cg-paper); }
.booking-calendar .cal-day.cal-disabled { opacity: 1; background: none; color: var(--cg-disabled); border-color: transparent; }
.booking-calendar .cal-day.cal-full { border-color: var(--cg-line); color: var(--cg-ink); }
.booking-calendar .cal-day.cal-full::after { color: var(--cg-red); bottom: 5px; }
.booking-calendar .cal-day.cal-waitlisted::after { content: '✓'; font: 600 9px/1 var(--cg-font-body); }
.booking-calendar .cal-day.cal-skeleton { background: var(--cg-line-soft); color: transparent; animation: none; }
.booking-timezone { margin: 20px 0 0; font: 500 var(--cg-text-caption)/1.5 var(--cg-font-body); color: inherit; }
.booking-waitlist { margin: 8px 0 0; font: 400 var(--cg-text-caption)/1.6 var(--cg-font-body); }
.booking-calendar .cal-empty-state { grid-column: 1 / -1; padding: 32px 8px; color: var(--cg-ink); background: none; font: 400 var(--cg-text-body)/1.6 var(--cg-font-body); }
.booking-calendar #step2-hint { margin: 0 0 16px; color: var(--cg-red); font: 500 var(--cg-text-detail)/1.5 var(--cg-font-body); }
#booking-retry:not([hidden]) { margin-bottom: 20px; }
#screen-book .closed-banner { background: var(--cg-ink); color: var(--cg-paper); border-radius: var(--cg-radius-sm); border: 0; font-family: var(--cg-font-body); }

/* Time/duration choices inside the shared dialog shell. */
#time-sheet-overlay .time-sheet-duration { flex-shrink: 0; margin: 24px 0 0; padding: 0; border: 0; }
#time-sheet-overlay [hidden] { display: none !important; }
#time-sheet-overlay #time-sheet-summary:empty { display: none; }
#time-sheet-overlay .time-sheet-continue { min-height: 56px; }
#time-sheet-overlay .booking-timezone { flex-shrink: 0; }
#time-sheet-overlay .time-sheet-duration-label { color: inherit; font: 600 var(--cg-text-caption)/1.5 var(--cg-font-body); letter-spacing: .05em; margin-bottom: 12px; }
#time-sheet-overlay .duration-pills { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
#time-sheet-overlay .duration-pill { margin: 0; min-height: 64px; padding: 10px 4px; border: 1px solid var(--cg-line); background: none; color: var(--cg-ink); box-shadow: none; border-radius: var(--cg-radius); font: 600 var(--cg-text-detail)/1.3 var(--cg-font-body); letter-spacing: 0; }
#time-sheet-overlay .duration-pill .pill-price { margin: 5px 0 0; font: 400 var(--cg-text-small)/1.3 var(--cg-font-body); letter-spacing: 0; color: inherit; opacity: 1; }
#time-sheet-overlay .duration-pill.active { color: var(--cg-paper); background: var(--cg-ink); border-color: var(--cg-ink); }
#time-sheet-overlay .duration-pill--pro { grid-column: span 2; }
#time-sheet-overlay .duration-pill .pill-label { display: block; }
#time-sheet-overlay .duration-pill .pill-range { display: block; margin-top: 3px; font: 400 var(--cg-text-micro)/1.3 var(--cg-font-label); }
#time-sheet-overlay .duration-pill .pill-range:empty { display: none; }
#time-sheet-overlay .booking-welcome { margin: 16px 0 0; padding-left: 12px; border-left: 3px solid var(--cg-red); font: 400 var(--cg-text-small)/1.5 var(--cg-font-body); }
#time-sheet-overlay .booking-welcome[hidden] { display: none; }
.booking-intro .price-block { margin-top: 32px; }
#time-sheet-overlay .booking-duration-help { align-self: flex-start; flex-shrink: 0; display: flex; gap: 12px; align-items: center; padding: 12px 0; margin: 0 0 20px; min-height: 44px; border: 0; background: none; color: inherit; font: 400 var(--cg-text-small)/1.5 var(--cg-font-body); text-align: left; text-decoration: underline; text-underline-offset: 4px; }
#time-sheet-overlay .time-sheet-chips { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; overflow: visible; max-height: none; min-height: 44px; flex-shrink: 0; margin: 0; padding: 0; color: inherit; font: 400 var(--cg-text-detail)/1.6 var(--cg-font-body); }
#time-sheet-overlay .time-sheet-chip { min-width: 0; min-height: 44px; padding: 10px 4px; background: none; color: var(--cg-ink); border: 1px solid var(--cg-line); border-radius: var(--cg-radius); font: 500 var(--cg-text-detail)/1.4 var(--cg-font-body); }
#time-sheet-overlay .time-sheet-chip.active { background: var(--cg-red); border-color: var(--cg-red); color: var(--cg-paper); }
#time-sheet-overlay :is(.time-sheet-empty, .time-sheet-note) { grid-column: 1 / -1; width: auto; background: none; color: inherit; border: 0; padding: 12px 0; font: 400 var(--cg-text-body)/1.6 var(--cg-font-body); }
#time-sheet-overlay .booking-timezone { margin-top: 16px; }
#time-sheet-retry:not([hidden]) { margin-top: 12px; }
/* ── Step 3: confirm ─────────────────────────────────────────────────── */
/* One column: the session as the heading, the bill, the note, the button. */
.confirm-layout { max-width: 560px; margin-inline: auto; }
.confirm-when { font-size: 36px; }
.confirm-when-time { margin: 10px 0 0; color: var(--cg-ink); font: 500 var(--cg-text-lead)/1.5 var(--cg-font-body); }
#ttl-badge { display: block; margin: 6px 0 28px; padding: 0; border: 0; background: none; color: var(--cg-muted); font: 400 var(--cg-text-caption)/1.5 var(--cg-font-body); letter-spacing: 0; }
#ttl-badge:is(.greyed, .ttl-badge--securing) { border: 0; background: none; color: var(--cg-muted); }
.booking-confirm-active .confirm-card { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--cg-ink); border-radius: 0; background: none; }
.booking-confirm-active .confirm-row { gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--cg-line-soft); justify-content: space-between; }
.booking-confirm-active .confirm-value { color: var(--cg-ink); font: 600 var(--cg-text-body)/1.4 var(--cg-font-body); letter-spacing: 0; white-space: nowrap; }
.booking-confirm-active .confirm-label { color: var(--cg-ink); font: 400 var(--cg-text-body)/1.5 var(--cg-font-body); }
.booking-confirm-active .confirm-value--discount,
.booking-confirm-active .confirm-label--discount { color: var(--cg-red); }
.booking-confirm-active .confirm-extras { padding: 0; border: 0; }
.booking-confirm-active .confirm-extras-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--cg-line-soft); cursor: pointer; }
.booking-confirm-active .confirm-extras-row.confirm-row--included { cursor: default; opacity: 1; }
.booking-confirm-active .confirm-extras-name { display: flex; flex-direction: column; gap: 2px; color: var(--cg-ink); font: 400 var(--cg-text-caption)/1.45 var(--cg-font-body); }
.booking-confirm-active .confirm-extras-name strong { font: 400 var(--cg-text-body)/1.45 var(--cg-font-body); }
.booking-confirm-active .confirm-extras-name span { color: var(--cg-muted); }
.booking-confirm-active .confirm-row--included .confirm-value { font-weight: 600; }
.booking-confirm-active .confirm-extra-ctl { display: flex; align-items: center; gap: 4px; }
.booking-confirm-active .storage-step-btn { width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--cg-line-strong); border-radius: var(--cg-radius-sm); background: none; color: var(--cg-ink); font: 400 20px/1 var(--cg-font-body); }
.booking-confirm-active .storage-step-btn:active { background: var(--cg-ink); color: var(--cg-paper); }
.booking-confirm-active .storage-step-btn:disabled { opacity: .3; }
.booking-confirm-active .storage-calc-count { min-width: 32px; text-align: center; color: var(--cg-ink); font: 600 var(--cg-text-body)/1 var(--cg-font-body); }
.booking-confirm-active .calc-toggle { width: 48px; height: 28px; border: 1px solid var(--cg-line-strong); border-radius: 14px; background: var(--cg-line-soft); }
.booking-confirm-active .calc-toggle::before { top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--cg-paper); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.booking-confirm-active .calc-toggle:checked { border-color: var(--cg-red); background: var(--cg-red); }
.booking-confirm-active .calc-toggle:checked::before { transform: translateX(20px); }
.booking-confirm-active .calc-toggle:focus-visible { outline: 2px solid var(--cg-ink); outline-offset: 3px; }
.booking-confirm-active label.confirm-extras-row:has(.calc-toggle:disabled) { cursor: default; }
.booking-confirm-active .confirm-row--total { align-items: baseline; padding: 20px 0 8px; border-bottom: 0; }
.booking-confirm-active .confirm-label--total { font: 600 var(--cg-text-lead)/1.4 var(--cg-font-body); }
.booking-confirm-active .confirm-value--total { font: 400 32px/1 var(--cg-font-display); letter-spacing: 0; }
.booking-confirm-active .confirm-notes-block { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; padding: 0; border: 0; cursor: pointer; }
.booking-confirm-active .confirm-notes-icon { display: none; }
.booking-confirm-active .confirm-notes-label { display: flex; gap: 6px; align-items: baseline; color: var(--cg-ink); font: 600 var(--cg-text-body)/1.5 var(--cg-font-body); letter-spacing: 0; text-transform: none; }
.booking-confirm-active .confirm-notes-optional { padding: 0; border: 0; border-radius: 0; background: none; color: var(--cg-muted); font: 400 var(--cg-text-caption)/1.5 var(--cg-font-body); letter-spacing: 0; text-transform: none; }
.booking-confirm-active .confirm-notes-optional::before { content: '('; }
.booking-confirm-active .confirm-notes-optional::after { content: ')'; }
.booking-confirm-active :is(.confirm-notes-preview, .notes-modal-textarea) { min-height: 52px; padding: 14px; border: 1px solid var(--cg-line-strong); border-radius: var(--cg-radius); background: none; color: var(--cg-ink); font: 400 var(--cg-text-body)/1.5 var(--cg-font-body); }
.booking-confirm-active .confirm-notes-block:focus-visible { outline: 0; }
.booking-confirm-active .confirm-notes-block:focus-visible .confirm-notes-preview { outline: 2px solid var(--cg-ink); outline-offset: 2px; }
.booking-confirm-active .confirm-notes-preview:active { background: var(--cg-line-soft); }
.booking-confirm-active .confirm-notes-placeholder { color: var(--cg-placeholder); letter-spacing: 0; }
/* No bike in My Garage: the manual can't be prepared. Same note as the bike sheet, red rule. */
.booking-confirm-active .confirm-bike-note { margin-top: 24px; border-left-color: var(--cg-red); }
.booking-confirm-active .confirm-bike-note p + p { margin-top: 4px; }
.booking-confirm-active .confirm-bike-note-title { color: var(--cg-ink); font-weight: 600; }
/* The button stays in reach above the bottom nav while the bill scrolls. */
/* Sticky offsets count from the scroll container's padding edge, so the
   confirm step trades the generic bottom padding for exactly the nav height. */
body.booking-confirm-active #screen-book { padding-bottom: var(--cg-bottom-nav-height); }
.cg-profile-reward-cta {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px;
  width: calc(100% - 32px); max-width: 400px; margin: 16px 16px 0; padding: 14px 16px;
  border: 1px solid var(--cg-red); border-radius: var(--cg-radius-button);
  background: var(--cg-ink); color: var(--cg-paper); text-align: left; cursor: pointer;
}
.cg-profile-reward-value { color: var(--cg-red); font: 400 24px/1 var(--cg-font-display); white-space: nowrap; }
.cg-profile-reward-body { display: grid; gap: 3px; min-width: 0; }
.cg-profile-reward-body strong { font: 600 var(--cg-text-small)/1.3 var(--cg-font-body); }
.cg-profile-reward-body small { color: var(--cg-inverse-muted); font: 400 var(--cg-text-caption)/1.4 var(--cg-font-body); }
.cg-profile-reward-cta:focus-visible { outline: 2px solid var(--cg-paper); outline-offset: 3px; }
.booking-confirm-active .booking-footer-v2 { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px; margin-top: 28px; padding: 12px 0 16px; background: var(--cg-paper); }
.booking-confirm-active .booking-footer-v2 .btn-book-now { width: 100%; }
.booking-confirm-active .booking-footer-v2::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 24px; background: linear-gradient(to bottom, transparent, var(--cg-paper)); pointer-events: none; }
.booking-confirm-active .confirm-cancel-policy { margin: 0; color: var(--cg-muted); font: 400 var(--cg-text-caption)/1.5 var(--cg-font-body); letter-spacing: 0; text-align: center; }
.booking-confirm-active .confirm-cancel-policy strong { color: inherit; font-weight: 600; }

@media (hover:hover) and (pointer:fine) {
  .booking-calendar .cal-day:not(:disabled):hover { border-color: var(--cg-red); }
  #time-sheet-overlay :is(.duration-pill,.time-sheet-chip):hover { border-color: var(--cg-red); }
}
@media (min-width:800px) {
  body.booking-selection-active #screen-book { padding: 40px 48px 56px; }
  .booking-masthead { margin-bottom: 44px; }
  .booking-layout { grid-template-columns: minmax(0,.8fr) minmax(0,1.3fr); gap: 60px; }
  .booking-photo { display: block; margin-top: 32px; }
  .booking-photo img { height: 220px; object-position: 58% 50%; }
  .booking-photo figcaption { font-size: 9px; }
  .booking-calendar .cal-grid { gap: 6px; }
  .booking-calendar .cal-day { min-height: 52px; }
}
@media (max-width:599px) {
  #time-sheet-overlay .duration-pills { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #time-sheet-overlay .duration-pill { min-height: 56px; }
  #time-sheet-overlay .duration-pill--pro { grid-column: span 1; min-height: 48px; }
  #time-sheet-overlay .time-sheet-chips { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
/* Calendar is the first task on mobile, including the short Telegram viewport. */
@media (max-width:799px) {
  body.booking-selection-active #screen-book { padding: 12px 20px calc(var(--cg-bottom-nav-height) + 20px); }
  :is(#book-step-2, #book-step-3) .booking-masthead { margin-bottom: 8px; padding-bottom: 0; border: 0; }
  :is(#book-step-2, #book-step-3) .booking-masthead .cg-wordmark { width: 76px; }
  :is(#book-step-2, #book-step-3) .booking-masthead .cg-button { border: 0; padding-left: 0; }
  body.booking-confirm-active #screen-book { padding-top: 12px; }
  .confirm-when { font-size: 30px; }
  #book-step-2 .booking-layout { display: block; }
  #book-step-2 .booking-intro { display: none; }
  .booking-calendar .cg-section-heading { margin-bottom: 8px; padding-bottom: 0; }
  .booking-calendar .booking-heading { font-size: 28px; }
  .booking-calendar .cal-nav { margin: 0 0 8px; }
  .booking-calendar .cal-days-hdr { margin-bottom: 8px; }
  .booking-calendar .cal-day { aspect-ratio: auto; height: 44px; min-height: 44px; font-size: var(--cg-text-body); }
  .booking-calendar .booking-timezone { margin-top: 12px; }
}
@media (max-width:360px) {
  body.booking-selection-active #screen-book { padding-left: 16px; padding-right: 16px; }
}

/* Calendar wait layer — dims the screen while availability loads. The Lottie
   (assets/lottie/calendar-loading.json) is graphite on transparent, so it sits
   on a paper panel rather than directly on the backdrop. */
.booking-wait {
  position: fixed; inset: 0; z-index: var(--cg-layer-dialog);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--cg-backdrop);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
.booking-wait.is-visible { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.booking-wait-panel {
  width: min(280px, 100%); padding: 16px 24px 24px; text-align: center;
  border-top: var(--cg-dialog-accent-width) solid var(--cg-red); border-radius: var(--cg-radius-media);
  background: var(--cg-paper); color: var(--cg-ink);
  transform: translateY(8px) scale(.98); transition: transform .24s cubic-bezier(.16,1,.3,1);
}
.booking-wait.is-visible .booking-wait-panel { transform: none; }
.booking-wait-anim { width: 136px; height: 136px; margin: 0 auto 8px; }
.booking-wait-title { font: 500 var(--cg-text-small)/1.4 var(--cg-font-label); letter-spacing: .08em; text-transform: uppercase; }
.booking-wait-text { margin-top: 6px; font: 400 var(--cg-text-detail)/1.5 var(--cg-font-body); color: var(--cg-muted); }
@media (prefers-reduced-motion:reduce) {
  .booking-wait, .booking-wait.is-visible, .booking-wait-panel { transition: none; }
}

/* Terms / privacy line under the book button */
.confirm-legal { margin: 6px 0 0; color: var(--cg-muted); font: 400 var(--cg-text-caption)/1.5 var(--cg-font-body); text-align: center; }
.confirm-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
