/* Christmas mode (christmas.js): only while html.xmas is set (the theme is on and the home page is showing) */

/* the snow piles: one layer over the page, each pile moved onto its box by christmas.js */
#xmasPiles { position: fixed; inset: 0; z-index: 33; /* above the chat panel (32), under popups (40); covered piles hide themselves */ pointer-events: none; overflow: hidden; }
.xmas-pile { position: absolute; left: 0; top: 0; overflow: visible; will-change: transform;
  filter: drop-shadow(0 3px 3px rgba(6, 2, 28, .45)); }
.xmas-pile .pile { fill: url(#xmasSnowFill); }
.xmas-pile .pile-shadow { fill: #8f9bd6; opacity: .55; }
.xmas-pile .ice path { fill: url(#xmasIce); stroke: rgba(255, 255, 255, .6); stroke-width: .6; }
.xmas-pile .glint { fill: #fff; animation: xmasGlint 3s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes xmasGlint { 0%, 70%, 100% { opacity: 0; transform: scale(.4); } 82% { opacity: 1; transform: scale(1.6); } }

/* snowflakes drifting over the page (doesn't block clicks) */
#xmasSnow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 27; pointer-events: none; }

/* fairy lights hanging under the header */
.xmas-lights { position: absolute; left: 0; bottom: -30px; z-index: 7; pointer-events: none; overflow: visible; }
.xmas-lights .bulb { animation: xmasBulb 2.2s infinite ease-in-out; }
.xmas-lights .halo { fill: var(--c); opacity: .35; filter: blur(4px); }
@keyframes xmasBulb { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.xmas-lights .bulb .halo { animation: xmasHalo 2.2s infinite ease-in-out; animation-delay: inherit; }
@keyframes xmasHalo { 0%, 100% { opacity: .55; } 50% { opacity: .1; } }

/* Santa hats on the logos */
html.xmas .site-logo.header-logo, html.xmas .site-logo.chat-logo { position: relative; }
.xmas-hat { position: absolute; left: -12px; top: -15px; width: 40px; height: 34px; transform: rotate(-16deg); pointer-events: none; z-index: 7;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.chat-logo .xmas-hat { left: -8px; top: -5px; width: 34px; height: 29px; } /* the chat panel clips anything above it */
.xmas-hat svg { width: 100%; height: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  .xmas-lights .bulb, .xmas-lights .halo, .xmas-pile .glint { animation: none; }
}
