/* Christmas dress for the portal, the staff app and the booking flow.
 *
 * Scoped entirely under html.gpp-christmas, which only the seasonal gate puts
 * on the document element (src/lib/christmas.ts). Remove the class and the
 * app is byte-for-byte what it was — no screen is forked, this is an overlay.
 *
 * ── BASED ON THE LANDING PAGE ───────────────────────────────────────────
 * Jake, 27 Nov: "I really like the design of our landing page. maybe our
 * whole app seasonal design can be based on that." So everything here is
 * taken from /go/meet's Christmas dress (public/go/cc-christmas.css):
 *
 *   • its palette — Christmas red #C8102E, green #165B33, gold #F0C14B;
 *   • its night sky — #0B1E3F into #16345F, stars, the string of lights in
 *     the same four bulb colours, Santa's sleigh with Rudolph lit;
 *   • its snowfield — the icy white its light sections sit on, and cards
 *     with a red (or green) rule across the top;
 *   • its snowscape — pines, the cabin with lit windows, the snowman, the
 *     dog, a snow drift at every seam.
 *
 * ── WHY THE PAGE IS STILL LIGHT ─────────────────────────────────────────
 * The landing hero is a night sky because every word on it was written for
 * one. The app's screens were written for a light page, and the Halloween
 * dress showed what inverting them costs: 400-odd `text-white` uses to
 * re-prove, form controls turning into slabs, and a booking flow that got
 * too dark to book in. So the night goes where no text is — a band under the
 * header, and the banner on the booking-confirmed screen — and the page is
 * the snowfield. Text gets MORE readable, not less. Measured against a card
 * (#FFFFFF), with the Tailwind value it replaces in brackets:
 *
 *   text-brand-dark   #132238  15.99:1  [#1A1A1A  17.4:1]
 *   text-gray-700/600 #33455E   9.75:1  [#4B5563   7.6:1]
 *   text-gray-500     #43566F   7.50:1  [#6B7280   4.8:1]
 *   text-gray-400     #52657F   5.95:1  [#9CA3AF   2.8:1]  ← was below AA
 *   white on CTA      #C8102E   5.88:1  [#F25C4C   3.3:1]  ← was below AA
 *   text-brand-coral  #B00E29   7.14:1  [#F25C4C   3.3:1]  ← was below AA
 *   text-brand-green  #165B33   8.14:1  [#77BB41   2.3:1]  ← was below AA
 *
 * scripts/check-christmas-theme.ts parses that table, recomputes every row
 * from the custom properties below, and fails if a number has drifted from
 * the colour it describes. It also checks every ink on every surface, the
 * sky, the snowfall, and every colour in the art behind the page.
 *
 * ── THE RULES FROM THE THANKSGIVING DRESS, KEPT ─────────────────────────
 * (public/thanksgiving/harvest.css explains each one at length.)
 * 1. text-white is never remapped: 400-odd uses sit on bg-brand-coral.
 * 2. Nothing sets transform/filter on a wide selector — either makes an
 *    element the containing block for its position:fixed descendants.
 * 3. Form controls are not touched: not their background, border or ring.
 * 4. Semantic colours (red/amber/green/blue panels) are not touched.
 * 5. --xm-gold is decoration only. It is never text.
 *
 * Specificity is `html.gpp-christmas x` (0,2,1): beats a bare utility and a
 * hover variant with no !important. The portal layout mounts this stylesheet
 * BEFORE the shell's portal-themes/themes.css, so a Pet Pal Plus member's
 * chosen theme still wins inside the page: a seasonal dress is ours, a theme
 * is theirs.
 *
 * Everything animates transform, opacity or background-position. The
 * reduced-motion block stops all of it; the print block takes the dress off.
 */

html.gpp-christmas {
  /* the snowfield, lightest to deepest */
  --xm-card: #FFFFFF; /* bg-white */
  --xm-page: #F2F6FC; /* page */
  --xm-raised: #F0F5FB; /* gray-50, brand-cream-light */
  --xm-sunken: #E6EEF8; /* gray-100, brand-cream — every ink is sized against this */
  --xm-fill: #D8E2EF; /* gray-200 */
  --xm-fill-2: #C5D2E3; /* gray-300 */

  /* THE SKY FLOOR: the darkest the backdrop composites to anywhere text can
     sit on it — the far snow hills at the foot of the viewport. Page headings
     and subtitles are not in cards; they sit on the sky, and scroll through
     the hills. The check derives this from the art and fails if it drifts. */
  --xm-sky-floor: #E1EAF6;

  /* ink: the winter night, four rungs, all AA on every surface above */
  --xm-ink: #132238; /* primary */
  --xm-ink-2: #33455E; /* gray-600/700 */
  --xm-ink-3: #43566F; /* gray-500 */
  --xm-ink-4: #52657F; /* gray-400 */

  /* lines */
  --xm-line: #E3EAF4;
  --xm-line-2: #CFDAE8;

  /* Christmas red. Two of them: the FILL is the landing page's own #C8102E
     (white on it 5.9:1); the INK is deeper, because 39 elements put
     text-brand-coral directly on a bg-brand-coral/10 tint of the same hue —
     the nav's active tab among them — and that is the tightest pairing in
     the app. */
  --xm-cta: #C8102E;
  --xm-cta-hover: #A50D26;
  --xm-cta-ink: #B00E29;
  --xm-cta-soft: rgba(200, 16, 46, 0.07);
  --xm-cta-soft-2: rgba(200, 16, 46, 0.12);

  /* Christmas green, as text */
  --xm-green: #165B33;

  /* decoration only — see rule 5 */
  --xm-gold: #F0C14B;
  --xm-gold-deep: #D9A21E;

  /* the night: bg-brand-dark, the strip under the header, the confirmation */
  --xm-night: #0B1E3F;
  --xm-night-2: #16345F;

  /* HOW LOUD THE SNOW BEHIND THE PAGE MAY BE. A flake behind the page is the
     background of any text that is not in a card, so the check holds every
     ink over the palest-to-deepest flake in SNOW_TONES at this opacity:
     4.5:1 for the main inks, 3.5:1 for text-gray-400 (muted meta text that
     is almost always inside a card, and 2.8:1 on the same page undressed). */
  --xm-drift-opacity: 0.55;

  /* shadows, cooled. Same strength as Tailwind's, night-blue not black. */
  --xm-shadow: rgba(18, 42, 80, 0.1);
  --xm-shadow-deep: rgba(18, 42, 80, 0.18);
}

/* ONLY <html> GETS A BACKGROUND. <body> MUST STAY TRANSPARENT: globals.css
   paints body opaque white, and in-flow backgrounds paint ABOVE negative
   z-index descendants — so without this the sky at z-index -1 sits behind a
   white wall. (Same rule, same reason, as harvest.css.) */
html.gpp-christmas {
  background: var(--xm-page);
  color: var(--xm-ink);
}

html.gpp-christmas body {
  background: transparent;
  color: var(--xm-ink);
}

/* ======================================================================
   THE SKY — fixed, behind everything
   ====================================================================== */

/* A fixed element at -1 rather than a fixed body background: that keyword
   repaints on every scroll frame in iOS WKWebView. overflow:hidden is not
   optional — any art that pokes past the viewport would widen the PAGE,
   which in WKWebView is "the whole app slides sideways". */
.xm-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    /* the moon's light, kept in lockstep with .xm-moon below */
    radial-gradient(circle at 88% 22%, rgba(255, 246, 222, 0.75) 0, rgba(255, 240, 205, 0.22) 9%, transparent 22%),
    /* a winter afternoon: ice blue overhead, snow-white at the horizon */
    linear-gradient(180deg, #E5EEFA 0%, #EDF3FC 42%, #F7FAFE 100%);
}

/* The landing page's moon, in daylight. Lighter than the page, so a heading
   passing in front of it gains contrast rather than losing it. Low enough to
   clear the sticky header and its night strip on a phone and a computer
   alike, or it sits half-hidden behind them. */
.xm-moon {
  position: absolute;
  top: clamp(132px, 19vh, 190px);
  right: 7%;
  width: clamp(44px, 6.5vw, 74px);
  height: clamp(44px, 6.5vw, 74px);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #FFFDF6 0%, #FFF5DA 58%, #F7E8C4 100%);
  box-shadow: 0 0 40px rgba(240, 193, 75, 0.2), 0 0 110px rgba(240, 193, 75, 0.1);
}

/* THE SNOWSCAPE along the foot of the viewport: far hills, the treeline, the
   cabin and the snowman, then a near bank of snow in front of the trunks.
 *
 * It is all in the sky at z-index -1, so an opaque card hides it and it shows
 * through the margins and gaps. It is NOT text-free space — the page scrolls
 * through a fixed layer, so a heading can come to rest on a pine — which is
 * why the art is drawn in daylight mid-tones rather than the landing page's
 * night colours, and why the check reads every fill and stroke out of every
 * one of these SVGs and requires the main ink to clear AA on all of them. */
.xm-hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(72px, 9vw, 118px);
  background: url("snow-far.svg") left bottom / 600px 100% repeat-x;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 46%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 46%);
}

.xm-pine,
.xm-cabin,
.xm-snowman {
  position: absolute;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: contain;
}

.xm-pine {
  background-image: url("pine.svg");
}

/* the two anchors, tallest and nearest — the only two a phone keeps */
.xm-pine-1 {
  left: -22px;
  bottom: 10px;
  width: clamp(108px, 13vw, 186px);
  height: clamp(180px, 21.7vw, 310px);
  opacity: 0.92;
}
.xm-pine-6 {
  right: -22px;
  bottom: 10px;
  width: clamp(108px, 13vw, 186px);
  height: clamp(180px, 21.7vw, 310px);
  opacity: 0.92;
  /* Mirrored so the two ends do not rhyme. A transform on a leaf-node
     decoration with no fixed descendants — rule 2 is about wide selectors. */
  transform: scaleX(-1);
}

/* further back: smaller and fainter, toward the middle where content lives */
.xm-pine-2 {
  left: 11%;
  bottom: 22px;
  width: clamp(70px, 8vw, 116px);
  height: clamp(116px, 13.3vw, 194px);
  opacity: 0.6;
}
.xm-pine-5 {
  right: 12.5%;
  bottom: 24px;
  width: clamp(64px, 7.4vw, 106px);
  height: clamp(106px, 12.3vw, 176px);
  opacity: 0.56;
}

/* the cabin from the landing page's snowscape, windows lit */
.xm-cabin {
  left: 19%;
  bottom: 20px;
  width: clamp(132px, 13vw, 210px);
  height: clamp(101px, 9.97vw, 161px);
  background-image: url("cabin.svg");
  opacity: 0.88;
}

.xm-snowman {
  right: 23%;
  bottom: 16px;
  width: clamp(58px, 5.6vw, 88px);
  height: clamp(85px, 8.2vw, 129px);
  background-image: url("snowman.svg");
}

/* the near bank, in front of the trunks so the trees stand IN the snow */
.xm-snowbank {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(40px, 4.6vw, 60px);
  background: url("snow-near.svg") left bottom / 480px 100% repeat-x;
}

/* A phone is 390px wide. Keep the two anchor pines, the snowman and the
   snow; the rest would sit behind the single column of cards anyway. */
@media (max-width: 700px) {
  .xm-pine-2,
  .xm-pine-5,
  .xm-cabin {
    display: none;
  }
  .xm-snowman {
    right: 21%;
  }
}

/* ── THE DOG IN THE SANTA HAT ──
 *
 * The landing page's snowscape has a dog hopping between the snowball
 * throwers; the app's has a golden pup — ours, in a Santa hat — trotting
 * along the snowbank, then off-screen for a while, then back. "full" (the
 * portal) only. Two elements and two clocks, like the Thanksgiving turkey:
 * the wrapper carries the journey, the pup inside carries the trot, because
 * both are `transform` on different timings. Palest masses are asserted by
 * the check (PALE_PUP) — it walks behind the page, so a heading can rest on
 * it. */
.xm-dog-walk {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: clamp(56px, 6.4vw, 82px);
  height: clamp(40px, 4.5vw, 57px);
  opacity: 0;
  animation: xmTrotAcross 46s linear infinite;
  will-change: transform;
}

.xm-pup {
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: xmTrotBob 0.46s ease-in-out infinite;
}

.xm-pup .xm-leg {
  transform-box: fill-box;
  transform-origin: 50% 0;
}
.xm-pup .xm-leg-a {
  animation: xmStride 0.46s ease-in-out infinite;
}
.xm-pup .xm-leg-b {
  animation: xmStride 0.46s ease-in-out infinite reverse;
}
.xm-pup .xm-tail {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: xmWag 0.38s ease-in-out infinite alternate;
}

@keyframes xmTrotAcross {
  0% { opacity: 0; transform: translate3d(-12vw, 0, 0); }
  3% { opacity: 0.96; }
  62% { opacity: 0.96; }
  66% { opacity: 0; transform: translate3d(112vw, 0, 0); }
  100% { opacity: 0; transform: translate3d(112vw, 0, 0); }
}
@keyframes xmTrotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes xmStride {
  0%, 100% { transform: rotate(22deg); }
  50% { transform: rotate(-22deg); }
}
@keyframes xmWag {
  from { transform: rotate(-14deg); }
  to { transform: rotate(16deg); }
}

/* ======================================================================
   THE NIGHT STRIP — the landing page's sky, under the app's header
   ======================================================================

   This is where the dress announces itself, in the one place on every
   screen that text never goes: padding the header ADDS for it (so it cannot
   land on the nav row however the header is laid out), the way the
   Thanksgiving garland did. Full strength, because nothing is read through
   it: the night sky, stars, the string of lights in the landing page's four
   bulb colours, snow drifted along the bottom edge — and, on the portal,
   Santa's sleigh crossing it.

   Layers, front to back: the drift, the lights, the stars, the night. The
   bulbs' glow and the sleigh are the two pseudo-elements below, because they
   are the parts that move and a background layer cannot animate on its own.

   `.border-gray-100` is what picks out the app's TOP-LEVEL headers — the
   portal's, the staff app's and the booking flow's first page all carry it.
   The Messages panels have white headers of their own (border-black/5) that
   sit under the shell's, and a second strip there would stack two nights on
   one screen. */
html.gpp-christmas header.bg-white.border-gray-100 {
  padding-bottom: 30px;
  /* A stacking context of its own, so the z-index:-1 glow and sleigh paint
     just above this background and BELOW the header's content — including
     the account menu, which drops down across the strip. */
  isolation: isolate;
  background-color: var(--xm-card);
  background-image:
    url("snow-edge.svg"),
    url("lights.svg"),
    url("stars.svg"),
    linear-gradient(180deg, var(--xm-night) 0%, var(--xm-night-2) 100%);
  background-position: left bottom, left bottom, left bottom, left bottom;
  background-size: 240px 9px, 168px 30px, 300px 30px, 100% 30px;
  background-repeat: repeat-x, repeat-x, repeat-x, no-repeat;
}

/* The pseudo-elements are positioned against the header. The portal's and
   the staff app's headers are sticky, which already makes them a containing
   block — and must STAY sticky, hence the :not(). The booking flow's first
   page has a plain header that needs it said. */
html.gpp-christmas header.bg-white.border-gray-100:not(.sticky):not(.fixed):not(.absolute) {
  position: relative;
}

html.gpp-christmas header.bg-white.border-gray-100::before,
html.gpp-christmas header.bg-white.border-gray-100::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  z-index: -1;
  pointer-events: none;
}

/* the bulbs' glow */
html.gpp-christmas header.bg-white.border-gray-100::before {
  background: url("lights-glow.svg") left bottom / 168px 30px repeat-x;
  opacity: 0.8;
}

/* Santa. Parked toward the right while nothing may move (the staff app, the
   booking flow, reduced motion) — static art, like the trees.
 *
 * WHY background-position AND NOT A TRANSFORM, when everything else that
 * moves here uses transform: a transformed box that slides past the right
 * edge of the screen extends the page's scrollable width (the header cannot
 * clip — its menus drop out of it). A background is clipped to its own box
 * for free. Percentages rather than calc() so every engine interpolates it;
 * -45% and 145% put the sleigh fully off both ends at any width from a phone
 * up. */
html.gpp-christmas header.bg-white.border-gray-100::after {
  background-image: url("sleigh.svg");
  background-repeat: no-repeat;
  background-size: auto 22px;
  background-position: 88% 2px;
}

html.gpp-christmas.xm-lively header.bg-white.border-gray-100::before {
  animation: xmTwinkle 2.8s ease-in-out infinite;
}
html.gpp-christmas.xm-lively header.bg-white.border-gray-100::after {
  background-position: -45% 3px;
  animation: xmSleigh 38s linear infinite 4s;
}

@keyframes xmTwinkle {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.35; }
}

/* Across in about 17 seconds, then the strip is just the night for the
   rest of the lap. */
@keyframes xmSleigh {
  0% { background-position: -45% 4px; }
  12% { background-position: -6% 1px; }
  24% { background-position: 33% 4px; }
  36% { background-position: 72% 1px; }
  46% { background-position: 145% 3px; }
  100% { background-position: 145% 3px; }
}

/* The coral hairline at the top of the header becomes the landing hero's
   gold-red-green rule. Only the one that is a bare `h-1 bg-brand-coral`
   (the portal's desktop accent); the phone's safe-area band keeps a plain
   red fill, because a stripe under the clock reads as a rendering fault. */
html.gpp-christmas header .h-1.bg-brand-coral {
  height: 3px;
  background-image: repeating-linear-gradient(90deg, #F0C14B 0 14px, #C8102E 14px 28px, #165B33 28px 42px);
}

/* The booking flow's own header is a red band with white type. It gets the
   landing hero's string of lights across the top, in room it makes for them,
   and nothing else: this is the flow that takes the money. */
html.gpp-christmas header.bg-brand-coral {
  padding-top: 18px;
  background-image: url("lights.svg");
  background-position: left top;
  background-size: 168px 30px;
  background-repeat: repeat-x;
}

/* ======================================================================
   SURFACES — the re-skin
   ====================================================================== */

/* Cards. A frost along the top edge — the landing page's cards fade from ice
   blue to white — done as a background-image so it cannot touch the
   box-shadow every card uses for elevation. Not on form controls (rule 3).
   :where() inside the :not() keeps this at (0,2,1) — a bare :not(input)
   would raise it to (0,2,2), tie the header's rule above, and, coming later
   in the file, wipe the night strip off the header. */
html.gpp-christmas .bg-white {
  background-color: var(--xm-card);
}
html.gpp-christmas .bg-white:not(:where(input, select, textarea)) {
  background-image: linear-gradient(rgba(214, 229, 248, 0.42), rgba(214, 229, 248, 0) 84px);
}

/* THE RULE ACROSS THE TOP OF A CARD — the landing page's most recognisable
   card detail: red, and green on every other one. Only the app's canonical
   card (`bg-white rounded-2xl … shadow-sm`, 450-odd of them), never a modal,
   menu, button or input. A background layer rather than a border, so no
   card's box changes size and nothing on any screen moves by a pixel; the
   rounded corners clip it into a cap. It sits in the card's padding, where
   there is no text. */
html.gpp-christmas .bg-white.rounded-2xl.shadow-sm {
  background-image:
    linear-gradient(var(--xm-cta), var(--xm-cta)),
    linear-gradient(rgba(214, 229, 248, 0.42), rgba(214, 229, 248, 0) 84px);
  background-size: 100% 3px, auto;
  background-position: left top, left top;
  background-repeat: no-repeat, no-repeat;
}
html.gpp-christmas .bg-white.rounded-2xl.shadow-sm:nth-child(even) {
  background-image:
    linear-gradient(#1E7A46, #1E7A46),
    linear-gradient(rgba(214, 229, 248, 0.42), rgba(214, 229, 248, 0) 84px);
}

/* Elevation, cooled. Tailwind's shadows are neutral black, which on a snow
   page reads as a grey smudge rather than a shadow. */
html.gpp-christmas .shadow-sm {
  box-shadow: 0 1px 2px var(--xm-shadow);
}
html.gpp-christmas .shadow,
html.gpp-christmas .shadow-md {
  box-shadow: 0 2px 10px var(--xm-shadow);
}
html.gpp-christmas .shadow-lg,
html.gpp-christmas .shadow-xl,
html.gpp-christmas .shadow-2xl {
  box-shadow: 0 14px 40px var(--xm-shadow-deep);
}

html.gpp-christmas .bg-gray-50,
html.gpp-christmas .bg-brand-cream-light {
  background-color: var(--xm-raised);
}

html.gpp-christmas .bg-brand-cream {
  background-color: var(--xm-sunken);
}

/* THE PAGE WRAPPER MUST NOT PAINT, or there is no sky. All three shells
   open with `<div className="min-h-screen bg-brand-cream-light">`, as do
   30-odd pages; the rule above would make each an opaque slab over the sky.
   Scoped to `.min-h-screen.<bg>` so it only catches a full-page wrapper.
   bg-gradient-to-br is /book/[business]/service's loading screen. */
html.gpp-christmas .min-h-screen.bg-brand-cream-light,
html.gpp-christmas .min-h-screen.bg-brand-cream,
html.gpp-christmas .min-h-screen.bg-gray-50,
html.gpp-christmas .min-h-screen.bg-white,
html.gpp-christmas .min-h-screen.bg-gradient-to-br {
  background-color: transparent;
  background-image: none;
}

html.gpp-christmas .bg-gray-100 {
  background-color: var(--xm-sunken);
}
html.gpp-christmas .bg-gray-200 {
  background-color: var(--xm-fill);
}
html.gpp-christmas .bg-gray-300 {
  background-color: var(--xm-fill-2);
}
html.gpp-christmas .hover\:bg-gray-50:hover,
html.gpp-christmas .hover\:bg-gray-100:hover {
  background-color: var(--xm-sunken);
}

/* Dark surfaces become the night. White on #0B1E3F is 16.5:1. */
html.gpp-christmas .bg-brand-dark {
  background-color: var(--xm-night);
}
html.gpp-christmas .bg-brand-dark-secondary,
html.gpp-christmas .hover\:bg-brand-dark-secondary:hover {
  background-color: var(--xm-night-2);
}

/* Modal scrim — the night, and kept dark: its whole job is to push the page
   back behind the modal. */
html.gpp-christmas .bg-black\/40,
html.gpp-christmas .bg-black\/50,
html.gpp-christmas .bg-black\/60 {
  background-color: rgba(7, 21, 47, 0.55);
}

/* ── ink ── */
html.gpp-christmas .text-brand-dark,
html.gpp-christmas .text-gray-900,
html.gpp-christmas .text-gray-800 {
  color: var(--xm-ink);
}
html.gpp-christmas .text-brand-dark\/80 {
  color: rgba(19, 34, 56, 0.82);
}
html.gpp-christmas .text-brand-dark\/70 {
  color: rgba(19, 34, 56, 0.74);
}
html.gpp-christmas .text-brand-dark\/60 {
  color: rgba(19, 34, 56, 0.68);
}
html.gpp-christmas .text-gray-700,
html.gpp-christmas .text-gray-600 {
  color: var(--xm-ink-2);
}
html.gpp-christmas .text-gray-500 {
  color: var(--xm-ink-3);
}
html.gpp-christmas .text-gray-400 {
  color: var(--xm-ink-4);
}
html.gpp-christmas .hover\:text-brand-dark:hover {
  color: var(--xm-ink);
}

/* ── lines ── */
html.gpp-christmas .border-gray-100,
html.gpp-christmas .divide-gray-100 > * + *,
html.gpp-christmas .divide-gray-50 > * + * {
  border-color: var(--xm-line);
}
html.gpp-christmas .border-gray-200,
html.gpp-christmas .border-gray-300,
html.gpp-christmas .divide-gray-200 > * + * {
  border-color: var(--xm-line-2);
}

/* ── the red ── */
html.gpp-christmas .bg-brand-coral,
html.gpp-christmas .hover\:bg-brand-coral:hover {
  background-color: var(--xm-cta);
}
html.gpp-christmas .hover\:bg-brand-coral-hover:hover,
html.gpp-christmas .bg-brand-coral-hover {
  background-color: var(--xm-cta-hover);
}
html.gpp-christmas .hover\:bg-brand-coral\/90:hover {
  background-color: rgba(200, 16, 46, 0.9);
}

html.gpp-christmas .text-brand-coral,
html.gpp-christmas .hover\:text-brand-coral:hover {
  color: var(--xm-cta-ink);
}
html.gpp-christmas .text-brand-coral-hover,
html.gpp-christmas .hover\:text-brand-coral-hover:hover {
  color: var(--xm-cta-hover);
}

/* The tints. All of them land under dark text, so they stay faint. */
html.gpp-christmas .bg-brand-coral\/5,
html.gpp-christmas .hover\:bg-brand-coral\/5:hover,
html.gpp-christmas .bg-brand-coral-light,
html.gpp-christmas .hover\:bg-brand-coral-light:hover {
  background-color: var(--xm-cta-soft);
}
html.gpp-christmas .bg-brand-coral\/10,
html.gpp-christmas .hover\:bg-brand-coral\/10:hover,
html.gpp-christmas .bg-brand-coral\/15 {
  background-color: var(--xm-cta-soft-2);
}
html.gpp-christmas .bg-brand-coral\/20,
html.gpp-christmas .hover\:bg-brand-coral\/20:hover {
  background-color: rgba(200, 16, 46, 0.2);
}

html.gpp-christmas .border-brand-coral,
html.gpp-christmas .border-l-brand-coral,
html.gpp-christmas .hover\:border-brand-coral:hover,
html.gpp-christmas .focus\:border-brand-coral:focus {
  border-color: var(--xm-cta);
}
html.gpp-christmas .border-brand-coral\/20,
html.gpp-christmas .hover\:border-brand-coral\/30:hover,
html.gpp-christmas .border-brand-coral\/30 {
  border-color: rgba(200, 16, 46, 0.3);
}
html.gpp-christmas .border-brand-coral\/40,
html.gpp-christmas .hover\:border-brand-coral\/40:hover,
html.gpp-christmas .hover\:border-brand-coral\/50:hover {
  border-color: rgba(200, 16, 46, 0.45);
}

/* Rings are a shadow driven by --tw-ring-color, so the variable is the only
   thing to move. focus:ring-brand-coral is the visible focus indicator on
   most inputs; it has to follow the red or keyboard focus gets lost. */
html.gpp-christmas .ring-brand-coral,
html.gpp-christmas .focus\:ring-brand-coral:focus {
  --tw-ring-color: var(--xm-cta);
}
html.gpp-christmas .ring-brand-coral\/30 {
  --tw-ring-color: rgba(200, 16, 46, 0.3);
}
html.gpp-christmas .ring-brand-coral\/20 {
  --tw-ring-color: rgba(200, 16, 46, 0.2);
}

/* Checkbox and radio ticks: a colour, carrying no validity state. */
html.gpp-christmas .accent-brand-coral {
  accent-color: var(--xm-cta);
}

/* Coral gradients. One custom property each, never two in a shared block —
   see harvest.css for the banner that faded to transparent when this file's
   predecessor set both. The light-ward coral stops run to the landing page's
   deepest red instead, so the white type on them gets darker ground. */
html.gpp-christmas .from-brand-coral {
  --tw-gradient-from: #C8102E;
}
html.gpp-christmas .to-brand-coral-hover {
  --tw-gradient-to: #A50D26;
}
html.gpp-christmas .to-\[\#ff8a76\] {
  --tw-gradient-to: #8A0C1E;
}
html.gpp-christmas .from-\[\#F76F5C\] {
  --tw-gradient-from: #C8102E;
}
html.gpp-christmas .to-\[\#D8402F\] {
  --tw-gradient-to: #8A0C1E;
}

/* MUTED WHITE ON RED. text-white is never remapped (rule 1); its
   fractional siblings are, and only inside something this file has turned
   red, where text-white/70 on coral was 2.3:1 to begin with. Raising the
   alpha can only ever add contrast on a dark ground. */
html.gpp-christmas .bg-brand-coral .text-white\/60,
html.gpp-christmas .bg-brand-coral .text-white\/70,
html.gpp-christmas .bg-brand-coral .text-white\/80,
html.gpp-christmas .bg-brand-coral .text-white\/85,
html.gpp-christmas .from-brand-coral .text-white\/60,
html.gpp-christmas .from-brand-coral .text-white\/70,
html.gpp-christmas .from-brand-coral .text-white\/80,
html.gpp-christmas .from-brand-coral .text-white\/85,
html.gpp-christmas .from-\[\#F76F5C\] .text-white\/70,
html.gpp-christmas .from-\[\#F76F5C\] .text-white\/80 {
  color: rgba(255, 255, 255, 0.92);
}

/* DISABLED CONTROLS. `disabled:bg-gray-300` is (0,2,0) and the bg-brand-coral
   rule above is (0,2,1), so without these every disabled button in the app
   renders full red — a Continue button that looks live and does nothing.
   The rendered audit caught it on the Thanksgiving dress; it is fixed here
   before it can happen. */
html.gpp-christmas .disabled\:bg-gray-50:disabled {
  background-color: var(--xm-raised);
}
html.gpp-christmas .disabled\:bg-gray-200:disabled {
  background-color: var(--xm-fill);
}
html.gpp-christmas .disabled\:bg-gray-300:disabled {
  background-color: var(--xm-fill-2);
}
html.gpp-christmas .disabled\:bg-brand-coral:disabled {
  background-color: var(--xm-cta);
}
html.gpp-christmas .disabled\:text-gray-400:disabled {
  color: var(--xm-ink-4);
}
html.gpp-christmas .disabled\:text-gray-500:disabled {
  color: var(--xm-ink-3);
}
html.gpp-christmas .disabled\:text-gray-200:disabled {
  color: var(--xm-fill);
}

/* The same coral spelled as an arbitrary value (the welcome tour and a few
   one-offs). Only OUR coral: Facebook's blue and Instagram's gradient are
   somebody else's brand and stay exactly as they are. */
html.gpp-christmas .bg-\[\#F25C4C\] {
  background-color: var(--xm-cta);
}
html.gpp-christmas .hover\:bg-\[\#e04d3d\]:hover,
html.gpp-christmas .bg-\[\#e04d3d\] {
  background-color: var(--xm-cta-hover);
}
html.gpp-christmas .text-\[\#F25C4C\] {
  color: var(--xm-cta-ink);
}
html.gpp-christmas .border-\[\#F25C4C\],
html.gpp-christmas .border-\[\#F25C4C\]\/30 {
  border-color: rgba(200, 16, 46, 0.45);
}
html.gpp-christmas .bg-\[\#F25C4C\]\/10 {
  background-color: var(--xm-cta-soft-2);
}
html.gpp-christmas .bg-\[\#F25C4C\]\/30 {
  background-color: rgba(200, 16, 46, 0.3);
}

/* Press feedback: box-shadow, never transform (rule 2). A gold glow, like
   the ring round the landing page's buttons. */
html.gpp-christmas .bg-brand-coral:active {
  box-shadow: 0 0 0 2px rgba(240, 193, 75, 0.55), 0 0 18px -2px rgba(200, 16, 46, 0.5);
}

/* The brand green, as TEXT only (#77BB41 is 2.3:1 on white). bg-brand-green
   stays: no single green carries both the white and the dark text it has. */
html.gpp-christmas .text-brand-green {
  color: var(--xm-green);
}

/* ======================================================================
   SNOW — behind the page, and a little in front of it
   ====================================================================== */

/* Behind the page, inside .xm-sky. Masked along the lower edge so flakes
   settle into the snowbank instead of stacking on the hills, which are the
   darkest thing behind the page (the sky floor). */
.xm-snowfall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 92%);
}

.xm-flake {
  position: absolute;
  top: -40px;
  width: 20px;
  height: 20px;
  opacity: 0;
  animation: xmFall linear infinite;
  will-change: transform;
}

/* Snow does not fall like a leaf: slower, a long lazy sway, a slow turn. */
@keyframes xmFall {
  0% { opacity: 0; transform: translate3d(0, -40px, 0) rotate(0deg); }
  8% { opacity: var(--xm-drift-opacity, 0.5); }
  50% { transform: translate3d(var(--xm-sway, 24px), 50vh, 0) rotate(calc(var(--xm-spin, 180deg) / 2)); }
  92% { opacity: var(--xm-drift-opacity, 0.5); }
  100% { opacity: 0; transform: translate3d(var(--xm-land, 30px), 104vh, 0) rotate(var(--xm-spin, 180deg)); }
}

/* THE AMBIENT LAYER, over the page: a few flakes crossing in front, and the
   only place a tap's scatter may spawn. overflow:hidden is what stops a flake
   near the edge from widening the page in WKWebView. */
.xm-layer {
  position: fixed;
  inset: 0;
  z-index: 30; /* under the sticky header (z-50), over page content */
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
}

/* FRONT SNOW. A flake over a line of text tints the glyphs and the gap
   between them together, so it compresses that line's contrast however
   pale it is — the same trade Jake asked for twice with the Thanksgiving
   leaves. Small, the palest tone, and few (6). The check prints what it
   costs and fails if the main ink drops under AA. */
.xm-flake-front {
  --xm-drift-opacity: 0.35;
}

/* ------------------------------------------------------------ tap scatter */
.xm-burst {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  opacity: 0;
  animation: xmBurst 680ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes xmBurst {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg); }
  15% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--xm-dx, 0), var(--xm-dy, -46px), 0) scale(1) rotate(var(--xm-rot, 0deg));
  }
}

.xm-mote {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6D8 0%, var(--xm-gold) 55%, rgba(240, 193, 75, 0) 100%);
  opacity: 0;
  animation: xmMote 560ms ease-out forwards;
}

@keyframes xmMote {
  0% { opacity: 0.95; transform: translate3d(0, 0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate3d(var(--xm-dx, 0), var(--xm-dy, -30px), 0) scale(1.5); }
}

/* ------------------------------------------- the Santa hat on the logo */
/* The landing page hangs a Santa hat on the corner of its video; the portal
   puts one on the pup in the logo. */
.xm-logo-hat {
  position: absolute;
  left: -7px;
  top: -11px;
  width: 26px;
  height: 22px;
  pointer-events: none;
  transform: rotate(-18deg);
  filter: drop-shadow(0 1px 1.5px rgba(18, 42, 80, 0.28));
}

/* ======================================================================
   THE CELEBRATION — /book/…/confirmed, the one loud screen
   ======================================================================

   The money has already moved, so nothing here can cost a conversion. The
   success banner becomes the landing page's hero in small: the night, the
   moon, the string of lights, Santa's sleigh crossing, and snow along the
   bottom. White type on #0B1E3F is 16.5:1, so the title and its subtitle
   read better on it than they did on coral.

   (0,3,1) to beat the bg-brand-coral remap the banner also carries — that
   class stays on it as the fallback if this file ever fails to load. */
html.gpp-christmas .bg-brand-coral.xm-night {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-bottom: calc(4rem + 34px);
  background-color: var(--xm-night);
  background-image:
    url("snow-near.svg"),
    url("lights.svg"),
    radial-gradient(2.2px 2.2px at 9% 26%, #FFFFFF, transparent 60%),
    radial-gradient(1.7px 1.7px at 21% 58%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(2px 2px at 34% 18%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1.6px 1.6px at 63% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(2.1px 2.1px at 77% 52%, #FFFFFF, transparent 60%),
    radial-gradient(1.7px 1.7px at 92% 36%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 48% 62%, rgba(255, 255, 255, 0.6), transparent 60%),
    linear-gradient(180deg, #07152F 0%, #112A55 55%, #1D3F6E 100%);
  background-size: 480px 46px, 168px 30px, auto, auto, auto, auto, auto, auto, auto, auto;
  background-position: left bottom, left top, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: repeat-x, repeat-x, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

.xm-celebrate {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-height: 132px;
  margin-bottom: 12px;
}

.xm-celebrate .xm-c-moon {
  position: absolute;
  top: -22px;
  right: max(16px, 9vw);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #FFFBEE 0%, #FFF3CF 58%, #F6E4B4 100%);
  box-shadow: 0 0 46px 14px rgba(255, 241, 201, 0.16);
}

/* Santa crosses the banner. Clipped by the banner's own overflow:hidden. */
.xm-celebrate .xm-c-sleigh {
  position: absolute;
  top: -30px;
  left: 0;
  height: 46px;
  width: auto;
  animation: xmFlyBanner 11s linear infinite 0.6s;
  transform: translate3d(-260px, 0, 0);
}

@keyframes xmFlyBanner {
  0% { transform: translate3d(-260px, 10px, 0); }
  50% { transform: translate3d(calc(50vw - 120px), -4px, 0); }
  100% { transform: translate3d(calc(100vw + 40px), 8px, 0); }
}

.xm-celebrate .xm-c-gift {
  width: 64px;
  height: 64px;
  animation: xmBob 2.6s ease-in-out infinite;
}
.xm-celebrate .xm-c-gift-b {
  width: 52px;
  height: 52px;
  animation-delay: 0.7s;
}
.xm-celebrate .xm-c-pup {
  width: 118px;
  height: 84px;
  animation: xmBob 2.2s ease-in-out infinite 0.3s;
}

@keyframes xmBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* ------------------------------------------------------- preview banner */
.xm-preview-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--xm-cta, #C8102E);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  padding: 6px 12px;
}

@media (prefers-reduced-motion: reduce) {
  .xm-flake,
  .xm-burst,
  .xm-mote,
  .xm-dog-walk,
  .xm-pup,
  .xm-pup .xm-leg-a,
  .xm-pup .xm-leg-b,
  .xm-pup .xm-tail,
  .xm-celebrate .xm-c-sleigh,
  .xm-celebrate .xm-c-gift,
  .xm-celebrate .xm-c-pup,
  html.gpp-christmas.xm-lively header.bg-white.border-gray-100::before,
  html.gpp-christmas.xm-lively header.bg-white.border-gray-100::after {
    animation: none !important;
  }
  /* Everything that moved and would now sit at an invisible first frame
     goes; the pup and the sleigh are parked where they read best. The
     strip, the snowscape and the banner are art, not motion — reduced
     motion takes away the movement, not the season. */
  .xm-flake,
  .xm-burst,
  .xm-mote,
  .xm-dog-walk {
    display: none;
  }
  html.gpp-christmas.xm-lively header.bg-white.border-gray-100::after {
    background-position: 88% 2px;
  }
  .xm-celebrate .xm-c-sleigh {
    transform: translate3d(12vw, 0, 0);
  }
}

/* The dress comes off for print. */
@media print {
  html.gpp-christmas {
    background: #FFFFFF;
  }
  html.gpp-christmas .bg-white {
    background-color: #FFFFFF;
    background-image: none;
  }
  .xm-sky,
  .xm-layer,
  .xm-preview-bar {
    display: none !important;
  }
  html.gpp-christmas header.bg-white.border-gray-100 {
    padding-bottom: 0;
    background-image: none;
  }
  html.gpp-christmas header.bg-white.border-gray-100::before,
  html.gpp-christmas header.bg-white.border-gray-100::after {
    display: none;
  }
}
