/* ================================================================
   xmas.css — Decorazioni natalizie (includes/xmas.php)
   Caricato solo nel periodo scelto in admin/xmas.php.
   Tutto assoluto e senza puntatore: la navbar non cambia altezza.
   ================================================================ */

/* ── 1. Logo ─────────────────────────────────────────────────── */
.navbar.xm-logo .brand-link picture,
.m-nav.xm-logo .m-nav__brand picture {
    position: relative;
    z-index: 1;
}
.navbar.xm-logo .brand-link picture::after,
.m-nav.xm-logo .m-nav__brand picture::after {
    content: "";
    position: absolute;
    pointer-events: none;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .25));
}
/* Cappello */
.xm-logo--hat picture::after {
    left: -10%;
    top: -15px;
    width: 72%;
    height: 27px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='50' viewBox='0 0 64 50'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f43f4e'/%3E%3Cstop offset='1' stop-color='%23b3121f'/%3E%3C/linearGradient%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23d8e5f2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9 37C10 17 24 5 37 5c12 0 20 9 21 24 0 0-5-7-11-8 5 5 7 10 8 16z' fill='url(%23r)'/%3E%3Cpath d='M37 8c7 1 11 6 12 13M20 20c4-5 8-8 12-9' fill='none' stroke='%237f0d17' stroke-opacity='.35' stroke-width='1.6' stroke-linecap='round'/%3E%3Crect x='3' y='34' width='57' height='13' rx='6.5' fill='url(%23w)' stroke='%23b9c7d8'/%3E%3Ccircle cx='57' cy='27' r='6' fill='url(%23w)' stroke='%23b9c7d8'/%3E%3C/svg%3E");
    rotate: -16deg;
}
/* Calotta di neve */
.xm-logo--snow picture::after {
    left: -2%;
    top: -3px;
    width: 104%;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='30' viewBox='0 0 64 30'%3E%3Cdefs%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23d8e5f2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M4 24C8 9 19 2 32 2s24 7 28 22c-3 4-6 1-8-2-2 5-6 5-8 0-2 8-8 7-9 0-2 4-6 4-7 0-2 7-8 6-9 0-2 4-5 4-7 0-2 4-6 5-8 0z' fill='url(%23w)' stroke='%23b4c8de' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 100% 100% !important;
}
.m-nav.xm-logo--hat .m-nav__brand picture::after { top: -11px; height: 21px; }
.m-nav.xm-logo--snow .m-nav__brand picture::after { height: 17px; }
.navbar.xm-logo .brand-link picture::after {
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
/* Segue il logo rimpicciolito allo scroll (header-bundle: scale .84) */
@media (min-width: 769px) {
    .navbar.xm-logo.is-scrolled .brand-link picture::after { scale: .84; translate: 2px 4px; }
}
.navbar.xm-logo--hat .brand-link:hover picture::after { transform: translateY(-3px) rotate(-6deg); }

/* ── 2. Puntini dorati (appesi al bordo basso della navbar) ──── */
.xm-lights {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 0;
    height: 20px;
    margin-top: -3px;
    overflow: hidden;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='20' viewBox='0 0 240 20'%3E%3Cpath d='M0 3Q60 17 120 3Q180 17 240 3' fill='none' stroke='%238b7a4a' stroke-opacity='.7'/%3E%3Ccircle cx='12' cy='5.5' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='36' cy='8.9' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='60' cy='10.0' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='84' cy='8.9' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='108' cy='5.5' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='132' cy='5.5' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='156' cy='8.9' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='180' cy='10.0' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='204' cy='8.9' r='1.9' fill='%23d9921a'/%3E%3Ccircle cx='228' cy='5.5' r='1.9' fill='%23d9921a'/%3E%3C/svg%3E") 50% 0 / 240px 20px repeat-x;
    transition: opacity .2s ease;
}
.xm-lights i {
    position: absolute;
    inset: 0;
    background: 50% 0 / 240px 20px repeat-x;
    /* 4 giri e poi ferme accese: nessun movimento infinito */
    animation: xm-glow 4s ease-in-out 4 both;
}
.xm-lights i:first-child { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='20' viewBox='0 0 240 20'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff6d6'/%3E%3Cstop offset='.26' stop-color='%23fbbf24'/%3E%3Cstop offset='.44' stop-color='%23f59e0b' stop-opacity='.42'/%3E%3Cstop offset='1' stop-color='%23f59e0b' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='5.5' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='60' cy='10.0' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='108' cy='5.5' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='156' cy='8.9' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='204' cy='8.9' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3C/svg%3E"); }
.xm-lights i:last-child { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='20' viewBox='0 0 240 20'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff6d6'/%3E%3Cstop offset='.26' stop-color='%23fbbf24'/%3E%3Cstop offset='.44' stop-color='%23f59e0b' stop-opacity='.42'/%3E%3Cstop offset='1' stop-color='%23f59e0b' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='36' cy='8.9' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='84' cy='8.9' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='132' cy='5.5' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='180' cy='10.0' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='228' cy='5.5' r='6.5' fill='url(%23g)' fill-opacity='1'/%3E%3C/svg%3E"); animation-delay: -2s; }
@keyframes xm-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}
/* Navbar nascosta scorrendo: il filo sporgerebbe dal bordo dello schermo */
.navbar.is-autohidden > .xm-lights { opacity: 0; }
.m-nav:has(> .xm-lights--m) { position: relative; }
.xm-lights--m,
.xm-lights--m i { background-size: 180px 15px; }
.xm-lights--m { height: 15px; margin-top: -2px; }
@media (max-width: 1100px) {
    .navbar > .xm-lights { display: none; }
}

/* ── 3. Neve sul footer ──────────────────────────────────────── */
.xm-foot { position: relative; }
.xm-snow {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 46px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='46' viewBox='0 0 640 46'%3E%3Cdefs%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.35' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23d5e5f6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M-2 0V16.5H0C8.4 35.25 61.6 35.25 70 16.5C75.0 26.5 107.0 26.5 112 16.5C122.6 41.5 189.4 41.5 200 16.5C206.5 30.25 247.5 30.25 254 16.5C261.7 37.75 310.3 37.75 318 16.5C322.6 25.25 351.4 25.25 356 16.5C367.5 44 440.5 44 452 16.5C458.0 29 496.0 29 502 16.5C511.4 39 570.6 39 580 16.5C587.2 31.5 632.8 31.5 640 16.5H642V0z' fill='%238fb0d8' fill-opacity='.6'/%3E%3Cpath d='M-2 0V14H0C8.4 32.75 61.6 32.75 70 14C75.0 24 107.0 24 112 14C122.6 39 189.4 39 200 14C206.5 27.75 247.5 27.75 254 14C261.7 35.25 310.3 35.25 318 14C322.6 22.75 351.4 22.75 356 14C367.5 41.5 440.5 41.5 452 14C458.0 26.5 496.0 26.5 502 14C511.4 36.5 570.6 36.5 580 14C587.2 29 632.8 29 640 14H642V0z' fill='url(%23w)'/%3E%3Ccircle cx='40' cy='40' r='1.6' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='92' cy='33' r='1.1' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='176' cy='44' r='1.3' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='231' cy='37' r='1.7' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='300' cy='42' r='1.1' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='338' cy='35' r='1.4' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='472' cy='36' r='1.2' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='548' cy='43' r='1.6' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='612' cy='38' r='1.1' fill='%23fff' fill-opacity='.6'/%3E%3C/svg%3E") 50% 0 / 640px 46px repeat-x;
}
/* La riga luminosa in cima al footer finirebbe sopra la neve */
.footer.xm-foot::before { opacity: 0; }
.footer.xm-foot { border-top-width: 0; padding-top: 72px; }
.m-footer.xm-foot { padding-top: 46px; }
.m-footer .xm-snow { height: 32px; background-size: 445px 32px; }

/* ── 4. Lucine in sequenza all'uscita di un bonus ────────────────
   .has-hit sulla testata di /stats la mette gs-hero-fx.js (5 s). */
.xm-lights::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='20' viewBox='0 0 240 20'%3E%3Cdefs%3E%3CradialGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff6d6'/%3E%3Cstop offset='.26' stop-color='%23fbbf24'/%3E%3Cstop offset='.44' stop-color='%23f59e0b' stop-opacity='.42'/%3E%3Cstop offset='1' stop-color='%23f59e0b' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='5.5' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='12' cy='5.5' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='36' cy='8.9' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='36' cy='8.9' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='60' cy='10.0' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='60' cy='10.0' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='84' cy='8.9' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='84' cy='8.9' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='108' cy='5.5' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='108' cy='5.5' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='132' cy='5.5' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='132' cy='5.5' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='156' cy='8.9' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='156' cy='8.9' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='180' cy='10.0' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='180' cy='10.0' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='204' cy='8.9' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='204' cy='8.9' r='2.6' fill='%23fffbe8'/%3E%3Ccircle cx='228' cy='5.5' r='10' fill='url(%23g)' fill-opacity='1'/%3E%3Ccircle cx='228' cy='5.5' r='2.6' fill='%23fffbe8'/%3E%3C/svg%3E") 50% 0 / 240px 20px repeat-x;
    -webkit-mask: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent) 0 0 / 50% 100% no-repeat;
            mask: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent) 0 0 / 50% 100% no-repeat;
}
body:has(.gs-hfx.has-hit) .navbar.xm-live > .xm-lights::after {
    animation: xm-chase 2s ease-in-out;
}
@keyframes xm-chase {
    0%   { opacity: 1; -webkit-mask-position: -100% 0; mask-position: -100% 0; }
    50%  { opacity: 1; -webkit-mask-position: 200% 0; mask-position: 200% 0; }
    100% { opacity: 1; -webkit-mask-position: -100% 0; mask-position: -100% 0; }
}

/* ── 5. Stelline dorate sull'icona del bonus uscito ──────────── */
body:has(.navbar.xm-trail) .gs-hfx__i.is-hit::after {
    content: "";
    position: absolute;
    inset: -42%;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath transform='translate(24 44) scale(13)' fill='%23fbbf24' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(52 14) scale(9)' fill='%23fde047' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(112 18) scale(14)' fill='%23facc15' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(142 58) scale(10)' fill='%23fbbf24' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(136 112) scale(13)' fill='%23fde047' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(98 146) scale(9)' fill='%23facc15' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(46 140) scale(13)' fill='%23fbbf24' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(14 98) scale(9)' fill='%23fde047' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(78 6) scale(5)' fill='%23fff7cc' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(152 88) scale(5)' fill='%23fff7cc' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(70 154) scale(5)' fill='%23fff7cc' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3Cpath transform='translate(6 70) scale(5)' fill='%23fff7cc' d='M0-1C.12-.25.25-.12 1 0 .25.12.12.25 0 1-.12.25-.25.12-1 0-.25-.12-.12-.25 0-1z'/%3E%3C/svg%3E") center / contain no-repeat;
    animation: xm-stars 1.5s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes xm-stars {
    0%   { opacity: 0; transform: scale(.35) rotate(-25deg); }
    25%  { opacity: 1; }
    65%  { opacity: 1; transform: scale(1.06) rotate(6deg); }
    100% { opacity: 0; transform: scale(1.22) rotate(14deg); }
}

/* ── 6. Fiocco sulla campanella ──────────────────────────────── */
.navbar.xm-bell .notif-bell-btn { position: relative; }
.navbar.xm-bell .notif-bell-btn::before,
.m-nav.xm-bell .m-nav__bell::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 2px;
    width: 18px;
    height: 11px;
    margin-left: -15px;
    rotate: -14deg;  /* spostato a sinistra: il contatore resta leggibile */
    pointer-events: none;
    z-index: 1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='20' viewBox='0 0 32 20'%3E%3Cg stroke='%238f0f1c' stroke-width='1' stroke-linejoin='round'%3E%3Cpath d='M14 9 9 19l4-1 3-7z' fill='%23c81e32'/%3E%3Cpath d='M18 9l5 10-4-1-3-7z' fill='%23c81e32'/%3E%3Cpath d='M16 7C11 0 3 0 2 3c-1 4 0 9 3 9 4 0 8-2 11-5z' fill='%23ef3347'/%3E%3Cpath d='M16 7c5-7 13-7 14-4 1 4 0 9-3 9-4 0-8-2-11-5z' fill='%23ef3347'/%3E%3Crect x='12.8' y='4' width='6.4' height='7' rx='2.4' fill='%23d61f35'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.m-nav.xm-bell .m-nav__bell::before { top: 4px; }
.navbar.xm-bell .notif-badge,
.m-nav.xm-bell .m-nav__notif-count { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
    .xm-lights { transition: none; }
    .xm-lights i,
    body:has(.gs-hfx.has-hit) .navbar.xm-live > .xm-lights::after { animation: none; }
    body:has(.navbar.xm-trail) .gs-hfx__i.is-hit::after { content: none; }
    .navbar.xm-logo .brand-link picture::after { transition: none; }
    .navbar.xm-logo--hat .brand-link:hover picture::after { transform: none; }
}
@media print {
    .xm-lights, .xm-snow { display: none; }
    .xm-logo picture::after { content: none; }
}
