/* Christmas decorations for ligahosting.ro — on while Admin > Settings > Seasonal theme = Christmas.
   Adds elements only; the site's colours and layout stay untouched. Nothing here catches clicks. */
/* The site paints its background on <body>: isolate it so the scenery (z-index -1) sits above that background
   but still under the page content. */
body { isolation: isolate; }

#xm-layer { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
#xm-sky { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
#xm-layer[hidden], #xm-sky[hidden] { display: none; }

/* Twinkle for the star on top of the trees */
@keyframes xm-twinkle { from { opacity: .45; } to { opacity: 1; } }

/* Falling snow */
.xm-flake { position: absolute; top: -12px; color: #fff; opacity: 0; user-select: none; text-shadow: 0 0 6px rgba(255, 255, 255, .6);
    animation: xm-fall var(--dur, 12s) linear forwards; }
@keyframes xm-fall {
    0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    10% { opacity: var(--o, .8); }
    90% { opacity: var(--o, .8); }
    100% { opacity: 0; transform: translate(var(--dx, 40px), 105vh) rotate(var(--rot, 180deg)); }
}

/* Snow drift + trees + gifts along the bottom (behind the page) */
.xm-drift { position: absolute; left: 0; right: 0; bottom: -10px; height: 70px;
    background: radial-gradient(55% 100% at 15% 100%, rgba(255, 255, 255, .12), transparent 70%),
                radial-gradient(50% 100% at 60% 100%, rgba(255, 255, 255, .10), transparent 70%),
                radial-gradient(45% 100% at 95% 100%, rgba(255, 255, 255, .12), transparent 70%); }
.xm-corner { position: absolute; bottom: 6px; display: flex; align-items: flex-end; gap: 8px; }
.xm-corner.left { left: 14px; }
.xm-corner.right { right: 14px; flex-direction: row-reverse; }
.xm-tree { filter: drop-shadow(0 0 10px rgba(74, 222, 128, .25)); }
.xm-tree .xm-star { animation: xm-twinkle 1.4s ease-in-out infinite alternate; transform-origin: center; }
.xm-gift { filter: drop-shadow(0 0 6px rgba(248, 113, 113, .35)); }


/* Santa's sleigh crossing the sky now and then */
.xm-sleigh { position: absolute; width: 150px; height: 46px; opacity: 0; }
.xm-sleigh svg { width: 100%; height: 100%; }
.xm-sleigh.fly { animation: xm-ride var(--dur, 14s) linear forwards; }
@keyframes xm-ride {
    0% { opacity: 0; transform: translate(var(--x0), var(--y0)); }
    8% { opacity: .9; }
    50% { transform: translate(calc((var(--x0) + var(--x1)) / 2), calc(var(--y0) - 30px)); }
    92% { opacity: .9; }
    100% { opacity: 0; transform: translate(var(--x1), var(--y1)); }
}

/* Footer switch (shared by both themes) */
.season-toggle { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid rgba(248, 113, 113, .35);
    background: rgba(248, 113, 113, .08); color: #fca5a5; font-size: 10px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.season-toggle:hover { background: rgba(248, 113, 113, .16); color: #fff; }

@media (max-width: 640px) {
    .xm-corner svg { transform: scale(.7); transform-origin: bottom; }
    .xm-corner > :nth-child(n+3) { display: none; }
    }
@media (prefers-reduced-motion: reduce) {
        .xm-flake, .xm-sleigh { display: none; }
}

/* Snow resting on the navbar and on the game cards (seasonal-christmas.js caps()) */
html body:not(#lh-ro) .lh-public-header .lh-header-shell, html body:not(#lh-ro) .ro-game-card, html body:not(#lh-ro) .sd-card { position: relative !important; }
.xm-cap { position: absolute; top: -1px; left: 14px; right: 14px; height: 22px; z-index: 4; pointer-events: none; overflow: hidden;
    filter: drop-shadow(0 2px 2px rgba(10, 14, 40, .35)); }
.lh-header-shell > .xm-cap { left: 22px; right: 22px; top: -2px; }
.xm-cap svg { display: block; }
.xm-off .xm-cap { display: none; }
