/* Public pages only (book, contact), loaded after site.css.
   Gives the pages families see the main website's look: its header, footer and fonts
   (header.css), the paper background, white cards, maroon and outline buttons, green as
   the accent, and a few gold star details. The admin page doesn't load this file. */
:root {
  /* Main site tokens (src/styles/global.css) */
  --bg: #f8f5ef;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5b5048;
  --brand: #571607;
  --brand-dark: #3a0f04;
  --accent: #143822;
  --border: #e6dfd2;
  --cream: #faf3e8;
  --gold: #c9a24e;
  --gold-deep: #9a7428;
  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 12px 28px -8px rgba(87, 22, 7, .18);
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", "Tahoma", sans-serif;

  /* site.css variables, remapped so its form styles follow the same palette */
  --velvet: var(--brand);
  --velvet-deep: var(--brand-dark);
  --burgundy: var(--brand);
  --evergreen: var(--accent);
  --ivory: var(--surface);
  --paper: var(--surface);
  --ink: var(--text);
  --rule: var(--border);
  --gold-light: var(--gold-deep);
  --on-velvet: var(--text);
  --on-velvet-muted: var(--muted);
  --font-script: var(--font-body);
}
html { background: var(--bg); }
body { font: 400 16px/1.6 var(--font-body); color: var(--text); background: var(--bg); padding-block: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }

/* ---------- Main site header (styles in header.css) ----------
   The Santa pages pad the body sideways; let the header run edge to edge as on the main site. */
.site-header, .site-footer { margin-inline: -16px; }
.site-footer { margin-top: 48px; }
body.nav-locked { overflow: hidden; }

/* ---------- Page frame ---------- */
.wrap.page { max-width: 1120px; gap: 48px; justify-items: stretch; }

.eyebrow { font: 600 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); margin: 0; text-align: left; }

/* Buttons: main site */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 16px var(--font-body); border-radius: var(--radius); padding: .8rem 1.6rem;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--brand); color: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-primary::after { content: "✦"; font-size: 11px; color: #f1d98e; }
.btn-secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn-secondary:hover { background: var(--brand); color: #fff; }

/* ---------- Split hero (Book and Contact) ---------- */

.when {
  margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden;
}
.when > div { padding: 12px 16px; }
.when > div + div { border-left: 1px solid var(--border); }
.when dt { font: 600 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.when dd { margin: 2px 0 0; font: 600 16px var(--font-body); color: var(--text); }

.closed p { margin: 0; font: 400 16px var(--font-body); color: var(--muted); }
.closed h2 { margin: 0; font: 700 28px var(--font-display); color: var(--brand); }

@media (max-width: 420px) {
  .when { grid-template-columns: 1fr; }
  .when > div + div { border-left: 0; border-top: 1px solid var(--border); }

  
}

/* ---------- Section heading + steps: main site cards ---------- */

.step {
  position: static; display: grid; gap: 8px; align-content: start; justify-items: start; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s;
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.step .n {
  position: static; transform: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cream); color: var(--brand); font: 700 18px var(--font-display); box-shadow: inset 0 0 0 1px rgba(201, 162, 78, .6);
  margin-bottom: 4px;
}
.step h3 { margin: 0; font: 700 19px var(--font-display); letter-spacing: 0; color: var(--brand); }
.step p { margin: 0; font-size: 15px; color: var(--muted); }

.aside-link { margin: -24px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.aside-link a { color: var(--brand); font-weight: 600; }
#loading, .wrap.page > .closed { text-align: center; justify-items: center; }

/* ---------- Form card, in clear numbered sections ---------- */
.card {
  justify-self: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 44px); box-shadow: var(--shadow-lg); gap: 28px;
}
.card::before { display: none; }
legend { display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; margin: 0 0 6px; }
legend .n {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font: 700 15px var(--font-display);
}
legend .tt { font: 700 22px/1.25 var(--font-display); letter-spacing: 0; color: var(--brand); }
.sep { height: 1px; border: 0; margin: 4px 0; background: var(--border); }
.field { text-align: left; }
.field label, .label { font: 600 13px var(--font-body); letter-spacing: 0; text-transform: none; color: var(--text); text-align: left; }
.req::before { content: none; }
.req::after { content: " *"; color: var(--brand); font-size: inherit; vertical-align: baseline; }
.hint, .pin-state { font: 400 14px var(--font-body); color: var(--muted); text-align: left; }
.pin-state.ok { color: var(--accent); }
input, select, textarea {
  font: 400 16px var(--font-body); text-align: left; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background-color: var(--surface);
}
textarea { padding: 12px 14px; }
input::placeholder, textarea::placeholder { text-align: left; color: #a39787; }
select {
  text-align-last: left; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23571607' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(87, 22, 7, .12); }
.map-tools { justify-items: start; }
#map { border-radius: var(--radius); }
.ghost { border: 1px solid var(--brand); border-radius: var(--radius); padding: 8px 16px; font: 600 14px var(--font-body); letter-spacing: 0; color: var(--brand); }
.ghost:hover { background: var(--cream); }
.slots { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.slot { border-radius: var(--radius); font: 600 15px var(--font-body); }
.slot small { font: 400 13px var(--font-body); color: var(--muted); }
.slot:hover:not(:disabled) { border-color: var(--brand); }
.slot[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none; }
.slot[aria-pressed=true] small { color: #f1e4d6; }
.slots-empty, .wait-note { border-radius: var(--radius); font: 400 15px var(--font-body); }
.wait-note { border-color: var(--border); background: var(--cream); }
.pay label { border-radius: var(--radius); font: 500 15px var(--font-body); }
.pay label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--cream); }
.price { font: 600 16px var(--font-body); color: var(--accent); }
.err { text-align: left; }
.submit {
  border-radius: var(--radius); padding: 15px 28px; background: var(--brand); color: #fff;
  font: 600 17px var(--font-body); letter-spacing: 0; text-transform: none; box-shadow: var(--shadow-md);
}
.submit:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.submit::before { content: none; }
.submit::after { content: "✦"; font-size: 11px; color: #f1d98e; opacity: 1; }
/* Booking confirmation */
.result h2 { font: 700 30px/1.2 var(--font-display); letter-spacing: 0; color: var(--brand); }
.ticket { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: none; background: var(--cream); }
.ticket .label { font: 600 11px var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.ticket .ref { font: 700 34px var(--font-display); letter-spacing: .04em; color: var(--brand); }

/* ---------- Contact ---------- */
.contact-grid { justify-self: center; }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.contact-card h3 { font: 600 12px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.pill { border: 1px solid var(--brand); border-radius: var(--radius); color: var(--brand); font: 600 13px var(--font-body); letter-spacing: 0; background: var(--surface); }
.pill:hover { background: var(--brand); color: #fff; }
.sent { border-radius: var(--radius); }
.form-error { border-radius: var(--radius); }

/* ---------- Booking confirmation screens (booked, waitlist, "That Time Has Filled Up") ---------- */
/* Once a result shows, the form's heading and helper line step aside */
.wrap.page:has(> #result:not([hidden])) > .aside-link { display: none; }
.card.result {
  max-width: 580px; padding: 0 0 36px; gap: 14px; overflow: hidden; text-align: center; justify-items: center;
  border-top: 0; box-shadow: 0 30px 60px -30px rgba(58, 15, 4, .55);
}
.card.result > * { margin-inline: clamp(20px, 6vw, 40px); }
/* red velvet band with a gold star badge */
.card.result::before {
  content: "✦"; display: grid; place-items: end center; position: static; transform: none;
  width: 100%; height: 118px; margin: 0 0 22px; padding-bottom: 0; border-radius: 0; box-shadow: none;
  font-size: 0; color: transparent;
  background:
    radial-gradient(circle at 50% 100%, #fffaf0 0 36px, #d9b45f 37px 39px, transparent 40px),
    radial-gradient(circle, rgba(241, 217, 142, .28) 1px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(ellipse at 50% 0%, #5c1210 0%, #3f0c09 55%, #1f0604 100%);
}
.card.result::after {
  content: "✦"; position: absolute; top: 82px; left: 50%; transform: translateX(-50%);
  font-size: 30px; line-height: 1; color: var(--brand);
}
.card.result { position: relative; }
.result .eyebrow { text-align: center; margin-top: 4px; }
.result h2 { font: 700 clamp(28px, 4vw, 34px)/1.2 var(--font-display); color: var(--brand); margin: 0; }
.result p { margin: 0; max-width: 44ch; color: var(--muted); font-size: 16px; line-height: 1.65; }
.result p strong { color: var(--text); }
/* the booking number, as a ticket */
.result .ticket {
  position: relative; display: grid; gap: 6px; justify-items: center; margin-block: 6px;
  min-width: min(340px, 100%); padding: 20px 32px 18px;
  background: linear-gradient(180deg, #fffdf8, var(--cream)); border: 2px dashed rgba(201, 162, 78, .8);
  border-radius: var(--radius-lg); box-shadow: none;
}
.result .ticket::before, .result .ticket::after {
  content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: var(--surface); border: 2px dashed rgba(201, 162, 78, .8);
}
.result .ticket::before { left: -12px; clip-path: inset(0 0 0 50%); }
.result .ticket::after { right: -12px; clip-path: inset(0 50% 0 0); }
.result .ticket .label { font: 600 11px var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.result .ticket .ref { font: 700 clamp(36px, 6vw, 44px)/1 var(--font-display); letter-spacing: .06em; color: var(--brand); }
.result .ticket .t {
  margin-top: 4px; padding: 5px 14px; border-radius: 999px;
  background: rgba(20, 56, 34, .1); color: var(--accent); font: 600 14px var(--font-body);
}
/* next-step buttons */
.result .ghost {
  margin-top: 8px; padding: .75rem 1.5rem; min-height: 0;
  border: 2px solid var(--brand); border-radius: var(--radius); background: transparent;
  color: var(--brand); font: 600 15px var(--font-body);
}
.result .ghost:hover { background: var(--brand); color: #fff; }
.result .sugg { gap: 10px; }
.result .sugg .slot { min-width: 140px; padding: 12px 10px; background: var(--surface); border: 1px solid var(--border); }
.result .sugg .slot:hover { border-color: var(--brand); background: var(--cream); }

/* ---------- "Bookings closed" notices (closed.js picks the message) ---------- */
.notice {
  display: flex; gap: 16px; align-items: flex-start; text-align: left;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fffdf8, var(--cream)); border: 1px solid rgba(201, 162, 78, .55);
}
.notice[hidden] { display: none; }
.notice-icon {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; line-height: 1; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(201, 162, 78, .6);
}
.notice-body { display: grid; gap: 6px; min-width: 0; }
.notice-title { margin: 0; font: 700 20px/1.3 var(--font-display); color: var(--brand); }
.notice-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.notice-action { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.notice-action[hidden] { display: none; }
.notice-action .btn-primary, .notice-action .btn-secondary { padding: .65rem 1.2rem; font-size: 15px; }
/* the "late" notice gives the phone itself, so book.js's extra line isn't needed */
.notice[data-kind] #closed-contact { display: none; }
/* Book page: a centred card in place of the form */
.notice-page {
  justify-self: center; width: 100%; max-width: 620px; padding: 28px clamp(20px, 5vw, 36px);
  flex-direction: column; align-items: center; text-align: center; box-shadow: var(--shadow-lg); background: var(--surface);
}
.notice-page .notice-icon { width: 64px; height: 64px; font-size: 32px; background: var(--cream); }
.notice-page .notice-body { justify-items: center; gap: 10px; }
.notice-page .notice-title { font-size: clamp(24px, 3.4vw, 30px); }
.notice-page .notice-text { font-size: 16px; max-width: 46ch; }
.notice-page .notice-action { justify-content: center; }

.wrap.page:has(> #closed:not([hidden])) > .aside-link { display: none; }

/* ---------- Book and Contact: the hero buttons jump to the form ---------- */

#form, #msg-form { scroll-margin-top: 96px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Space between the tab bar and the form */
.wrap.page { padding-top: 22px; }

/* ---------- Phones: no lone words, numbers centred in circles, tidy link rows ---------- */
/* Every line of text balances, so no line ends on a lone word (form fields wrap normally) */
body { text-wrap: balance; }
:is(input, textarea, select) { text-wrap: wrap; }
/* Full-height figures, centred in their circles */
.step .n, legend .n { font-variant-numeric: lining-nums; line-height: 1; }

 

/* Phones: How It Works cards centred; follow-us pills big enough to tap */
@media (max-width: 759px) { .step { justify-items: center; text-align: center; } }
.pill { min-height: 40px; display: inline-flex; align-items: center; padding-inline: 16px; }

/* Follow Us: the three links share one even row */
.pill-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; width: min(100%, 360px); margin-inline: auto; }
.pill-row .pill { justify-content: center; padding-inline: 8px; }

/* Book: the map hint and "Use my current location" sit centred under the map */
.map-tools { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.map-tools .pin-state { text-align: center; }

/* Very small phones (320-380px): slightly smaller headings so their lines break evenly */
@media (max-width: 400px) { legend .tt { font-size: 20px; } }
@media (max-width: 345px) { legend .tt { font-size: 18px; } }

/* Book on phones: the Google Maps hint stays on one line */
@media (max-width: 480px) {
  .card { padding-inline: 18px; }
  #maps-hint { font-size: 13px; }
}
@media (max-width: 374px) { #maps-hint { font-size: 12.5px; } }

/* Two-button heroes from 600px: side by side only when both labels fit on one line, otherwise stacked */

.site-header { text-wrap: wrap; }
/* clip (not hidden) stops sideways scrolling without making the page its own scroller, so the menu bar stays pinned */
html, body { overflow-x: clip; overflow-y: visible; }

/* Contact form spam trap: off-screen for people, still in the page for bots */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
