/* CPvP Store — Christmas theme. Active only when <html> has class "xmas" (season: "christmas" in js/config.js).
   Kept deliberately small: string lights on the header, a Santa hat on the logo, light snowfall,
   a slim banner and a snow drift on the footer. Everything else stays the normal store. */
.xmas {
  --xmas-red: #d9314a;
  --xmas-green: #3fb465;
  --xmas-gold: #f2c14e;
  --snow: #eef3fb;
}

/* ---------- slim banner ---------- */
.xmas-ribbon {
  text-align: center; font: 500 13px/1.3 var(--f); color: #fff; background: #a3203a;
  padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- snowfall canvas ---------- */
.xmas-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- string lights along the top of the header card ---------- */
.xmas .hcard { position: relative; }
.xmas-lights {
  position: absolute; left: 16px; right: 16px; top: -8px; height: 28px; z-index: 1;
  display: flex; justify-content: space-between; pointer-events: none; overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='28'%3E%3Cpath d='M0 6 Q11 15 22 6 T44 6' fill='none' stroke='%23131016' stroke-width='2.4'/%3E%3C/svg%3E") repeat-x 0 0 / 44px 28px;
}
.xmas-lights i {
  --c: var(--xmas-red);
  position: relative; flex: none; width: 8px; height: 12px; margin-top: 10px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .85) 0 12%, var(--c) 45%, color-mix(in srgb, var(--c) 60%, #000) 100%);
  box-shadow: 0 0 8px 0 color-mix(in srgb, var(--c) 70%, transparent);
  animation: xmas-blink 3s ease-in-out infinite;
}
.xmas-lights i::before { content: ""; position: absolute; left: 1px; top: -3px; width: 6px; height: 4px; border-radius: 1px; background: #26222b; }
.xmas-lights i:nth-child(odd) { margin-top: 12px; }
.xmas-lights i:nth-child(4n + 1) { --c: var(--xmas-red); }
.xmas-lights i:nth-child(4n + 2) { --c: var(--xmas-green); animation-delay: -.75s; }
.xmas-lights i:nth-child(4n + 3) { --c: var(--xmas-gold); animation-delay: -1.5s; }
.xmas-lights i:nth-child(4n + 4) { --c: var(--accent-hi); animation-delay: -2.25s; }
@keyframes xmas-blink { 50% { opacity: .45; box-shadow: none; } }

/* ---------- Santa hat on the C of "CPVP" ---------- */
.xmas-hat {
  position: absolute; z-index: 6; pointer-events: none;
  left: var(--hat-x, 17.5%); top: var(--hat-y, 8.5%); width: var(--hat-w, 23%);
  transform: rotate(-14deg); transform-origin: 30% 90%;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .45));
}
@media (max-width: 760px) {
  .xmas .logo { position: relative; left: auto; top: auto; }
}

/* ---------- snow drift on the footer ---------- */
.xmas .footer { position: relative; margin-top: 20px; border-top: 0; box-shadow: inset 0 3px 0 #d6dfee; }
.xmas .footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 21px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='21' preserveAspectRatio='none'%3E%3Cpath d='M0 21V12C20 6 40 4 60 9S100 17 120 10 160 2 180 7 220 15 240 10V21Z' fill='%23eef3fb'/%3E%3Cpath d='M0 21V16C30 11 50 11 70 14S110 20 130 15 170 9 190 12 225 18 240 15V21Z' fill='%23d6dfee'/%3E%3C/svg%3E") repeat-x 0 0 / 240px 21px;
}

@media (prefers-reduced-motion: reduce) {
  .xmas-lights i { animation: none; }
}
