@charset "utf-8";

/*------------- popup banner ---------------------------------------*/
/* Prevent background scrolling while the banner is open */
html:has(.popup-banner[open]),
html:has(.popup-banner[open]) body {
    overflow-y: hidden;
    scrollbar-gutter: stable; /* Keeps the page from shifting when the scrollbar hides */
}

/* Width is also limited by screen height, so the whole 906x1288 banner fits without scrolling */
.popup-banner {
    --popup-gutter: 32px;
    width: min(500px, calc(100vw - var(--popup-gutter)), calc((100vh - var(--popup-gutter)) * 906 / 1288));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    animation: popupBannerIn 0.3s ease-out;
}

@supports (height: 100dvh) {
    .popup-banner {
        width: min(500px, calc(100vw - var(--popup-gutter)), calc((100dvh - var(--popup-gutter)) * 906 / 1288));
    }
}

.popup-banner:focus {
    outline: none;
}

.popup-banner::backdrop {
    background: rgba(0, 0, 0, 0.7);
    animation: popupBannerFade 0.3s ease-out;
}

.popup-banner-link,
.popup-banner-link:hover {
    display: block;
    opacity: 1;
}

.popup-banner-link img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 16px 52px rgba(0, 0, 0, 0.3);
}

.popup-banner-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 44px;
    height: 44px;
    padding: 0;
    font-family: 'FC Minimal', sans-serif;
    font-size: 32px;
    line-height: 1;
    color: #292929;
    background: rgba(255, 255, 255, 0.75);
    border: 0;
    cursor: pointer;
    transition: background 0.2s linear;
}

.popup-banner-close:hover {
    background: #FFF;
}

.popup-banner-close:focus-visible,
.popup-banner-link:focus-visible {
    outline: 2px solid #FFF;
    outline-offset: 2px;
}

@keyframes popupBannerIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

@keyframes popupBannerFade {
    from {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .popup-banner,
    .popup-banner::backdrop {
        animation: none;
    }
}
