/*
CHANGE HISTORY
2026-11-08 - The terms checkbox sits inside a numbered step, so it needs no top margin of its own.
2026-11-06 - .terms (purchase terms page) and .terms-agree (the checkbox above the Pay button).
2026-11-06 - Sold seats are a muted red with an X (were nearly the page colour, so a full show looked like a blank page). Legend swatch matches.
2026-11-05 - Gift card form is a dialog (.gift-dialog, .gift-open button); the old collapsed <details> rules are gone.
2026-11-04 - .pay-wait overlay (payment processing box).
2026-11-04 - .hold-timer countdown and the .hold-expired question dialog.
2026-11-04 - .breakdown ($8.50 + $1.55 service fee) beside full ticket prices.
2026-11-04 - Pay page steps: .step, .step-title, .step-num (numbered headings with space between sections).
2026-11-04 - .saving callout is amber (was green). Review page checkout buttons are all solid. .picker .muted rows inside order tables.
2026-11-03 - .form-step dividers. .field-row two-column rows for the gift card form. Gift card section is a collapsed <details> button. Added .saving callout (green) for the account service-fee saving.
*/
:root {
  color-scheme: dark; /* native controls (dropdowns, dialog) render dark too */
  --bg: #0d1117;
  --header: #090c11;
  --card: #161b22;
  --text: #e6eaf0;
  --muted: #9aa5b4;
  --line: #2c3541;
  --accent: #5b9dff;
  --accent-text: #07101f;
  --seat: #202833;
  --seat-line: #5f6b7c;
  --seat-selected: #5b9dff;
  --seat-unavailable: #2b313a;
  --seat-sold-bg: #3a2024;
  --seat-sold-line: #8a4a50;
  /* a thin X drawn across a sold seat; the seat number is hidden */
  --seat-sold-x: linear-gradient(to top right, transparent calc(50% - 1px), var(--seat-sold-line) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(to bottom right, transparent calc(50% - 1px), var(--seat-sold-line) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  --access: #1a6ad4; /* the darker blue of the international access symbol */
  --companion: #f2b84b;
  --warn: #ff7b6f;
  --warn-bg: #3b1d1d;
  --gold: #f5b942;
  --gold-bg: #33260a;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
.site-header { padding: 12px 16px; background: var(--header); border-bottom: 1px solid var(--line); }
.site-header .logo { max-height: 48px; max-width: 70%; display: block; }
.cinema-name { font-weight: 700; }
main { max-width: 820px; margin: 0 auto; padding: 16px; }
.site-footer { max-width: 820px; margin: 0 auto; padding: 8px 16px 32px; color: var(--muted); font-size: 14px; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
.show-info { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.poster { border-radius: 6px; height: auto; flex: none; background: var(--line); }
.when { font-weight: 600; margin: 0; }
.where { margin: 2px 0 0; color: var(--muted); }
.picker, .message { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.hint { color: var(--muted); margin: 0 0 12px; }
.screen-bar { text-align: center; letter-spacing: .3em; font-size: 12px; color: var(--muted); border-top: 4px solid var(--seat-line); border-radius: 50% 50% 0 0 / 12px 12px 0 0; padding-top: 4px; margin: 0 auto 8px; max-width: 760px; }

.scroll-hint { display: none; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
@media (max-width: 620px) { .scroll-hint { display: block; } }
.chart-scroll { overflow-x: auto; }
.chart { position: relative; width: 100%; min-width: 560px; max-width: 760px; margin: 0 auto; container-type: inline-size; }
.row-label { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 2.4cqw; font-weight: 600; color: var(--muted); }
.seat { position: absolute; padding: 0; border: 1.5px solid var(--seat-line); border-radius: 22%; background: var(--seat); color: var(--text); cursor: pointer; font: inherit; font-size: 2.3cqw; line-height: 1; display: flex; align-items: center; justify-content: center; }
.seat:hover:not(:disabled) { border-color: var(--accent); }
.seat:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; z-index: 2; }
.seat.wheelchair { border-color: var(--access); border-width: 3px; }
.seat.wheelchair:disabled { color: var(--seat-line); border-color: var(--access); }
.icon { width: 64%; height: 64%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.seat.companion { border-color: var(--companion); border-width: 2.5px; }
.seat[aria-pressed="true"] { background: var(--seat-selected); border-color: var(--seat-selected); color: var(--accent-text); font-weight: 700; }
.seat:disabled { background: var(--seat-sold-x) var(--seat-sold-bg); border-color: var(--seat-sold-line); color: transparent; cursor: not-allowed; }
.seat.orphan { background: var(--warn-bg); border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn); color: var(--text); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.swatch { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--seat-line); border-radius: 4px; vertical-align: -3px; background: var(--seat); }
.swatch.selected { background: var(--seat-selected); border-color: var(--seat-selected); }
.swatch.unavailable { background: var(--seat-sold-x) var(--seat-sold-bg); border-color: var(--seat-sold-line); }
.swatch.wheelchair { border-color: var(--access); border-width: 3px; display: inline-flex; align-items: center; justify-content: center; }
.swatch .icon { width: 12px; height: 12px; }
.swatch.companion { border-color: var(--companion); border-width: 2.5px; }

/* Pinned to the bottom of the screen while the chart is in view, so the next step is always visible. */
.summary-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 16px -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: 0 -8px 18px rgb(0 0 0 / .4); }
.summary-text { flex: 1 1 14rem; min-width: 0; }
.summary-text p { margin: 0; }
.summary-text p + p { margin-top: 6px; }
#selection, #ga-total { font-weight: 600; }
.summary-bar .primary { flex: 0 0 auto; }
.note { margin: 12px 0 0; }
.warning { color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 8px 10px; }
.note { color: var(--muted); font-size: 13px; }
button.primary, button.secondary { font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 18px; border: 1px solid var(--accent); cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-text); }
button.secondary { background: var(--card); color: var(--accent); }
button.primary:disabled { background: var(--seat-unavailable); border-color: var(--seat-unavailable); color: var(--muted); cursor: not-allowed; }
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 420px; background: var(--card); color: var(--text); }
dialog::backdrop { background: rgb(0 0 0 / .65); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ticket-list .price { color: var(--muted); margin-left: 6px; }
.ticket-list .price.full { color: var(--text); font-weight: 700; }
.ticket-list .breakdown { font-size: 0.85em; font-weight: 400; color: var(--muted); }
.ticket-list select { font: inherit; padding: 6px 10px; min-width: 4.5rem; background: var(--seat); color: var(--text); border: 1px solid var(--seat-line); border-radius: 6px; }

/* account pages */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.account-nav a, a { color: var(--accent); }
.account-nav form { margin: 0; }
button.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.form-card { max-width: 460px; margin: 0 auto; }
.field { margin: 0 0 14px; }
.field label, .dob legend { display: block; margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.field input, .dob input { width: 100%; font: inherit; padding: 10px 12px; color: var(--text); background: var(--seat); border: 1px solid var(--seat-line); border-radius: 8px; }
.field input:focus-visible, .dob input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.field.has-error input, .dob.has-error input { border-color: var(--warn); }
.error { color: var(--warn); font-size: 14px; margin: 4px 0 0; }
.dob { border: 0; padding: 0; margin: 0 0 18px; }
.dob-fields { display: flex; gap: 8px; }
.dob-fields input { width: 5rem; text-align: center; }
.dob-fields input[name="year"] { width: 6.5rem; }
.form-links { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.button-link.secondary { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
.checkout-choice { margin: 16px 0 0; }
.checkout-choice .button-link { margin: 0 8px 8px 0; }
.saving { margin: 4px 0 14px; padding: 10px 14px; background: var(--gold-bg); border: 1px solid var(--gold); border-radius: 8px; color: var(--text); font-size: 1.05rem; }
.saving strong { color: var(--gold); font-size: 1.2rem; }
.button-link { display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none; }

/* ticket choice and order review */
h3 { font-size: 1rem; margin: 16px 0 6px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { padding: 4px 0; }
.muted { color: var(--muted); }
.order { width: 100%; border-collapse: collapse; margin: 12px 0; }
.order td, .order th { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.order tfoot th, .order tfoot td { border-bottom: 0; font-weight: 700; font-size: 1.1rem; }
.order .amount { text-align: right; white-space: nowrap; }

/* payment and confirmation */
#payment-element { margin: 0 0 16px; min-height: 120px; }
/* The pay page's numbered steps: generous space between them so each part is clearly its own job. */
.step { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.step-intro { margin-top: 20px; }
.step-title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 1.4rem; line-height: 1.2; }
.step-num { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 1.15rem; font-weight: 700; }
.step .gift-open { margin: 28px 0 8px; }
.step:last-of-type { margin-bottom: 28px; }
.ticket-box { text-align: center; border: 2px dashed var(--line); border-radius: 10px; padding: 18px 12px; margin: 16px 0; }
.ticket-box .pickup { font-size: 2rem; font-weight: 700; letter-spacing: 2px; margin: 2px 0 12px; }
.ticket-box .barcode { max-width: 100%; height: auto; background: #fff; border-radius: 6px; }

/* gift cards */
fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.field .choice { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 400; }
.field .choice.inline { display: inline-flex; margin-right: 16px; }
.field .choice input { width: auto; padding: 0; margin: 0; accent-color: var(--accent); }
.field textarea { width: 100%; font: inherit; padding: 10px 12px; color: var(--text); background: var(--seat); border: 1px solid var(--seat-line); border-radius: 8px; }
.field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.field.has-error textarea { border-color: var(--warn); }
.order td form { margin: 4px 0 0; text-align: right; }
.balance { font-size: 1.2rem; }
.form-step { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-row-3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 560px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }

/* my tickets */
.notice { color: var(--text); background: var(--card-2, #1c2a1f); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.tag { font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.order-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* paying with gift cards: the form is in a dialog opened by the button */
.gift-dialog { width: min(92vw, 460px); }
.gift-dialog h2 { margin: 0 0 12px; }
.gift-dialog .note { margin: 16px 0; }
form.inline { display: inline; margin-left: 8px; }
.gift-add { margin-top: 12px; }
.gift-dialog button.secondary { margin: 4px 8px 4px 0; }

/* The 5-minute countdown, and the question asked when it reaches 0:00 */
.hold-timer { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line, #2f3a4a); border-radius: 8px; background: var(--card, #202833); text-align: center; }
.hold-timer strong { font-variant-numeric: tabular-nums; font-size: 1.15em; }
.hold-timer.low { border-color: var(--gold, #f5b942); background: var(--gold-bg, #33260a); color: var(--gold, #f5b942); }
.hold-expired { max-width: min(92vw, 420px); padding: 24px; border: 1px solid var(--line, #2f3a4a); border-radius: 12px; background: var(--card, #202833); color: inherit; text-align: center; }
.hold-expired::backdrop { background: rgba(0, 0, 0, 0.65); }
.hold-expired h2 { margin: 0 0 8px; }
.hold-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.hold-actions form { margin: 0; }

/* "Your payment is processing": covers the page while the payment is being sent. Below Stripe's own 3-D Secure window (which uses the highest layer). */
.pay-wait { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.78); }
.pay-wait[hidden] { display: none; }
.pay-wait-box { max-width: 420px; padding: 28px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: center; outline: none; }
.pay-wait-box h2 { margin: 12px 0 8px; }
.pay-wait-box p { margin: 0 0 8px; }
.pay-wait-warn { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--gold, #f5b942); border-radius: 8px; background: var(--gold-bg, #33260a); color: var(--gold, #f5b942); }
.pay-spinner { width: 36px; height: 36px; margin: 0 auto; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: pay-spin 0.9s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spinner { animation-duration: 3s; } }

/* purchase terms page and the "I agree" box on the pay pages */
.terms h2 { margin: 24px 0 6px; }
.terms p { margin: 0 0 12px; line-height: 1.5; }
.terms-agree { margin: 20px 0 8px; }
.step .terms-agree { margin-top: 0; }
