/*
 * The booking page inside a tenant's PartyPad website
 * (components/storefront/BookingFrame.tsx). The wizard is built on the shadcn
 * tokens of globals.css, so each chrome sets every one of them here, light
 * values in that design's palette, plus its font and how far a sticky panel
 * keeps below the site's own sticky header.
 *
 * Page-wide (`html:has(...)`), not on the frame: Radix popups (selects,
 * dialogs) render in <body>, outside it. The selector also outranks `.dark`,
 * so a framed page stays light in dark mode like the site around it; the
 * `dark:` utilities are switched off for it in tailwind.config.js.
 *
 * One rule per chrome key (shellKeyOf in components/site/SiteShell.tsx). A new
 * design without one fails designs/__tests__/bookingTheme.test.ts. The owner's
 * own colour, where the design uses it, is set after this by BookingFrame.
 */

html:has(.pp-booking) {
  color-scheme: light;
  --destructive: 0 72% 45%;
  --destructive-foreground: 0 0% 100%;
}

/* ---- standard: StandardChrome (the default pack and older sites) ------- */
html:has(.pp-booking--standard) {
  --background: 0 0% 100%;
  --foreground: 220.9 39.3% 11%;
  --card: 0 0% 100%;
  --card-foreground: 220.9 39.3% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 220.9 39.3% 11%;
  --primary: 220.9 39.3% 11%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 220.9 39.3% 11%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 215 13.8% 34.1%;
  --accent: 220 14.3% 95.9%;
  --accent-foreground: 220.9 39.3% 11%;
  --border: 220 13% 91%;
  --input: 220 8.9% 46.1%;
  --ring: 220.9 39.3% 11%;
  --radius: 0.5rem;
  --booking-sticky-top: 5.5rem;
}
html:has(.pp-booking--standard) body {
  font-family: ui-sans-serif, system-ui, sans-serif;
}

/* ---- midway ------------------------------------------------------------- */
html:has(.pp-booking--midway) {
  --background: 42.9 100% 98.6%;
  --foreground: 252 19.2% 10.2%;
  --card: 0 0% 100%;
  --card-foreground: 252 19.2% 10.2%;
  --popover: 0 0% 100%;
  --popover-foreground: 252 19.2% 10.2%;
  --primary: 225 70% 44%;
  --primary-foreground: 0 0% 100%;
  --secondary: 40 45.5% 93.5%;
  --secondary-foreground: 252 19.2% 10.2%;
  --muted: 40 45.5% 93.5%;
  --muted-foreground: 255 10.1% 31%;
  --accent: 40 45.5% 93.5%;
  --accent-foreground: 252 19.2% 10.2%;
  --border: 40 31.3% 86.9%;
  --input: 260 6.8% 57.1%;
  --ring: 225 70% 44%;
  --radius: 1rem;
  --booking-sticky-top: 1.5rem;
}
html:has(.pp-booking--midway) body {
  font-family: "Figtree", ui-sans-serif, system-ui, sans-serif;
}

/* ---- faithfun: its own palette, never the owner's colours -------------- */
html:has(.pp-booking--faithfun) {
  --background: 0 0% 95.7%;
  --foreground: 240 13% 21.2%;
  --card: 0 0% 100%;
  --card-foreground: 240 13% 21.2%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 13% 21.2%;
  --primary: 24.7 84.6% 38.2%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 7.3% 92%;
  --secondary-foreground: 240 13% 21.2%;
  --muted: 240 7.3% 92%;
  --muted-foreground: 240 8.1% 38.8%;
  --accent: 240 7.3% 92%;
  --accent-foreground: 240 13% 21.2%;
  --border: 240 9.4% 87.5%;
  --input: 240 5.4% 56.5%;
  --ring: 24.7 84.6% 38.2%;
  --radius: 1.25rem;
  --booking-sticky-top: calc(max(60px, 3.54vw) + 1.5rem);
}
html:has(.pp-booking--faithfun) body {
  font-family: "raleway", Arial, sans-serif;
}
/* Its header sits over the page's top on purpose (pack.css .ff-header). */
.pp-booking--faithfun {
  padding-top: var(--ff-header, 60px);
}

/* ---- firstdue: its own palette, never the owner's colours -------------- */
html:has(.pp-booking--firstdue) {
  --background: 0 0% 100%;
  --foreground: 216 9.8% 10%;
  --card: 0 0% 100%;
  --card-foreground: 216 9.8% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 216 9.8% 10%;
  --primary: 356.4 85.6% 38.2%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 216 9.8% 10%;
  --muted: 220 14.3% 95.9%;
  --muted-foreground: 208.4 9.9% 37.5%;
  --accent: 220 14.3% 95.9%;
  --accent-foreground: 216 9.8% 10%;
  --border: 214.3 11.1% 87.6%;
  --input: 215 5.4% 56.5%;
  --ring: 356.4 85.6% 38.2%;
  --radius: 0.375rem;
  --booking-sticky-top: 6rem;
}
html:has(.pp-booking--firstdue) body {
  font-family: system-ui, sans-serif;
}

/* ---- firehouse: First Due's own palette (engine red, turnout gold) ---- */
html:has(.pp-booking--firehouse) {
  --background: 36 33.3% 97.1%;
  --foreground: 216 10.6% 9.2%;
  --card: 0 0% 100%;
  --card-foreground: 216 10.6% 9.2%;
  --popover: 0 0% 100%;
  --popover-foreground: 216 10.6% 9.2%;
  --primary: 350.2 85.2% 42.4%;
  --primary-foreground: 0 0% 100%;
  --secondary: 32.7 31.4% 93.1%;
  --secondary-foreground: 216 10.6% 9.2%;
  --muted: 32.7 31.4% 93.1%;
  --muted-foreground: 30 5.9% 33.3%;
  --accent: 32.7 31.4% 93.1%;
  --accent-foreground: 216 10.6% 9.2%;
  --border: 34.3 19.4% 85.9%;
  --input: 32 6.3% 53.1%;
  --ring: 350.2 85.2% 42.4%;
  --radius: 0.375rem;
  --booking-sticky-top: 1.5rem;
}
html:has(.pp-booking--firehouse) body {
  font-family: "Barlow", ui-sans-serif, system-ui, sans-serif;
}
/* The wizard's headings in the site's apparatus lettering. */
.pp-booking--firehouse :is(h1, h2, h3) {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
