/* XMAS_V1 — share.barsonsol.com Christmas layer. Injected into every page by nginx (sub_filter, marker XMAS_V1).
   Everything is scoped to html.xmas (added by xmas.js), so removing the nginx lines turns it all off. */
html.xmas{--xm-red:#e8383d;--xm-red2:#b71c25;--xm-green:#1fa45a;--xm-green2:#0f6b39;--xm-gold:#ffcc00;--xm-snow:#f5f9ff}

/* festive glow: a see-through overlay (keeps every page's own background picture) */
.xm-glow{position:fixed;inset:0;z-index:2147482998;pointer-events:none;mix-blend-mode:screen;
  background:radial-gradient(900px 520px at 4% -8%, rgba(31,164,90,.16), transparent 62%),
             radial-gradient(820px 480px at 106% 0%, rgba(232,56,61,.14), transparent 60%),
             radial-gradient(700px 360px at 50% 115%, rgba(255,204,0,.05), transparent 65%)}
/* Christmas version of the home page background (only once the pictures exist) */
html.xmas.xm-homebg body{background-image:url(/xmas/img/webback-xmas.jpg) !important}
@media (max-width:600px){html.xmas.xm-homebg body{background-image:url(/xmas/img/phoneback-xmas.jpg) !important}}

/* string of lights across the very top */
.xm-lights{position:fixed;left:0;right:0;top:0;height:18px;z-index:2147483000;pointer-events:none;overflow:hidden}
.xm-lights svg{position:absolute;left:0;top:0;width:100%;height:18px}
.xm-lights i{position:absolute;top:0;width:7px;height:10px;margin-left:-3.5px;border-radius:50% 50% 50% 50%/40% 40% 60% 60%;background:var(--c);
  box-shadow:0 0 5px 1px var(--c),0 0 11px 2px var(--g);animation:xm-tw 2.6s ease-in-out infinite;animation-delay:var(--d)}
.xm-lights i:before{content:'';position:absolute;left:1.5px;top:-2px;width:4px;height:3px;border-radius:1px;background:#3a3f36}
@keyframes xm-tw{0%,100%{opacity:1;filter:none}45%{opacity:.35;box-shadow:0 0 2px 0 var(--c)}55%{opacity:.4}}

/* falling snow */
.xm-snow{position:fixed;inset:0;width:100vw;height:100vh;z-index:2147482999;pointer-events:none}

/* snow drift along the bottom of the sticky header */
html.xmas .top:after{content:'';position:absolute;left:0;right:0;bottom:-7px;height:10px;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M0 0h120v3c-6 0-8 5-15 5s-9-4-16-4-8 6-17 6-9-5-15-5-9 3-15 3S33 3 26 3 16 9 9 9 2 4 0 4z' fill='%23eef4ff' fill-opacity='.92'/%3E%3C/svg%3E") repeat-x 0 0/120px 10px;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))}

/* Santa hat on the $BARS logo (only once /xmas/img/hat.png exists) */
html.xmas.xm-hat .brand b,html.xmas.xm-hat .brand-logo{position:relative;display:inline-block}
html.xmas.xm-hat .brand b:before,html.xmas.xm-hat .brand-logo:before{content:'';position:absolute;left:-12px;top:-15px;width:26px;height:26px;
  background:url(/xmas/img/hat.png) center/contain no-repeat;transform:rotate(-22deg);pointer-events:none}
html.xmas.xm-hat .brand-logo:before{left:-16px;top:-20px;width:34px;height:34px}

/* holiday greeting on the home page */
.xm-greet{margin:14px auto 0;max-width:360px;padding:9px 12px;border-radius:10px;text-align:center;font-size:12px;line-height:1.45;color:#f3f6ee;
  background:linear-gradient(90deg,rgba(183,28,37,.28),rgba(15,107,57,.28));border:1px solid rgba(255,255,255,.12);box-shadow:0 0 18px rgba(232,56,61,.12)}
.xm-greet b{color:var(--xm-gold)}
.xm-banner{display:block;width:100%;max-width:360px;margin:14px auto 0;border-radius:12px;border:1px solid rgba(255,255,255,.1)}

/* small snow on/off button */
.xm-tog{position:fixed;right:12px;bottom:86px;z-index:2147483001;width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.18);
  background:rgba(10,14,20,.72);color:#eaf3ff;font-size:16px;line-height:32px;text-align:center;cursor:pointer;padding:0;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.xm-tog:hover{border-color:var(--xm-gold)}.xm-tog.off{opacity:.55}
@media (min-width:900px){.xm-tog{bottom:18px}}

/* soft red glow on card hover */
html.xmas.xm-dark .card:hover,html.xmas.xm-dark .fd-box:hover{box-shadow:0 0 0 1px rgba(255,255,255,.04),0 6px 26px -10px rgba(232,56,61,.35)}
@media (prefers-reduced-motion:reduce){.xm-lights i{animation:none}}
