/* ==========================================================================
   Theme: Christmas (xmas)
   Loaded by head.twig only when the theme is on (body.wd-theme-xmas).
   Files of this theme: theme_xmas.css, theme_xmas_decor.twig,
   theme_xmas_header.twig, theme_xmas_badge.twig
   ========================================================================== */
.wd-theme-xmas {
  --wd-xmas-red: #e0313d;
  --wd-xmas-red-deep: #b81f2b;
  --wd-xmas-green: #2fa35c;
  --wd-xmas-green-soft: #4fd38a;
  --wd-xmas-snow: #f4f7ff;
  --color-primary: var(--wd-xmas-red);
  --color-primary-hover: #ef4451;
  --color-primary-text: #fff;
  --color-primary-text-hover: #fff;
}
.wd-theme-xmas ::selection { background: var(--wd-xmas-red); color: #fff; }

/* Background glows: red + green instead of gold */
.wd-theme-xmas .wd-bg {
  background:
    radial-gradient(55% 70% at 88% 25%, rgb(224 49 61 / 18%), transparent 70%),
    radial-gradient(45% 55% at 8% 85%, rgb(47 163 92 / 16%), transparent 70%),
    radial-gradient(35% 45% at 96% 85%, rgb(217 164 65 / 12%), transparent 70%);
}

/* Falling snow (behind the content) */
.wd-xmas-snow {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.wd-xmas-snow span {
  position: absolute;
  top: 0;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--wd-xmas-snow);
  opacity: var(--o);
  box-shadow: 0 0 6px rgb(255 255 255 / 50%);
  transform: translate3d(0, -10vh, 0);
  animation: wd-snowfall var(--d) linear var(--delay) infinite;
}
@keyframes wd-snowfall {
  0%   { transform: translate3d(0, -10vh, 0); }
  50%  { transform: translate3d(var(--x), 50vh, 0); }
  100% { transform: translate3d(0, 110vh, 0); }
}

/* String of lights hanging under the header */
.wd-xmas-lights {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  height: 22px;
  padding: 0 8px;
  overflow: hidden;
  pointer-events: none;
}
.wd-xmas-lights i {
  position: relative;
  flex: 1 1 0;
  --c: var(--wd-xmas-red);
}
.wd-xmas-lights i::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  right: 0;
  height: 11px;
  border-bottom: 1.5px solid #3b382f;
  border-radius: 0 0 50% 50%;
}
.wd-xmas-lights i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 7px;
  height: 11px;
  margin-left: -3.5px;
  border-radius: 50% 50% 45% 45%;
  background: var(--c);
  box-shadow: 0 0 8px 1px var(--c);
  animation: wd-xmas-blink 1.6s ease-in-out infinite;
}
.wd-xmas-lights i:nth-child(4n + 2) { --c: var(--wd-xmas-green-soft); }
.wd-xmas-lights i:nth-child(4n + 3) { --c: #ffd25e; }
.wd-xmas-lights i:nth-child(4n + 4) { --c: #5aa9ff; }
.wd-xmas-lights i:nth-child(2n)::after { animation-delay: -.8s; }
.wd-xmas-lights i:nth-child(3n)::after { animation-duration: 2.2s; }
@keyframes wd-xmas-blink {
  0%, 100% { opacity: 1; filter: brightness(1.15); }
  50% { opacity: .35; filter: brightness(.7); box-shadow: none; }
}
@media (width <= 600px) { .wd-xmas-lights i:nth-child(n + 21) { display: none; } }

/* Santa hat on the logo */
.wd-theme-xmas .wd-brand { position: relative; }
.wd-theme-xmas .wd-header .wd-brand::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -10px;
  z-index: 2;
  width: 30px;
  height: 25px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 52'%3E%3Cpath d='M8 40C13 21 27 6 45 8c10 1 15 9 13 22l-6-3c-2-7-8-9-14-5-8 6-12 13-12 18z' fill='%23d62b38'/%3E%3Cpath d='M30 14c6-3 12-3 15 0' stroke='%23ff6b74' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Crect x='4' y='36' width='36' height='13' rx='6.5' fill='%23f4f7ff'/%3E%3Ccircle cx='57' cy='32' r='6.5' fill='%23f4f7ff'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 50%));
  transform: rotate(-22deg);
  pointer-events: none;
}

/* Snow resting on the top edge of the boxes */
.wd-theme-xmas .wd-cat-section,
.wd-theme-xmas .wd-steps { position: relative; }
.wd-theme-xmas .wd-cat-section::before,
.wd-theme-xmas .wd-steps::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 18px;
  right: 18px;
  z-index: 1;
  height: 14px;
  background:
    radial-gradient(circle at 9px 10px, var(--wd-xmas-snow) 7px, transparent 7.5px) 0 0 / 18px 14px repeat-x,
    radial-gradient(circle at 5px 11px, var(--wd-xmas-snow) 5px, transparent 5.5px) 9px 1px / 18px 14px repeat-x,
    linear-gradient(var(--wd-xmas-snow), var(--wd-xmas-snow)) 0 9px / 100% 5px no-repeat;
  border-radius: 0 0 6px 6px;
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 35%));
  pointer-events: none;
}

/* Accents: candy colours */
.wd-theme-xmas .wd-gradient-text {
  background: linear-gradient(90deg, #ff4d5a, #ffd27a 30%, var(--wd-xmas-green-soft) 60%, #ff4d5a);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wd-xmas-shift 8s linear infinite;
}
@keyframes wd-xmas-shift { to { background-position: 250% 0; } }

.wd-theme-xmas .wd-xmas-badge {
  border-color: rgb(224 49 61 / 50%);
  background: rgb(224 49 61 / 12%);
  color: #ff8a92;
}
.wd-theme-xmas .wd-xmas-badge svg { fill: var(--wd-xmas-green-soft); stroke: none; }
.wd-theme-xmas .wd-eyebrow::before { background: var(--wd-xmas-red); }

.wd-theme-xmas .wd-btn-primary,
.wd-theme-xmas .btn-primary {
  background: linear-gradient(180deg, #e8404c, var(--wd-xmas-red-deep));
  color: #fff;
}
.wd-theme-xmas .wd-btn-primary:hover { background: linear-gradient(180deg, #f1525d, #c9262f); }

.wd-theme-xmas .wd-step-icon {
  border-color: rgb(224 49 61 / 45%);
  background: rgb(224 49 61 / 10%);
  color: #ff6b74;
}
.wd-theme-xmas .wd-steps li:nth-child(2) .wd-step-icon {
  border-color: rgb(47 163 92 / 50%);
  background: rgb(47 163 92 / 12%);
  color: var(--wd-xmas-green-soft);
}
.wd-theme-xmas .wd-chip:hover,
.wd-theme-xmas .wd-tab.is-active { border-color: rgb(224 49 61 / 50%); }
.wd-theme-xmas .wd-tab.is-active { background: var(--wd-xmas-red); color: #fff; }
.wd-theme-xmas .store-product.wd-product:hover { border-color: rgb(224 49 61 / 70%); }

/* It's gift season: highlight the gift button */
.wd-theme-xmas .store-product .gift {
  color: var(--wd-xmas-green-soft);
  border-color: rgb(47 163 92 / 45%);
}

/* Candy cane stripe above the footer */
.wd-theme-xmas .wd-footer { position: relative; }
.wd-theme-xmas .wd-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(-45deg, var(--wd-xmas-red) 0 10px, var(--wd-xmas-snow) 10px 20px);
  opacity: .75;
}

@media (prefers-reduced-motion: reduce) {
  .wd-xmas-snow { display: none; }
}
