/* Colours and fonts matched to the org's Cake Bake Shop Design System. */
@import url("https://fonts.googleapis.com/css2?family=Baskervville:ital@0;1&family=Jost:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap");

:root {
  --pink: #f6d7d8;
  --pink-soft: #f9f2f0;
  --pink-line: #e8e8e8;
  --charcoal: #414141;
  --text: #414141;
  /* Lighter than the design system's literal --text-muted (#6f6f6f) --
     that value read noticeably darker than this app's original muted
     tone (#8a7a7a) once applied across the admin dashboard's extensive
     secondary-text usage (stat labels, table sub-text, timestamps,
     calendar day counts). Same carve-out precedent as --ok/--err staying
     custom for on-white text: literal token for backgrounds/fills,
     legible custom shade for text. */
  --muted: #8a8a8a;
  --border: #e8e8e8;
  --ok: #2f7a3f;
  --err: #d02e2e;
  /* The brand's printed-menu gold, matching the admin dashboard's accent
     (see assets/css/admin.css --brand-gold) -- named separately here since
     site.css is shared with pages that never load admin.css. */
  --gold: #a3893b;
  /* Lighter primary-button gold, matching admin.css's --brand-gold-light
     and Feedback's --pink-deep/--gold -- Feedback's solid-color .btn uses
     this lighter shade, not the deeper --gold above. */
  --gold-light: #d4ba6c;
  --serif: "Baskervville", "Monotype Baskerville", "Libre Baskerville", Baskerville, serif;
  --sans: "Jost", "Century Gothic", "Questrial", sans-serif;
  /* Matches Feedback's --shadow exactly -- rgba(65,65,65,...) is this
     app's own --charcoal (#414141) as an rgb() triplet. */
  --shadow: 0 1px 2px rgba(65,65,65,.05), 0 8px 28px rgba(65,65,65,.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--pink-soft);
  color: var(--charcoal);
  line-height: 1.5;
}

h1 { font-family: var(--serif); font-size: 1.9rem; margin: 0 0 .3em; text-align: center; }
h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 .6em; text-align: center; }

/* Matches Feedback's .hero/.eyebrow-logo exactly, for the same page-top
   brand header on the booking wizards. */
.hero {
  text-align: center;
  padding: 56px 20px 40px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.hero h1 { margin-bottom: .25em; }
.hero::after {
  content: "";
  display: block;
  width: 64px; height: 2px;
  margin: 22px auto 0;
  background: var(--gold);
}
.eyebrow-logo {
  display: block;
  width: 300px;
  max-width: 80%;
  height: auto;
  margin: 0 auto .6em;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 .2em;
}

.wizard-page { padding: 48px 16px; }
.wizard-card {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 30px;
}
.wizard-head { margin-bottom: 20px; }
.step-indicator { text-align: center; font-size: .85rem; color: var(--muted); letter-spacing: .03em; margin-top: 6px; }

.step > * + * { margin-top: 18px; }

.error-banner {
  background: #fdecec;
  border: 1px solid var(--err);
  color: var(--err);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: .9rem;
}

.option-list { display: flex; flex-direction: column; gap: 10px; }
.radio-row, .checkbox-row { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.radio-row input, .checkbox-row input { transform: scale(1.25); }
.checkbox-row a { color: #1d4ed8; text-decoration: underline; }

/* Terms & Conditions dialog -- opened from the "I agree" link on the
   guest booking wizard's contact step. Native <dialog>: UA gives us the
   backdrop, Esc-to-close and focus trap. */
.tc-dialog {
  padding: 0;
  border: none;
  width: min(680px, calc(100vw - 32px));
  max-height: min(82vh, 920px);
  background: #fff;
  color: var(--charcoal);
  box-shadow: var(--shadow);
}
.tc-dialog::backdrop { background: rgba(65, 65, 65, .45); }
.tc-dialog[open] { display: flex; }
.tc-dialog-inner { display: flex; flex-direction: column; max-height: inherit; width: 100%; }
.tc-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--pink-line);
}
.tc-dialog-head h2 { margin: 0; font-family: var(--serif); font-size: 1.15rem; color: var(--charcoal); }
.tc-dialog-close {
  border: none; background: none; padding: 0 4px; line-height: 1;
  font-size: 1.7rem; color: var(--muted); cursor: pointer;
}
.tc-dialog-close:hover { color: var(--charcoal); }
.tc-dialog-body { padding: 4px 20px 16px; overflow-y: auto; font-size: .88rem; line-height: 1.55; }
.tc-dialog-body h3 {
  font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); margin: 20px 0 6px;
}
.tc-dialog-body ul { margin: 0; padding-left: 18px; }
.tc-dialog-body li { margin: 0 0 7px; }
.tc-dialog-body p { margin: 16px 0 0; }
.tc-dialog-foot {
  padding: 12px 20px; border-top: 1px solid var(--pink-line); text-align: right;
}

/* Location step -- a photo card per location (DWS booking wizard). */
.dws-loc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.dws-loc-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--pink-line); box-shadow: var(--shadow);
  font-family: inherit; color: inherit; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.dws-loc-card:hover { border-color: var(--gold-light); transform: translateY(-2px); }
.dws-loc-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dws-loc-card--selected { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold), var(--shadow); }
.dws-loc-media { aspect-ratio: 16 / 10; position: relative; background: var(--pink-soft); }
.dws-loc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dws-loc-media--empty {
  background: linear-gradient(135deg, var(--pink-soft), #fff 55%, rgba(212, 186, 108, .22));
}
.dws-loc-media--empty::after {
  content: ""; position: absolute; inset: 0;
  background: url("../img/cbs-gold.png") center / 88px auto no-repeat;
  opacity: .45;
}
.dws-loc-body { padding: 14px 16px 18px; }
.dws-loc-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; line-height: 1.25; color: var(--charcoal); margin: 0 0 4px; }
.dws-loc-sub { font-size: .85rem; color: var(--muted); margin: 0; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill {
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 14px;
  font-size: .9rem;
  cursor: pointer;
  transition: background-color .12s ease;
}
.pill:hover:not(:disabled) { background: var(--pink); }
.pill:disabled { opacity: .5; cursor: not-allowed; }
.pill-selected { background: var(--pink); border-color: var(--pink-line); font-weight: 600; }
.pill-wide { padding-left: 18px; padding-right: 18px; }
.pill-waitlist { border-color: var(--gold); background: #fdf6e3; color: var(--gold); font-weight: 600; }
.pill-waitlist:hover { background: var(--gold-light); color: #fff; }
.pill-waitlist.pill-selected { background: var(--gold); border-color: var(--gold); color: #fff; }

.notice {
  border: 1px solid var(--pink-line);
  background: var(--pink);
  padding: 14px;
  font-size: .9rem;
}
.notice-contact { font-weight: 600; margin-top: 6px; }

.field {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: .95rem;
  background: #fff;
}
.field-label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.field-label-standalone { font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot-pill { padding: 10px 8px; text-align: center; }
.slot-unavailable { color: var(--muted); background: var(--pink-soft); text-decoration: line-through; cursor: not-allowed; }

.guest-card {
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
}
.guest-card > * + * { margin-top: 12px; }
.guest-card legend { padding: 0 6px; font-size: 1.05rem; }

/* DWS menu-selection page only: a pink break between each guest's menu card
   (rather than the plain white-on-white list every other .guest-card usage
   gets), so each guest reads as its own white card. */
#guestSections,
#guestSectionsLocked {
  background: var(--pink-soft);
  padding: 16px;
  margin-bottom: 16px;
}
#guestSections .guest-card:last-child,
#guestSectionsLocked .guest-card:last-child {
  margin-bottom: 0;
}

.guest-menu-area { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.menu-swap-legend { font-size: .8rem; color: var(--muted); text-align: center; margin: 0; }
.menu-swap-legend .sample {
  display: inline-block; padding: 1px 7px;
  background: rgba(246,215,216,.45); border: 1px solid rgba(166,132,28,.4);
  color: var(--charcoal); font-weight: 600;
}

/* The printed "Roses of Gold" menu card border, reused directly from the
   real print artwork (assets/menu/menu-border.jpg) via border-image -- no
   manual asset slicing needed, the browser does the 9-slice work. */
.menu-card-frame {
  border-style: solid;
  border-width: 46px;
  border-image-source: url("../menu/menu-border.jpg");
  border-image-slice: 170;
  border-image-repeat: round;
  background: #fff;
  padding: 12px 20px;
  text-align: center;
  width: 100%;
}
@media (max-width: 480px) {
  .menu-card-frame { border-width: 28px; border-image-slice: 170; }
}

/* Dinner with Santa Claus menu card. The earlier attempt 9-sliced a frame
   composited from print art; a hand-drawn frame can't stretch or tile
   cleanly, so it always split or blobbed at some card height. This is a
   plain CSS double gold rule instead -- rock-solid at any size -- with the
   ribbon-and-bells bow (dws-menu-bow.png) on the top and bottom rules. */
.menu-card-frame-dws {
  position: relative;
  border: 1.5px solid var(--gold);
  border-image: none;
  padding: 46px 30px 50px;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4.5px var(--gold);
  background: #fff;
}
.menu-card-frame-dws::before,
.menu-card-frame-dws::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 104px;
  height: 58px;
  background: url("../menu/dws-menu-bow.png?v=3") center / contain no-repeat;
  pointer-events: none;
}
.menu-card-frame-dws::before { top: 0; transform: translate(-50%, -34%); }
.menu-card-frame-dws::after { bottom: 0; transform: translate(-50%, 34%) rotate(180deg); }
@media (max-width: 480px) {
  .menu-card-frame-dws { padding: 38px 20px 42px; }
  .menu-card-frame-dws::before,
  .menu-card-frame-dws::after { width: 88px; height: 50px; }
}

.menu-card-diet-label { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 8px 0 0; }
.menu-card-wordmark { display: block; margin: -4px auto -12px; width: 208px; height: auto; }

.menu-divider { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.menu-divider .line { flex: 1; height: 1px; background: rgba(166,132,28,.5); }
.menu-divider .label { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); font-weight: 600; white-space: nowrap; }
.menu-divider-hint { font-size: .62rem; letter-spacing: .02em; color: var(--muted); font-style: italic; margin: 2px 0 0; }

.menu-fixed-item p { margin: 0; }
.menu-fixed-item .name { font-size: .88rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--charcoal); }
.menu-fixed-item .desc { font-size: .78rem; color: var(--text); margin-top: 4px; padding: 0 8px; }

/* A menu category with more than one active item (e.g. an Entree choice of
   several dishes) -- each option shown in full with its description, click
   to select, radio-group behavior instead of a <select> dropdown. */
.menu-option-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.menu-option {
  display: block; width: 100%; text-align: left; font-family: inherit;
  border: 1px solid var(--pink-line); background: #fff; border-radius: 0;
  padding: 10px 14px; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.menu-option:hover { border-color: var(--gold-light); }
.menu-option:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.menu-option--selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: var(--pink-soft); }
.menu-option .name { margin: 0; font-size: .88rem; font-weight: 600; color: var(--charcoal); }
.menu-option .desc { margin: 4px 0 0; font-size: .78rem; color: var(--text); }

.menu-sandwich-slots { display: flex; flex-direction: column; gap: 12px; }
.menu-sandwich-slot .desc { font-size: .78rem; color: var(--text); margin-top: 6px; padding: 0 8px; }

.menu-swap-wrap { position: relative; }
.menu-swap-select {
  appearance: none; -webkit-appearance: none; width: 100%; box-sizing: border-box;
  background: rgba(246,215,216,.25); border: 1px solid rgba(166,132,28,.4);
  padding: 7px 30px 7px 16px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--charcoal);
  text-transform: uppercase; letter-spacing: .02em; text-align: center; cursor: pointer;
}
.menu-swap-select:hover, .menu-swap-select:focus { background: rgba(246,215,216,.45); border-color: var(--gold); outline: none; }
.menu-swap-chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 8px; pointer-events: none; color: var(--gold);
}

.menu-card-patisserie p { margin: 0 0 4px; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--charcoal); }

/* -------------------------------------------------------- welcome cards --- */
.welcome-print-page {
  min-height: 100vh; background: rgba(246,215,216,.2);
  display: flex; flex-direction: column; align-items: center; padding: 40px 16px; gap: 24px; box-sizing: border-box;
}
.welcome-print-controls { display: flex; align-items: center; gap: 12px; }
.welcome-card {
  background: #fff; width: 100%; max-width: 440px; padding: 64px 40px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: var(--shadow);
}
.welcome-card-wordmark { width: 256px; height: auto; margin-bottom: 32px; }
.welcome-card-greeting, .welcome-card-poem {
  font-family: 'Pinyon Script', cursive; color: var(--gold); margin: 0 0 12px;
  /* Without this, some browsers/printers quietly substitute a plain black
     for print output regardless of the author-specified color. */
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.welcome-card-greeting { font-size: 2.25rem; line-height: 2.5rem; }
.welcome-card-poem { font-size: 1.875rem; line-height: 2.25rem; }
.welcome-card-poem:last-child { margin-bottom: 0; }

@media print {
  .welcome-print-page { background: #fff; padding: 0; gap: 0; }
  .welcome-card {
    box-shadow: none;
    max-width: none;
    width: 100%;
    /* Fills the printable area of a 5.5x8.5in half-letter sheet (page size
       minus the @page margin below on both sides), so the card centers
       vertically on the physical page instead of hugging the top. */
    min-height: 7.5in;
    justify-content: center;
  }
  .print-hide { display: none !important; }
  .welcome-card-break { page-break-after: always; break-after: page; }
  @page { size: 5.5in 8.5in; margin: 0.5in; }
}

/* ------------------------------------------------------ restaurant sheets --- */
.sheet-print-page { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; }
.sheet-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.sheet-header { border-bottom: 2px solid var(--charcoal); padding-bottom: 12px; margin-bottom: 16px; }
.sheet-header h1 { text-align: left; font-size: 1.5rem; margin: 0; }
.sheet-header .sub { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.sheet-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: .85rem; margin-bottom: 20px; }
.sheet-meta .lbl { display: block; font-size: .72rem; color: var(--muted); }

.sheet-guest { border-top: 1px solid var(--pink-line); padding: 12px 0; }
.sheet-guest:first-of-type { border-top: none; }
.sheet-guest-name { font-weight: 700; font-size: 1rem; margin: 0 0 4px; }
.sheet-guest-name .tag { font-weight: 400; color: var(--muted); font-size: .8rem; }
.sheet-course-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 6px 0 1px; }
.sheet-item { margin: 0; font-size: .92rem; }
.sheet-flag { color: var(--err); font-weight: 700; }
.sheet-allergy { color: var(--err); font-weight: 600; }

.sheet-totals { border-top: 2px solid var(--charcoal); margin-top: 20px; padding-top: 12px; font-size: .92rem; }
.sheet-totals .line { display: flex; justify-content: space-between; padding: 2px 0; }
.sheet-totals .grand { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--pink-line); margin-top: 6px; padding-top: 6px; }

@media print {
  .sheet-print-page { max-width: none; padding: 0; }
}

.review-summary { font-size: .95rem; }
.review-guests { font-size: .9rem; padding-left: 1.2em; }
.review-totals { border-top: 1px solid var(--pink-line); padding-top: 10px; font-size: .9rem; }
.review-total-line { font-weight: 700; font-size: 1.05rem; color: var(--charcoal); }
.policy-list { border-top: 1px solid var(--pink-line); padding-top: 10px; font-size: .8rem; color: var(--muted); }
.policy-list p { margin: 0 0 4px; }
.policy-emphasis { color: var(--charcoal); font-weight: 600; }

.button-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.btn {
  border: 1px solid var(--gold-light);
  background: var(--gold-light);
  color: #fff;
  padding: 11px 22px;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(212,186,108,.28);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(212,186,108,.32); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: #fff; color: var(--charcoal); border-color: var(--border); box-shadow: none;
}
.btn-secondary:hover:not(:disabled) { background: var(--pink-soft); transform: none; box-shadow: none; }

/* --------------------------------------------------------- confirmation --- */
.confirmation-page { padding: 48px 16px; }
.confirmation-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 34px;
  text-align: center;
}
.confirmation-code {
  font-family: monospace;
  font-size: 1.4rem;
  letter-spacing: .1em;
  background: var(--pink-soft);
  padding: 10px;
  margin: 14px 0;
}
.confirmation-status-pending { color: var(--gold); }
.confirmation-status-confirmed { color: var(--ok); }
