/*!
 * ============================================================================
 * Seasonal Theme — Christmas  v1.0.0
 * Shared by home.jhaena and home.sossymo (identical file).
 * ============================================================================
 * Every selector is prefixed `season-` and only styles nodes the theme JS
 * injects (plus two host classes it adds/removes). With the theme off this
 * file isn't even loaded, so the storefront is untouched.
 *
 * Colours come from --season-* custom properties set by the JS from
 * config/seasonal.php → themes.christmas.palette, with hardcoded fallbacks.
 *
 * Version history
 *   v1.0.0 (2026-11-26) — Initial release.
 * ============================================================================
 */

/* ---------------------------------------------------------------------------
   0. Defs holder (gradients / symbols) — never visible
   --------------------------------------------------------------------------- */
.season-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   1. Garland under the top nav
   --------------------------------------------------------------------------- */
.season-garland {
    position: fixed;
    top: 72px;               /* JS sets the real nav bottom */
    left: 0;
    right: 0;
    height: 0;
    z-index: 999;            /* JS sets per-brand layer */
    pointer-events: none;
    overflow: visible;
}

.season-garland * {
    pointer-events: none;
}

.season-tinsel {
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--season-accent, #C5A44E) 0%,
        var(--season-accent-light, #F1DFA6) 12%,
        var(--season-accent, #C5A44E) 25%,
        var(--season-accent-light, #F1DFA6) 37%,
        var(--season-accent, #C5A44E) 50%,
        var(--season-accent-light, #F1DFA6) 62%,
        var(--season-accent, #C5A44E) 75%,
        var(--season-accent-light, #F1DFA6) 87%,
        var(--season-accent, #C5A44E) 100%
    );
    background-size: 200% 100%;
    opacity: 0.55;
    animation: season-tinsel 14s linear infinite;
}

.season-garland-body {
    position: absolute;
    inset: 0 0 auto 0;
    transform-origin: 50% 0;
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    /* `backwards` (not `both`) so the tucked transform below wins after the intro */
    animation: season-drop 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.season-garland--tucked .season-garland-body {
    opacity: 0;
    transform: translateY(-22px) scaleY(0.6);
}

.season-ribbon {
    position: absolute;
    left: 0;
    top: -1px;
    display: block;
    overflow: visible;
}

.season-bow {
    position: absolute;
    top: -1px;
    height: auto;
    overflow: visible;
}

.season-orn {
    position: absolute;
    transform-origin: 50% 0;
    animation: season-swing var(--dur, 6s) ease-in-out var(--delay, 0s) infinite alternate;
    will-change: transform;
}

.season-orn-string {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: var(--len, 8px);
    margin-left: -0.5px;
    background: linear-gradient(180deg, var(--season-accent-light, #F1DFA6), var(--season-accent, #C5A44E));
    opacity: 0.9;
}

.season-orn-ball {
    position: absolute;
    left: 0;
    top: calc(var(--len, 8px) - 1px);
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 2px 2px rgba(40, 24, 0, 0.18));
}

/* tiny four-point glint that flashes now and then on some ornaments */
.season-orn-glint {
    position: absolute;
    left: 18%;
    top: calc(var(--len, 8px) + 42%);
    width: 7px;
    height: 7px;
    opacity: 0;
    background:
        linear-gradient(90deg, transparent 42%, #fff 50%, transparent 58%),
        linear-gradient(0deg, transparent 42%, #fff 50%, transparent 58%);
    animation: season-glint 7s ease-in-out infinite;
}

/* ---------------------------------------------------------------------------
   2. Snow canvas
   --------------------------------------------------------------------------- */
.season-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 990;            /* JS sets per-brand layer */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.season-snow.is-visible {
    opacity: 1;
}

/* ---------------------------------------------------------------------------
   3. Footer — greeting pill, snow toggle, pine sprig
   --------------------------------------------------------------------------- */
.season-footer-host {
    position: relative;
}

.season-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin: 0 auto 2.25rem;
    padding: 0.55rem 0.6rem 0.55rem 1rem;
    border: 1px solid var(--season-footer-border, rgba(197, 164, 78, 0.28));
    border-radius: 999px;
    color: var(--season-footer-text, inherit);
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 0.98rem;
    line-height: 1.35;
    text-align: center;
}

.season-footer-note-orn {
    display: inline-flex;
    width: 16px;
    flex: 0 0 auto;
}

.season-footer-note-orn svg {
    width: 100%;
    height: auto;
    display: block;
}

.season-footer-greet {
    min-width: 0;
    text-wrap: balance;
}

.season-snow-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--season-footer-border, rgba(197, 164, 78, 0.28));
    border-radius: 999px;
    background: transparent;
    color: var(--season-footer-muted, inherit);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.season-snow-toggle:hover,
.season-snow-toggle:focus-visible {
    color: var(--season-accent, #C5A44E);
    border-color: var(--season-accent, #C5A44E);
}

.season-snow-toggle:focus-visible {
    outline: 2px solid var(--season-accent, #C5A44E);
    outline-offset: 2px;
}

.season-snow-toggle.is-off i {
    opacity: 0.45;
}

.season-sprig {
    position: absolute;
    top: -30px;
    right: clamp(6px, 4vw, 72px);
    width: 184px;
    pointer-events: none;
    transform-origin: 100% 0;
    animation: season-sprig-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.season-sprig-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.18));
}

/* ---------------------------------------------------------------------------
   4. Snow cap on the mobile "Live" button
   --------------------------------------------------------------------------- */
.season-live-host {
    position: relative;
    overflow: visible;
}

.season-snowcap {
    position: absolute;
    left: -4%;
    width: 108%;
    top: -5px;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.season-snowcap svg {
    display: block;
    width: 100%;
    height: auto;
}

.season-snowcap-glint {
    position: absolute;
    right: 14%;
    top: -3px;
    width: 8px;
    height: 8px;
    background:
        linear-gradient(90deg, transparent 40%, #fff 50%, transparent 60%),
        linear-gradient(0deg, transparent 40%, #fff 50%, transparent 60%);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
    opacity: 0;
    animation: season-glint 5s ease-in-out 1.5s infinite;
}

/* ---------------------------------------------------------------------------
   5. Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .season-footer-note {
        border-radius: 16px;
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        margin-bottom: 1.75rem;
    }

    /* the pine sprig already carries ornaments on small screens */
    .season-footer-note-orn {
        display: none;
    }

    .season-sprig {
        width: 124px;
        top: -22px;
    }
}

@media (pointer: coarse) {
    .season-snow-toggle {
        min-height: 40px;
        padding-inline: 1rem;
    }
}

/* ---------------------------------------------------------------------------
   6. Motion preferences + print
   --------------------------------------------------------------------------- */
.season-reduced .season-orn,
.season-reduced .season-tinsel,
.season-reduced .season-orn-glint,
.season-reduced .season-snowcap-glint,
.season-reduced .season-garland-body,
.season-reduced .season-sprig {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .season-orn,
    .season-tinsel,
    .season-orn-glint,
    .season-snowcap-glint,
    .season-garland-body,
    .season-sprig {
        animation: none !important;
    }
}

@media print {
    .season-garland,
    .season-snow,
    .season-sprig,
    .season-footer-note,
    .season-snowcap {
        display: none !important;
    }
}

/* ---------------------------------------------------------------------------
   7. Keyframes
   --------------------------------------------------------------------------- */
@keyframes season-swing {
    from { transform: rotate(-3.5deg); }
    to   { transform: rotate(3.5deg); }
}

@keyframes season-tinsel {
    from { background-position: 0% 0; }
    to   { background-position: -200% 0; }
}

@keyframes season-drop {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes season-sprig-in {
    from { opacity: 0; transform: rotate(-6deg) translateY(-6px); }
    to   { opacity: 1; transform: rotate(0) translateY(0); }
}

@keyframes season-glint {
    0%, 82%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
    88%           { opacity: 1; transform: scale(1) rotate(45deg); }
    94%           { opacity: 0; transform: scale(0.5) rotate(90deg); }
}
