/* ---- Seasonal decorations (sæsonpynt) - PROTOTYPE ----
   Loaded always; does nothing until <html> carries a season-* class
   (set by js/seasons.js from ?season= or onlineOrdering.season). */

/* 1. No palette: a season never changes the venue's theme colours (decided
   2026-11-18 - the owner picked their theme; Sæsonpynt only adds decorations). */

/* 2. Hero garnish: pinned to the top edge, click-through, under the pills. */
.w-season-garnish { position: absolute; top: 0; left: 0; right: 0; z-index: 3; pointer-events: none; }
.w-season-garnish svg { display: block; width: 100%; height: auto; }
/* Illustrations (assets/seasons/) - never interactive, never announced. */
.w-season-sticker img, .w-season-scene img, .w-season-corner img, .w-season-layer img { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* Corner piece (top-left) and scene piece (bottom-right) on the hero only. */
.w-season-corner { position: absolute; top: -6px; left: -4px; width: 104px; height: 104px; z-index: 3; pointer-events: none; }
.w-season-scene { position: absolute; right: 12px; bottom: 6px; width: 92px; height: 92px; z-index: 2; pointer-events: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
.w-hero--plain .w-season-scene { width: 70px; height: 70px; bottom: 0; }
.w-hero--plain .w-season-corner { width: 88px; height: 88px; }
/* Keep the venue name clear of the scene piece. */
.w-hero:has(.w-season-scene) .w-hero-name { padding-right: 112px; }
.w-hero--plain .w-season-garnish--halloween svg, .w-season-garnish--halloween svg { height: 70px; }
.w-season-garnish .twinkle { animation: wSeasonTwinkle 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.65s); transform-box: fill-box; transform-origin: center; }
@keyframes wSeasonTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.w-season-garnish .bat { animation: wSeasonBob 3.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.1s); }
@keyframes wSeasonBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }

/* Paper layout has no hero: the garnish hangs from the fixed header, which
   grows a strip at the top to make room (and its flow spacer with it). */
.w-header.w-season-hdr { padding-top: 40px; overflow: hidden; }
.w-header.w-season-hdr .w-season-garnish svg { height: 34px; }
.w-header.w-season-hdr .w-season-garnish--halloween svg { height: 70px; }
/* Both add the pinned top row's height (--top-h, unset without the sections
   bar), like the offsets they override in styles.css. */
.w-header.w-season-hdr + .w-header-spacer-cats { height: calc(131px + var(--top-h, 0px)); }
.w-root[data-view="menu"] .w-header.w-season-hdr ~ .w-notice-banner { top: calc(137px + var(--top-h, 0px)); }

/* Sticker on the cart pill (hero + fixed header). */
.w-hero-cart, .w-cart-btn { overflow: visible; }
.w-season-sticker { position: absolute; top: -15px; left: -13px; width: 32px; height: 32px; transform: rotate(-14deg); pointer-events: none; z-index: 6; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.w-season-sticker--paaske { top: -19px; left: -8px; transform: rotate(-8deg); }
.w-season-sticker--halloween { top: -16px; left: -14px; transform: rotate(-8deg); }
.w-season-sticker--nytaar { top: -19px; left: -11px; transform: rotate(-18deg); }

/* Loader: ring + sticker share a box so the sticker can perch on the ring. */
.w-loading-mark { position: relative; width: 36px; height: 36px; margin-bottom: 16px; }
.w-loading-mark .w-loading-spinner { margin-bottom: 0; }
.w-season-sticker--loader { top: -18px; left: -14px; width: 34px; height: 34px; }

/* 3. Ambient particles: one fixed layer the width of the widget column,
   under the fixed header (100) and bottom bar (150), click-through. */
.w-season-layer { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: 100vh; pointer-events: none; z-index: 90; overflow: hidden; }
.w-season-layer { transition: opacity 1.8s ease; }
.w-season-layer.is-fading { opacity: 0; }
.w-season-layer i { position: absolute; top: -8vh; left: var(--x); width: var(--s); height: var(--s); opacity: var(--o, 0.8); animation: wSeasonFall var(--d) linear var(--delay) infinite; will-change: transform; }
@keyframes wSeasonFall { to { transform: translate3d(var(--sway), 115vh, 0) rotate(var(--rot)); } }
/* snow: dots, with every 4th flake the snowflake illustration */
.season-jul .w-season-layer i { background: #fff; border-radius: 50%; box-shadow: 0 0 6px rgba(255, 255, 255, 0.55); }
.season-jul .w-season-layer i.img { background: none !important; box-shadow: none !important; border-radius: 0; }
.theme-light.season-jul .w-season-layer i, .theme-warm.season-jul .w-season-layer i, .theme-ocean.season-jul .w-season-layer i, .theme-paper.season-jul .w-season-layer i { background: #BFDBFE; box-shadow: none; }
/* autumn leaves - the asymmetric radius makes a leaf */
.season-halloween .w-season-layer i { background: linear-gradient(135deg, #F97316, #B45309); border-radius: 0 70% 0 70%; }
.season-halloween .w-season-layer i:nth-child(3n) { background: linear-gradient(135deg, #DC2626, #7F1D1D); }
.season-halloween .w-season-layer i:nth-child(3n+1) { background: linear-gradient(135deg, #FBBF24, #B45309); }
/* confetti */
.season-nytaar .w-season-layer i { height: calc(var(--s) * 0.45); border-radius: 1px; background: #FDE68A; }
.season-nytaar .w-season-layer i:nth-child(3n) { background: #F5F5F5; }
.season-nytaar .w-season-layer i:nth-child(3n+1) { background: #7DD3FC; }

@media (prefers-reduced-motion: reduce) {
  .w-season-layer { display: none; }
  .w-season-garnish .twinkle, .w-season-garnish .bat { animation: none; }
}
