/* Aero Gazette: Christmas mode. Decorations only: everything is aria-hidden and ignores the pointer. */

/* ---------- light string ---------- */
.xmas-lights{position:absolute;left:0;right:0;top:-8px;height:46px;overflow:hidden;z-index:3;pointer-events:none;
  border-radius:var(--radius) var(--radius) 0 0}
.xmas-lights ul{display:flex;margin:0;padding:0;list-style:none;height:100%;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='26'%3E%3Cpath d='M0 6 Q24 24 48 6' fill='none' stroke='%23122a14' stroke-width='2.2'/%3E%3Cpath d='M0 5 Q24 23 48 5' fill='none' stroke='%23406b44' stroke-width='.8' opacity='.7'/%3E%3C/svg%3E") repeat-x 0 0/48px 26px}
.xmas-lights li{position:relative;flex:none;width:48px;height:100%}
/* socket */
.xmas-lights li::before{content:"";position:absolute;left:20px;top:13px;width:8px;height:7px;border-radius:2px 2px 1px 1px;
  background:linear-gradient(90deg,#1c3a1e,#4e7d50 45%,#1c3a1e);box-shadow:0 1px 0 rgba(0,0,0,.5)}
/* bulb */
.xmas-lights i{--c:#ff3b3b;--hi:#ffb3b3;position:absolute;left:17px;top:19px;width:14px;height:20px;
  border-radius:50% 50% 50% 50%/42% 42% 58% 58%;
  background:radial-gradient(circle at 35% 30%,var(--hi) 0 18%,var(--c) 55%,color-mix(in srgb,var(--c) 60%,#000) 100%);
  box-shadow:inset 0 -2px 3px rgba(0,0,0,.25);opacity:.55;transition:opacity .3s}
.xmas-lights i::after{content:"";position:absolute;inset:-10px -9px;border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--c) 75%,transparent) 0,transparent 70%);opacity:0;filter:blur(2px)}
.xmas-lights i::before{content:"";position:absolute;left:3px;top:3px;width:4px;height:7px;border-radius:50%;background:rgba(255,255,255,.85);z-index:1}
.xmas-lights li:nth-child(5n+2) i{--c:#ffcc00;--hi:#fff3b0}
.xmas-lights li:nth-child(5n+3) i{--c:#2ed158;--hi:#b6ffc7}
.xmas-lights li:nth-child(5n+4) i{--c:#2a9be6;--hi:#c2e8ff}
.xmas-lights li:nth-child(5n+5) i{--c:#ff4fd8;--hi:#ffc2f1}
/* lit state */
.xmas-lights i.on,.xmas-lights.is-steady i{opacity:1}
.xmas-lights i.on::after,.xmas-lights.is-steady i::after{opacity:.9}
/* patterns (the script switches between them) */
.xmas-lights.is-twinkle i{animation:xmas-twinkle 2.4s ease-in-out var(--d) infinite}
.xmas-lights.is-twinkle i::after{animation:xmas-glow 2.4s ease-in-out var(--d) infinite}
.xmas-lights.is-chase i{animation:xmas-chase 1.5s steps(1) calc(var(--i) * -.1s) infinite}
.xmas-lights.is-chase i::after{animation:xmas-chase-glow 1.5s steps(1) calc(var(--i) * -.1s) infinite}
.xmas-lights.is-alternate li:nth-child(odd) i,.xmas-lights.is-alternate li:nth-child(odd) i::after{animation:xmas-alt 1.6s steps(1) infinite}
.xmas-lights.is-alternate li:nth-child(even) i,.xmas-lights.is-alternate li:nth-child(even) i::after{animation:xmas-alt 1.6s steps(1) -.8s infinite}
@keyframes xmas-twinkle{0%,100%{opacity:1}50%{opacity:.5}}
@keyframes xmas-glow{0%,100%{opacity:.95}50%{opacity:.1}}
@keyframes xmas-chase{0%{opacity:1}33%{opacity:.45}}
@keyframes xmas-chase-glow{0%{opacity:.95}33%{opacity:0}}
@keyframes xmas-alt{0%{opacity:1}50%{opacity:.45}}
.xmas-lights.is-alternate li:nth-child(odd) i::after,.xmas-lights.is-alternate li:nth-child(even) i::after{animation-name:xmas-chase-glow;animation-duration:1.6s}
.is-xmas .site-header{padding-top:34px}

/* ---------- Santa hat on the logo ---------- */
.branding{position:relative}
.is-xmas.xmas-decor .branding{align-items:flex-start}
.xmas-hat{position:absolute;left:-6px;top:-24px;width:52px;height:46px;z-index:2;pointer-events:none;
  transform:rotate(-16deg);transform-origin:30% 90%;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45));
  animation:xmas-hat 6s cubic-bezier(.34,1.56,.64,1) infinite}
@keyframes xmas-hat{0%,70%,100%{transform:rotate(-16deg)}78%{transform:rotate(-24deg)}86%{transform:rotate(-12deg)}}

/* ---------- countdown pill ---------- */
.xmas-count{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:2px 10px 2px 6px;border-radius:999px;vertical-align:middle;
  font:700 11px/18px Verdana,var(--ui);color:#fff;text-shadow:0 1px 0 rgba(0,0,0,.45);
  background:linear-gradient(#ff8a8a 0%,#e0242c 49%,#b8131b 50%,#e3363d 100%);border:1px solid #6e0a10;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 0 10px rgba(255,80,80,.35)}
.xmas-count [hidden]{display:none}
.xmas-count b{font-size:12px}
.xmas-count__tree{width:12px;height:14px;flex:none;background:linear-gradient(#7dff9a,#14a83a);
  clip-path:polygon(50% 0,80% 38%,66% 38%,94% 76%,58% 76%,58% 100%,42% 100%,42% 76%,6% 76%,34% 38%,20% 38%);filter:drop-shadow(0 0 2px #fff)}

/* ---------- icicles under the header ---------- */
.xmas-icicles{position:absolute;left:10px;right:10px;bottom:-15px;height:16px;z-index:3;pointer-events:none;opacity:.92;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23cfefff'/%3E%3Cstop offset='.45' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%2389c9f0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 0h120v2l-4 0-2 9-2-9-7 0-2 13-3-13-6 0-1 6-2-6-8 0-2 11-3-11-6 0-1 5-2-5-9 0-2 14-3-14-6 0-1 7-2-7-8 0-2 10-3-10-6 0-1 5-2-5-7 0-2 12-3-12-5 0-1 6-2-6-6 0z'/%3E%3C/svg%3E") repeat-x 0 0/120px 16px;
  filter:drop-shadow(0 2px 2px rgba(0,40,80,.25))}

/* ---------- snow caps on widget title bars, the footer and the lead story ---------- */
.xmas-decor .widget-title,.xmas-decor .gradient-widget .wp-block-heading:first-child{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='9' preserveAspectRatio='none'%3E%3Cpath d='M0 0h200v4c-8 3-14 5-22 3s-12-4-20-2-10 5-18 4-12-5-22-4-14 6-24 5-10-4-18-3-12 4-20 3-14-5-22-4-10 4-18 3-10-3-16-4z' fill='%23fff'/%3E%3Cpath d='M0 4c6 1 10 4 16 4s10-2 18-3 12 4 20 4 12-4 18-4 12 5 22 4 14-6 24-5 12 5 22 4 10-5 18-4 12 5 20 2 14-2 22-3' fill='none' stroke='%23a9cfee' stroke-width='1'/%3E%3C/svg%3E"),
    linear-gradient(#5cbcf2 0%,#2a9be6 49%,#0a74c8 50%,#3aa8ee 100%);
  background-size:100% 9px,auto;background-repeat:no-repeat;padding-top:12px}
.xmas-decor .site-footer{position:relative}
.xmas-decor .site-footer::before{content:"";position:absolute;left:0;right:0;top:-2px;height:12px;pointer-events:none;border-radius:var(--radius) var(--radius) 0 0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='12' preserveAspectRatio='none'%3E%3Cpath d='M0 0h300v5c-10 4-20 7-34 5s-20-6-34-4-16 7-30 6-18-7-34-6-20 8-36 7-14-5-28-4-18 6-32 4-20-6-34-5-12 3-18 2z' fill='%23fff'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat;
  filter:drop-shadow(0 1px 1px rgba(0,30,60,.35))}

/* ---------- baubles hanging off the page edges (wide screens) ---------- */
.xmas-baubles{display:none}
@media (min-width:1260px){
  .xmas-baubles{display:block;position:absolute;inset:0;pointer-events:none;z-index:4}
  .xmas-bauble{position:absolute;top:-8px;width:2px;height:var(--len);background:linear-gradient(#d9c27a,#8a6d1d);transform-origin:50% 0;
    animation:xmas-swing 4.5s ease-in-out calc(var(--n) * -.7s) infinite alternate}
  .xmas-bauble--l{left:calc(-28px - var(--n) * 22px)}
  .xmas-bauble--r{right:calc(-28px - (var(--n) - 3) * 22px)}
  .xmas-bauble i{--c:#e01b24;position:absolute;left:50%;top:100%;width:30px;height:30px;margin-left:-15px;border-radius:50%;
    background:radial-gradient(circle at 34% 30%,#fff 0 7%,color-mix(in srgb,var(--c) 45%,#fff) 14%,var(--c) 48%,color-mix(in srgb,var(--c) 55%,#000) 100%);
    box-shadow:0 4px 10px rgba(0,0,0,.4),0 0 14px color-mix(in srgb,var(--c) 50%,transparent)}
  .xmas-bauble i::before{content:"";position:absolute;left:10px;top:-5px;width:10px;height:7px;border-radius:2px;background:linear-gradient(90deg,#8a6d1d,#f3dc8e 50%,#8a6d1d)}
  .xmas-bauble i::after{content:"";position:absolute;left:5px;right:5px;bottom:4px;height:8px;border-radius:50%;background:linear-gradient(rgba(255,255,255,0),rgba(255,255,255,.35))}
  .xmas-bauble--gold i{--c:#e6a800}
  .xmas-bauble--green i{--c:#17a34a}
  .xmas-bauble--blue i{--c:#1a7fd6}
  .xmas-bauble--silver i{--c:#9fb0c2}
}
@keyframes xmas-swing{from{transform:rotate(-7deg)}to{transform:rotate(7deg)}}

/* ---------- falling snow ---------- */
.xmas-snow{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:9970}
.snow-toggle{background:none;border:1px solid rgba(255,255,255,.35);border-radius:999px;padding:2px 10px;color:inherit;font:11px Verdana,var(--ui);cursor:pointer}
.snow-toggle[hidden]{display:none}
.snow-toggle:focus-visible{outline:2px solid #fff;outline-offset:2px}

@media (max-width:720px){
  .xmas-count{margin:4px 0 0;display:flex;width:max-content}
  .xmas-hat{left:-4px;top:-20px;width:42px;height:38px}
}
@media (prefers-reduced-motion:reduce){
  .xmas-lights i,.xmas-lights i::after,.xmas-hat,.xmas-bauble{animation:none!important}
  .xmas-lights i{opacity:1}.xmas-lights i::after{opacity:.8}
}
@media print{.xmas-lights,.xmas-icicles,.xmas-baubles,.xmas-snow,.xmas-hat{display:none!important}}
