.layer-popups {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow: hidden;
    pointer-events: none;
}

.layer-popups__panel {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 80px 48px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    translate: 0 -100%;
    transition: translate 1.2s cubic-bezier(0.41, 0.005, 0.095, 0.95);
}

.layer-popups.is-open {
    pointer-events: auto;
}

.layer-popups.is-open .layer-popups__panel {
    translate: 0 0;
}

.layer-popups__inner {
    width: min(1460px, 100%);
    text-align: center;
}

.layer-popups__eyebrow {
    color: rgba(255, 255, 255, 0.54);
    font-size: 1.2rem;
    letter-spacing: 0.2em;
}

.layer-popups h2 {
    margin-top: 10px;
    font-size: clamp(2.4rem, 2.2vw, 3.6rem);
}

.layer-popups__list {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 32px;
}

.layer-popups__item {
    flex: 0 1 calc((100% - 54px) / 4);
    overflow: hidden;
    background: #fff;
    opacity: 0;
    translate: 0 30px;
    transition:
        opacity 0.45s ease,
        translate 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.layer-popups.is-open .layer-popups__item {
    opacity: 1;
    translate: 0 0;
}

.layer-popups.is-open .layer-popups__item:nth-child(1) { transition-delay: 0.75s; }
.layer-popups.is-open .layer-popups__item:nth-child(2) { transition-delay: 0.85s; }
.layer-popups.is-open .layer-popups__item:nth-child(3) { transition-delay: 0.95s; }
.layer-popups.is-open .layer-popups__item:nth-child(4) { transition-delay: 1.05s; }

.layer-popups__item a,
.layer-popups__item picture,
.layer-popups__item img {
    display: block;
}

.layer-popups__html--mobile {
    display: none;
}

.layer-popups__html img {
    display: block;
    width: 100%;
    height: auto;
}

.layer-popups__item img {
    width: 100%;
    height: auto;
}

.layer-popups__close {
    margin-top: 22px;
    margin-bottom: 20px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    font-size: 1.4rem;
}

.layer-popups__hide-today {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    font-size: 1.3rem;
    cursor: pointer;
}

.layer-popups__hide-today input {
    width: 15px;
    height: 15px;
    accent-color: #fff;
}

.layer-popups__mobile-controls {
    display: none;
}

@media (max-width: 767px) {
    .layer-popups__panel {
        padding: 50px 24px 36px;
        overflow-y: auto;
    }

    .layer-popups__inner {
        max-width: 340px;
    }

    .layer-popups__eyebrow,
    .layer-popups h2 {
        display: none;
    }

    .layer-popups__list {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .layer-popups__item {
        display: none;
    }

    .layer-popups__item.is-active {
        display: block;
    }

    .layer-popups__item img {
        max-height: none;
        object-fit: initial;
    }

    .layer-popups__html--desktop.has-mobile-html {
        display: none;
    }

    .layer-popups__html--mobile {
        display: block;
    }

    .layer-popups__html img {
        max-height: 62svh;
        object-fit: contain;
    }

    .layer-popups__mobile-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin-top: 14px;
        font-size: 1.4rem;
    }

    .layer-popups__mobile-controls button {
        width: 26px;
        height: 26px;
        border: 1px solid rgba(255, 255, 255, 0.65);
        border-radius: 50%;
        color: #fff;
        font-size: 2rem;
        line-height: 1;
    }

    .layer-popups__hide-today {
        margin-top: 14px;
    }
}

@media (min-width: 768px) and (max-height: 900px) {
    .layer-popups__panel {
        place-items: start center;
        overflow-y: auto;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .layer-popups__inner {
        margin: 0 auto;
    }

    .layer-popups__close {
        margin-top: 0;
        margin-bottom: 14px;
    }

    .layer-popups__list {
        margin-top: 18px;
    }

    .layer-popups__item,
    .layer-popups__item a,
    .layer-popups__item picture {
        display: flex;
        justify-content: center;
        max-height: calc(100svh - 170px);
    }

    .layer-popups__item img,
    .layer-popups__html img {
        width: auto;
        max-width: 100%;
        max-height: calc(100svh - 170px);
        object-fit: contain;
    }

    .layer-popups__hide-today {
        margin-top: 14px;
    }
}
