/* =====================================================================================
   CHRISTMAS LAYER (seasonal, 2026) — decoration only. Pairs with /assets/xmas.js.
   SWITCH OFF: delete the XMAS block in modules/global/templates/pageHead.html and restart
   the worker. Apart from the logo swap and 12px more footer padding, every rule here is absolutely
   positioned / pointer-events:none, so nothing shifts layout or blocks a click.
   ===================================================================================== */

:root {
    /* Santa hat, 100x84, band at the bottom, tip flopping to the right */
    --xmas-hat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 84'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23f03a47'/%3E%3Cstop offset='1' stop-color='%23b3121c'/%3E%3C/linearGradient%3E%3CradialGradient id='w' cx='.4' cy='.35' r='.75'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.65' stop-color='%23f5f5f5'/%3E%3Cstop offset='1' stop-color='%23d2d2d2'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath fill='url(%23r)' d='M16 64C18 36 34 14 60 11C78 9 89 18 91 32L83 36C81 28 75 24 67 26C71 40 74 52 80 64Z'/%3E%3Cpath fill='%238f0d15' fill-opacity='.35' d='M67 26C71 40 74 52 80 64H66C66 50 65 38 67 26Z'/%3E%3Crect x='8' y='58' width='80' height='20' rx='10' fill='url(%23w)'/%3E%3Ccircle cx='88' cy='35' r='11' fill='url(%23w)'/%3E%3C/svg%3E");
    /* snow lying on an edge: mounds above y=8, drips below; tiles seamlessly every 240 */
    --xmas-snowcap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 30' preserveAspectRatio='none'%3E%3Cpath transform='translate(0 2)' fill='%23000' fill-opacity='.13' d='M0 8C20 2 40 2 60 6C80 0 110 1 130 5C150 0 180 2 200 6C215 2 230 3 240 8V14C236 14 234 20 230 20C226 20 225 14 220 14H180C176 14 175 26 170 26C165 26 164 14 160 14H120C117 14 116 18 112 18C108 18 107 14 104 14H70C66 14 65 23 60 23C55 23 54 14 50 14H20C17 14 16 19 12 19C8 19 7 14 4 14H0Z'/%3E%3Cpath fill='%23fff' d='M0 8C20 2 40 2 60 6C80 0 110 1 130 5C150 0 180 2 200 6C215 2 230 3 240 8V14C236 14 234 20 230 20C226 20 225 14 220 14H180C176 14 175 26 170 26C165 26 164 14 160 14H120C117 14 116 18 112 18C108 18 107 14 104 14H70C66 14 65 23 60 23C55 23 54 14 50 14H20C17 14 16 19 12 19C8 19 7 14 4 14H0Z'/%3E%3C/svg%3E");
}

/* ---------- Christmas logos ----------
   Same boxes as style.css / style-r.css, only the picture changes. Both breakpoints are
   restated here: this file loads after style-r.css, so a bare rule would also beat the
   >=650 one there. Absolute paths: this file is served from /assets/.
   Sources: _redesign/img/logo_3d-xmas.png and _redesign/img/eggless-cake-shop-logo-full-xmas.png (trimmed,
   resized to 3x / 2x the box, webp). */
top-logo::after {
    background-image: url("/img/logo_3d-xmas.webp?x261130");
}
@media (min-width: 650px) {
    top-logo::after {
        background-image: url("/img/eggless-cake-shop-logo-full-xmas.webp?x261130");
    }
}

/* ---------- Santa hat on the basket button ---------- */
xmas-hat {
    position: absolute;
    display: block;
    pointer-events: none;
    aspect-ratio: 100 / 84;
    background: var(--xmas-hat) center / contain no-repeat;
    z-index: 100;
}
/* leans left, so the pom-pom never reaches the screen edge (the button sits 10px from it) */
top-basket xmas-hat {
    width: 30px;
    top: -15px;
    left: -7px;
    transform: rotate(-22deg);
}
/* ---------- falling snow (canvas from xmas.js) ----------
   98: under the header controls, basket and mobile menu (99) and modals (999) */
canvas.xmas-snow {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 98;
}

/* ---------- snow lying on the footer and on the mobile menu bar ---------- */
/* 10px -> 22px so the drips clear the first row of footer links and the logo */
page-footer {
    padding-top: 22px;
}
page-footer::before {
    position: absolute;
    display: block;
    content: "";
    left: 0;
    right: 0;
    top: -8px;
    height: 30px;
    background: var(--xmas-snowcap) 0 0 / 240px 30px repeat-x;
    pointer-events: none;
}
mobile-menu::before {
    position: absolute;
    display: block;
    content: "";
    left: 0;
    right: 0;
    top: -8px;
    height: 20px;
    background: var(--xmas-snowcap) 0 0 / 170px 20px repeat-x;
    pointer-events: none;
}
