/* Explain: Styles for the winter theme, including snow, lights, and decorations. */
/* ==========================================================================
   Seasonal winter theme (EN / NL / DE)
   Falling snow, warm light strings, snowy button edges and evergreen
   decorations. Everything here is added by js/winter-theme.js and can be
   switched off completely with the floating winter button — switching it
   off restores the original look of the site.
   ========================================================================== */

/* ---------- Falling snow ---------- */
#wi-snow {
    position: fixed;
    inset: 0;
    z-index: 30;
    overflow: hidden;
    pointer-events: none;
}

.wi-flake {
    position: absolute;
    top: 0;
    opacity: 0;
    border-radius: 999px;
    background: radial-gradient(circle at 38% 34%, #ffffff 0%, rgba(255, 255, 255, 0.8) 48%, rgba(255, 255, 255, 0) 74%);
    will-change: transform, opacity;
    animation-name: wi-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes wi-fall {
    0%   { transform: translate3d(0, -14vh, 0); opacity: 0; }
    10%  { opacity: var(--wi-opacity, 0.5); }
    86%  { opacity: var(--wi-opacity, 0.5); }
    100% { transform: translate3d(var(--wi-drift, 0px), 110vh, 0); opacity: 0; }
}

/* ---------- Warm light string with evergreen boughs ---------- */
.wi-garland {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    height: 40px;
    pointer-events: none;
    z-index: 6;
}

.wi-lights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 10px;
}

.wi-lights::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 196, 92, 0) 0%, rgba(255, 196, 92, 0.45) 10%, rgba(255, 196, 92, 0.45) 90%, rgba(255, 196, 92, 0) 100%);
    opacity: 0.7;
}

.wi-bulb {
    position: relative;
    width: 7px;
    height: 10px;
    margin-top: 3px;
    border-radius: 50% 50% 46% 46%;
    background: radial-gradient(circle at 50% 32%, #fff4d2 0%, #ffd07a 42%, #f2a83c 72%, #a86c1c 100%);
    box-shadow: 0 0 5px 2px rgba(255, 196, 92, 0.55);
    animation: wi-twinkle var(--wi-twinkle, 4s) ease-in-out infinite;
    animation-delay: var(--wi-delay, 0s);
}

@keyframes wi-twinkle {
    0%, 100% { opacity: 0.42; transform: scale(0.92); box-shadow: 0 0 3px 1px rgba(255, 196, 92, 0.35); }
    50%      { opacity: 1;    transform: scale(1.08); box-shadow: 0 0 11px 3px rgba(255, 210, 120, 0.9); }
}

.wi-bough {
    position: absolute;
    bottom: -4px;
    width: 150px;
    height: 44px;
    pointer-events: none;
    opacity: 0.96;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.wi-bough svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wi-bough--left { left: -4px; }
.wi-bough--right { right: -4px; transform: scaleX(-1); }

/* ---------- Snow along the top edge of buttons and panels ---------- */
.wi-snowy { position: relative; }

.wi-snowcap {
    position: absolute;
    top: -1px;
    left: 4%;
    right: 4%;
    height: 6px;
    z-index: 3;
    pointer-events: none;
    border-radius: 999px 999px 50% 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 55%, rgba(238, 246, 255, 0) 100%);
    opacity: 0.9;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.wi-snowy-panel { position: relative; }

.wi-snowridge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    z-index: 4;
    pointer-events: none;
    opacity: 0.9;
    background:
        radial-gradient(circle at 12px 3px, #ffffff 0 3px, rgba(255, 255, 255, 0) 4px),
        radial-gradient(circle at 38px 4px, #ffffff 0 4px, rgba(255, 255, 255, 0) 5px),
        radial-gradient(circle at 68px 3px, #ffffff 0 3px, rgba(255, 255, 255, 0) 4px),
        radial-gradient(circle at 104px 4px, #ffffff 0 4px, rgba(255, 255, 255, 0) 5px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.35) 55%, rgba(255, 255, 255, 0) 100%);
    background-repeat: repeat-x;
    background-size: 130px 8px, 130px 8px, 130px 8px, 130px 8px, 100% 8px;
}

/* ---------- Winter on / off button ---------- */
.wi-toggle {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    background: rgba(8, 6, 4, 0.85);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.9), 0 0 16px -6px rgba(197, 160, 89, 0.5);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.wi-toggle:hover,
.wi-toggle:focus-visible {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-1px);
    outline: none;
}

.wi-toggle i { font-size: 0.95rem; }

.wi-toggle[aria-pressed="true"] i {
    animation: wi-spin 14s linear infinite;
}

@keyframes wi-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .wi-bough {
        width: 104px;
        height: 34px;
    }

    .wi-garland {
        bottom: -32px;
        height: 32px;
    }

    .wi-toggle {
        left: 10px;
        bottom: 10px;
        padding: 0.5rem;
        gap: 0;
    }

    .wi-toggle .wi-toggle-label {
        display: none;
    }
}

/* ---------- Accessibility and printing ---------- */
@media (prefers-reduced-motion: reduce) {
    .wi-flake,
    .wi-bulb,
    .wi-toggle[aria-pressed="true"] i {
        animation: none !important;
    }

    .wi-bulb {
        opacity: 0.85;
    }
}

@media print {
    #wi-snow,
    .wi-garland,
    .wi-snowcap,
    .wi-snowridge,
    .wi-toggle {
        display: none !important;
    }
}