.iptv-christmas {
    --winter-side: clamp(50px, 14vw, 210px);
    --winter-ink: 7 22 38;
}

.iptv-christmas__frame,
.iptv-christmas__snow,
.iptv-christmas__art {
    pointer-events: none;
}

.iptv-christmas__frame,
.iptv-christmas__snow {
    position: fixed;
    inset: 0;
}

.iptv-christmas__frame {
    z-index: 7;
    background:
        linear-gradient(90deg, rgb(var(--winter-ink) / 27%), transparent var(--winter-side), transparent calc(100% - var(--winter-side)), rgb(var(--winter-ink) / 27%)),
        linear-gradient(180deg, rgb(var(--winter-ink) / 23%), transparent 104px, transparent calc(100% - 96px), rgb(var(--winter-ink) / 30%));
}

.iptv-christmas--home .iptv-christmas__frame {
    background:
        linear-gradient(90deg, rgb(var(--winter-ink) / 41%), transparent var(--winter-side), transparent calc(100% - var(--winter-side)), rgb(var(--winter-ink) / 41%)),
        linear-gradient(180deg, rgb(var(--winter-ink) / 35%), transparent 112px, transparent calc(100% - 106px), rgb(var(--winter-ink) / 34%));
}

.iptv-christmas__snow {
    z-index: 10;
    display: block;
    width: 100%;
    height: 100%;
}

.iptv-christmas__garland {
    position: fixed;
    z-index: 9;
    inset: var(--iptv-garland-top, 0px) 0 auto;
    height: 78px;
    pointer-events: none;
    background: url(../img/northstar-christmas-bells.webp) center top / auto 100% repeat-x;
    filter: drop-shadow(0 4px 5px rgb(3 17 23 / 35%));
    visibility: hidden;
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 230ms ease, opacity 190ms ease, visibility 230ms;
}

.iptv-christmas__garland.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.iptv-christmas__art {
    position: absolute;
    z-index: 8;
    inset: 0 0 auto;
    height: clamp(300px, 53vh, 450px);
    overflow: hidden;
}

.iptv-christmas--home .iptv-christmas__art {
    height: clamp(450px, 86vh, 684px);
}

.iptv-christmas__forest,
.iptv-christmas__gifts {
    position: absolute;
    bottom: 0;
    width: clamp(62px, calc((100vw - 1110px) / 2), 254px);
    background-repeat: no-repeat;
    background-size: contain;
}

.iptv-christmas__forest {
    left: 0;
    height: 80%;
    background-image: url(../img/northstar-christmas-forest.webp);
    background-position: left bottom;
    mask-image: linear-gradient(90deg, #000 82%, transparent);
}

.iptv-christmas__gifts {
    right: 0;
    height: 92%;
    background-image: url(../img/northstar-christmas-gifts.webp);
    background-position: right bottom;
    mask-image: linear-gradient(90deg, transparent, #000 16%);
}

.iptv-christmas--home .iptv-christmas__forest {
    width: clamp(170px, 25vw, 460px);
}

.iptv-christmas--home .iptv-christmas__gifts {
    width: clamp(180px, 25vw, 434px);
}

.iptv-christmas .iptv-christmas__toggle {
    position: fixed;
    z-index: 11;
    top: max(83px, calc(env(safe-area-inset-top) + 12px));
    right: max(12px, env(safe-area-inset-right));
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    color: #f5f9fd;
    background: #152c42;
    border: 1px solid #758a9e;
    border-radius: 50%;
    cursor: pointer;
}

.iptv-christmas__toggle[hidden] { display: none; }

.iptv-christmas__toggle::after {
    display: block;
    box-sizing: border-box;
    width: 9px;
    height: 10px;
    border-inline: 2px solid currentColor;
    content: "";
}

.iptv-christmas__toggle.is-paused::after {
    width: 9px;
    height: 11px;
    margin-left: 2px;
    background: currentColor;
    border: 0;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.iptv-christmas .iptv-christmas__toggle:hover { background: #284862; }
.iptv-christmas__toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 767px) {
    .iptv-christmas__garland { height: 55px; }

    .iptv-christmas__art { height: 300px; }
    .iptv-christmas--home .iptv-christmas__art { height: clamp(315px, 59vh, 500px); }

    .iptv-christmas__forest,
    .iptv-christmas__gifts { width: 44px; opacity: .76; }

    .iptv-christmas--home .iptv-christmas__forest { width: clamp(82px, 23vw, 155px); opacity: 1; }
    .iptv-christmas--home .iptv-christmas__gifts { width: clamp(87px, 25vw, 165px); opacity: 1; }

    .iptv-christmas .iptv-christmas__toggle {
        top: max(73px, calc(env(safe-area-inset-top) + 12px));
        right: max(7px, env(safe-area-inset-right));
    }
}

@media (prefers-reduced-motion: reduce) {
    .iptv-christmas__garland { transition: none; }
}
