*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.popup-banner {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index:9999;
}

.popup-banner.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-banner__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.popup-banner__dialog {
    position: relative;
    z-index: 1;
    line-height: 0;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.popup-banner.is-visible .popup-banner__dialog {
    transform: scale(1);
}

.popup-banner__link {
    display: block;
    line-height: 0;
    text-decoration: none;
    color: inherit;
}

.popup-banner__link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.popup-banner__picture {
    display: block;
}

.popup-banner__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(896px, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
}

@media (max-width: 767px) {
    .popup-banner__image {
        max-width: min(360px, calc(100vw - 2rem));
    }
}

.popup-banner__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.popup-banner__close-icon {
    display: block;
    background-color: #fff;
    border-radius: 50%;
    padding: 4px;
    width: 24px;
    height: 24px;
}

.popup-banner__close:hover {
    opacity: 0.75;
}

.popup-banner__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
}

body.popup-banner-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .popup-banner,
    .popup-banner__dialog {
        transition: none;
    }

    .popup-banner__dialog {
        transform: none;
    }
}
