html.has-site-popup {
    overflow: hidden;
}

.site-popup,
.site-popup * {
    box-sizing: border-box;
}

.site-popup {
    width: max-content;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-family: inherit;
}

.site-popup[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.site-popup:not([open]),
.site-popup__card[hidden] {
    display: none;
}

.site-popup::backdrop {
    background: rgb(0 0 0 / 72%);
}

.site-popup__controls {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    width: 100%;
}

.site-popup__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}

.site-popup__button:hover {
    background: #292929;
}

.site-popup__track {
    display: flex;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
    gap: 20px;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #999 transparent;
}

.site-popup__card {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    scroll-snap-align: start;
}

.site-popup__image {
    position: relative;
    width: max-content;
}

.site-popup__image-link {
    display: block;
    width: max-content;
}

.site-popup__image img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(510px, calc(100vw - 48px));
    max-height: calc(100vh - 216px);
    max-height: calc(100dvh - 216px);
}

.site-popup__hotspot {
    position: absolute;
    z-index: 1;
    display: block;
}

.site-popup a:focus-visible {
    outline: 3px solid #3178ff;
    outline-offset: -3px;
}

.site-popup__button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -5px;
}

@media (max-width: 640px) {
    .site-popup {
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }

    .site-popup[open] {
        gap: 14px;
    }

    .site-popup__button {
        min-height: 36px;
        padding: 7px 16px;
        font-size: 14px;
    }

    .site-popup__track {
        gap: 16px;
    }

    .site-popup__image img {
        max-width: min(510px, calc(100vw - 32px));
        max-height: calc(100vh - 172px);
        max-height: calc(100dvh - 172px);
    }
}
