/* Asteria: the booking sheet, the reformer map and "my bookings". Tokens live in proto.css. */
.bk, .mb { position: fixed; inset: 0; z-index: 70; }
.bk[hidden], .mb[hidden] { display: none; }
.bk-scrim, .mb-scrim { position: absolute; inset: 0; background: rgba(22, 36, 29, 0.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* The sheet: a dialog in the middle on wide screens, a sheet from the bottom on phones.
   Centred with auto margins, not translate: GSAP writes "translate: none" when it animates the panel. */
.bk-panel { position: absolute; inset: 0; margin: auto; height: fit-content; width: min(480px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto; padding: 28px 26px 24px; border-radius: 34px; background: var(--paper); color: var(--cocoa); box-shadow: 0 40px 90px rgba(22, 36, 29, 0.35); }
.bk-close, .mb-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--sand); display: grid; place-items: center; font-size: 20px; line-height: 1; }
.bk-date { font-size: 13px; letter-spacing: 0.08em; color: var(--taupe); }
.bk-panel h2 { margin: 6px 0 8px; padding-inline-end: 48px; font: 600 30px/1.1 var(--display); }
.bk-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-meta span { padding: 4px 12px; border-radius: 999px; background: var(--sand); font-size: 13px; }
.bk-who { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--taupe); }
.bk-who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* The reformer map: the instructor's spot at the front, eight beds in two rows. */
.bk-room { margin-top: 20px; padding: 16px; border-radius: 26px; background: var(--sand); }
.bk-front { margin: 0 auto 12px; width: max-content; padding: 4px 14px; border-radius: 999px; background: var(--paper); font-size: 12px; letter-spacing: 0.08em; color: var(--taupe); }
.bk-map { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bk-seat { position: relative; aspect-ratio: 1 / 1.7; border-radius: 16px 16px 12px 12px; border: 1.5px solid var(--line); background: var(--paper); display: grid; place-items: center; font: 600 15px var(--display); color: var(--cocoa); transition: background 0.3s, color 0.3s, border-color 0.3s, scale 0.25s var(--ease); }
.bk-seat::before { content: ""; position: absolute; top: 8px; inset-inline: 28%; height: 9%; border-radius: 999px; background: var(--linen); }
.bk-seat:not(:disabled):hover { border-color: var(--clay); }
.bk-seat:active { scale: 0.94; }
.bk-seat:disabled { background: var(--linen); color: var(--mist); border-color: transparent; }
.bk-seat:disabled::after { content: ""; position: absolute; bottom: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--mist); opacity: 0.6; }
.bk-seat[aria-checked="true"] { background: var(--clay); border-color: var(--clay); color: var(--paper); }
.bk-seat[aria-checked="true"]::before { background: rgba(247, 241, 232, 0.4); }
.bk-legend { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--taupe); }
.bk-legend i { display: inline-block; width: 10px; height: 10px; margin-inline-end: 5px; border-radius: 3px; vertical-align: -1px; }
.bk-legend .f { background: var(--paper); border: 1px solid var(--line); }
.bk-legend .t { background: var(--linen); }
.bk-legend .y { background: var(--clay); }
.bk-hint { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--taupe); text-align: center; }
.bk-go, .bk-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; margin-top: 16px; border: 0; border-radius: 999px; background: var(--cocoa); color: var(--paper); font-size: 16px; font-weight: 500; transition: background 0.3s, scale 0.2s var(--ease); }
.bk-go:hover { background: var(--clay); }
.bk-go:active, .bk-btn:active { scale: 0.97; }
.bk-small { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--taupe); }

/* After booking: a drawn check, the details, calendar and "my bookings". */
.bk-done { text-align: center; padding-top: 8px; }
.bk-done[hidden] { display: none; }
.bk-check { width: 76px; height: 76px; margin: 6px auto 10px; }
.bk-check circle { fill: var(--sage); }
.bk-check path { fill: none; stroke: var(--forest); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.bk-done h3 { margin: 0; font: 600 28px var(--display); }
.bk-done p { margin: 8px 0 4px; color: var(--taupe); }
.bk-btn.alt { background: transparent; color: var(--cocoa); border: 1px solid var(--cocoa); margin-top: 10px; }

/* My bookings: a drawer from the reading side. */
.mb-panel { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(440px, 100vw); overflow: auto; padding: 26px 22px 40px; background: var(--paper); box-shadow: 0 0 80px rgba(22, 36, 29, 0.3); }
.mb-panel h2 { margin: 4px 0 20px; font: 600 32px var(--display); }
.mb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mb-item { padding: 16px 18px; border-radius: 22px; background: var(--sand); }
.mb-item.is-wait { background: transparent; border: 1px dashed var(--line); }
.mb-item.is-cancelled { opacity: 0.6; }
.mb-when { font-size: 13px; color: var(--taupe); }
.mb-item strong { display: block; margin: 4px 0; font-size: 18px; }
.mb-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.mb-tags span { padding: 3px 10px; border-radius: 999px; background: var(--paper); }
.mb-tags .ok { background: var(--sage); color: var(--forest); }
.mb-tags .warn { background: var(--linen); }
.mb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mb-row button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--cocoa); background: transparent; font-size: 13px; }
.mb-row button.danger { border-color: var(--clay); color: var(--clay); }
.mb-row button.danger.sure { background: var(--clay); color: var(--paper); }
.mb-row small { align-self: center; font-size: 12px; color: var(--taupe); }
.mb-empty { padding: 30px 0; text-align: center; color: var(--taupe); }
.mb-empty button { margin-top: 14px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--cocoa); color: var(--paper); }

/* The dock's "my bookings" button with a count. */
.dock .mine-btn { position: relative; width: 48px; padding: 0; justify-content: center; }
.dock .mine-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock .mine-btn b { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--clay); color: var(--paper); font: 600 11px/18px var(--body); }
.dock .mine-btn b:empty { display: none; }

/* Schedule states added by the store. */
.sd-book.off { background: transparent; color: var(--mist); border: 1px solid var(--line); cursor: default; }
.sd-class.is-cancelled { opacity: 0.55; }

@media (max-width: 760px) {
  .bk-panel { top: auto; margin-block-end: 0; width: 100%; max-height: 92svh; border-radius: 30px 30px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .bk-panel h2 { font-size: 26px; }
  .mb-panel { width: 100%; }
}

/* Hidden means hidden, even for elements this file gives a display. */
.bk [hidden], .mb [hidden] { display: none !important; }
