/*
 * Shared chrome for the seasonal decorations: the footer switch, and the rule
 * that hides every decoration once a visitor has switched them off.
 *
 * The preference lives in localStorage under `epcchoice-seasonal-effects` and
 * is applied to <html> as data-seasonal-effects by an inline script in the page
 * head. The decoration itself is hidden by .seasonal-effects-off, also set in
 * the head, so an opted-out visitor never sees it painted in the first place.
 */

.seasonal-effects-off .halloween-cobwebs,
.seasonal-effects-off .seasonal-fireworks,
.seasonal-effects-off .seasonal-lights {
    display: none !important;
}

.seasonal-toggle {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    color: #ccc;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

/* Kept in the layout for keyboard and screen-reader users, not painted. */
.seasonal-toggle__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.seasonal-toggle__track {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    margin-right: 8px;
    border-radius: 999px;
    background: #6cc04a;
    transition: background-color .2s ease;
}

.seasonal-toggle__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transform: translateX(14px);
    transition: transform .2s ease;
}

.seasonal-toggle:hover .seasonal-toggle__track {
    filter: brightness(1.1);
}

.seasonal-toggle__input:focus-visible + .seasonal-toggle__track {
    outline: 2px solid #6cc04a;
    outline-offset: 2px;
}

html[data-seasonal-effects="off"] .seasonal-toggle__track {
    background: #6f6f6f;
}

html[data-seasonal-effects="off"] .seasonal-toggle__knob {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .seasonal-toggle__track,
    .seasonal-toggle__knob {
        transition: none;
    }
}

@media print {
    .seasonal-toggle {
        display: none !important;
    }
}
