/* The homepage's Christmas look. christmas.js puts the class "xmas" on the page from the day after
   Thanksgiving through the day after Christmas; without it none of this shows and the site has its
   usual look. The drawn snowflakes, tree, bauble and holly are in index.html (the xm-defs drawing
   set); the banner's garland of pine and lit bulbs is xm-garland.svg. The store's own colours stay
   where they mean something: red prices, the green and amber On floor and Processing tags, the green
   deals box and focus rings. Built to match thanksgiving.css, so only one of the two is ever on. */

.xm-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.xm-banner, .xm-fall, .xm-corner, .xm-foot { display: none; }

html.xmas {
  --xm-gold: #ffd166;
  --xm-red: #fa5252;
  --xm-pine: #2b7a4b;
  --xm-line: linear-gradient(90deg, #0f5132, #c81d25 24%, #ffd166 50%, #c81d25 76%, #0f5132);
  /* A cold night: gold light pooling low on the right like a lit window, moonlight top left */
  --xm-night:
    radial-gradient(ellipse at 84% 120%, rgba(255, 209, 102, 0.26), transparent 56%),
    radial-gradient(ellipse at 6% -22%, rgba(96, 165, 250, 0.26), transparent 58%),
    linear-gradient(100deg, #04100e 0%, #07171c 52%, #0b1020 100%);
}

/* ---------- Header and footer: the green line turns Christmas ---------- */
html.xmas .top, html.xmas .nav { border-image: var(--xm-line) 1; }
html.xmas .top .call, html.xmas .strip b, html.xmas .strip a:hover { color: var(--xm-gold); }
html.xmas footer { border-image: var(--xm-line) 1; }
html.xmas .xm-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; font: 700 14px/1.4 var(--body); color: #ffe3a3; }
html.xmas .xm-foot svg { flex: none; width: 32px; height: 26px; }

/* ---------- The banner, on the list and on every item's page: a garland, snow drifting down,
   and the greeting between baubles (and trees on bigger screens) ---------- */
html.xmas .xm-banner {
  display: block;
  position: relative;
  overflow: hidden;
  background:
    url("/xm-garland.svg") 0 0 / 192px 30.4px repeat-x,
    radial-gradient(ellipse at 50% 150%, rgba(255, 209, 102, 0.3), transparent 65%),
    linear-gradient(180deg, #0a2018, #061015);
  border-bottom: 1px solid #14402a;
}
html.xmas .xm-banner .wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 29px; padding-bottom: 11px; }
html.xmas .xm-banner p { margin: 0; text-align: center; }
html.xmas .xm-banner span { display: block; font: 800 11px/1.2 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: #cfe6d6; }
html.xmas .xm-banner strong {
  display: block;
  margin-top: 3px;
  padding: 0 0.06em;
  font: italic 900 clamp(26px, 7.4vw, 56px)/0.95 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--xm-gold);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  html.xmas .xm-banner strong {
    background: linear-gradient(90deg, #fff4d6, #ffd166 28%, #f2a93b 50%, #ffd166 72%, #fff4d6) 0 0 / 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: xm-shine 8s linear infinite;
  }
}
@keyframes xm-shine { to { background-position: -200% 0; } }
/* Right-hand pictures face the words: mirrored */
html.xmas .xm-banner .r { --flip: -1; }
html.xmas .xm-tree { display: none; flex: none; width: 66px; height: 58px; transform: scaleX(var(--flip, 1)); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
/* The bauble hangs off the garland, so it swings from its cap rather than its middle */
html.xmas .xm-ball { flex: none; width: 34px; height: 34px; transform-origin: 50% 6%; animation: xm-swing 4.6s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
html.xmas .xm-ball.r { animation-delay: -2.3s; }
@keyframes xm-swing {
  0%, 100% { transform: scaleX(var(--flip, 1)) rotate(-7deg); }
  50% { transform: scaleX(var(--flip, 1)) rotate(7deg); }
}
html.xmas .xm-banner .xm-fall i { --fall: 170px; top: -24px; opacity: 0.6; }

/* ---------- The hero: a cold night, snow drifting down behind the words ---------- */
html.xmas .hero { position: relative; overflow: hidden; background: var(--xm-night); }
html.xmas .hero .wrap { position: relative; z-index: 1; }
/* Snow settled along the bottom, carrying the night into the shop below it. The glow is centred on
   the hero's bottom edge and the lower half is cut off by the overflow above, so it is brightest
   right at the edge: light coming off snow on the ground, rather than a haze hanging in the air. */
html.xmas .hero::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -70px;
  height: 140px;
  background: radial-gradient(ellipse at 50% 50%, rgba(240, 249, 255, 0.5), rgba(240, 249, 255, 0.12) 45%, transparent 70%);
  pointer-events: none;
}
/* The headline keeps the logo's red, white and lime green, with the cold night behind it */
html.xmas .search { box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.5); }
html.xmas .search:focus-within { box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.95); }
html.xmas .xm-fall { display: block; position: absolute; inset: 0; pointer-events: none; }
html.xmas .xm-fall i { position: absolute; top: -48px; left: var(--x); width: var(--s); height: var(--s); color: var(--c); opacity: 0.9; animation: xm-drift var(--t) linear var(--w) infinite; will-change: transform; }
html.xmas .xm-fall i:nth-child(odd) { --d: -38px; }
html.xmas .xm-fall svg { display: block; width: 100%; height: 100%; animation: xm-sway 4.2s ease-in-out infinite alternate; }
html.xmas .xm-fall i:nth-child(3n) svg { animation-duration: 5.6s; animation-direction: alternate-reverse; }
html.xmas .xm-fall i:nth-child(3n + 1) svg { animation-duration: 3.4s; }
@keyframes xm-drift { to { transform: translate3d(var(--d, 46px), var(--fall, 660px), 0); } }
@keyframes xm-sway { from { transform: translateX(-10px) rotate(-22deg); } to { transform: translateX(10px) rotate(26deg); } }

/* ---------- Reviews, Visit us and an item's page ---------- */
html.xmas .reviews .kick { color: #0f5132; }
html.xmas .reviews h2 span { color: #c81d25; }
html.xmas .review.summary { border-left-color: #c81d25; }
html.xmas .visit { position: relative; overflow: hidden; background: var(--xm-night); }
html.xmas :is(.visit, .itempage) .wrap { position: relative; z-index: 1; }
html.xmas .visit .kick, html.xmas .hours-title { color: var(--xm-gold); }
html.xmas .visit h2 span { color: var(--xm-red); }
html.xmas .visit .btn.green { background: var(--xm-gold); color: #10200f; }
html.xmas .btn.line:hover { color: var(--xm-gold); border-color: var(--xm-gold); }
html.xmas .itempage { position: relative; overflow: hidden; }
html.xmas .xm-corner { display: block; position: absolute; top: -26px; right: -30px; width: 240px; height: 210px; opacity: 0.2; pointer-events: none; }
html.xmas .itempage .xm-corner { opacity: 0.13; }
html.xmas .xm-corner.bl { top: auto; right: auto; bottom: -40px; left: -36px; transform: rotate(180deg); }
html.xmas .xm-corner svg { position: absolute; color: var(--c); }
html.xmas .xm-corner svg:nth-child(1) { right: 0; top: 14px; width: 150px; height: 150px; transform: rotate(14deg); }
html.xmas .xm-corner svg:nth-child(2) { right: 118px; top: 0; width: 108px; height: 108px; transform: rotate(-18deg); }
html.xmas .xm-corner svg:nth-child(3) { right: 82px; top: 104px; width: 86px; height: 86px; transform: rotate(8deg); }

/* ---------- Phones and bigger screens ---------- */
@media (max-width: 359px) {
  html.xmas .xm-ball { display: none; }
}
@media (max-width: 639px) {
  html.xmas .xm-fall i:nth-child(even) { display: none; }
}
@media (min-width: 640px) {
  html.xmas .nav a:hover, html.xmas .nav a.on { box-shadow: inset 0 -3px 0 var(--xm-gold); }
  html.xmas .xm-banner { background-size: 288px 45.6px, auto, auto; }
  html.xmas .xm-banner .wrap { gap: 22px; padding-top: 43px; padding-bottom: 15px; }
  html.xmas .xm-banner span { font-size: 12.5px; }
  html.xmas .xm-fall i { width: calc(var(--s) * 1.45); height: calc(var(--s) * 1.45); }
  html.xmas .xm-tree { display: block; }
  html.xmas .xm-ball { width: 56px; height: 56px; }
}
