.gsi-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999999;
}

.gsi-popup-overlay.gsi-popup-visible {
    display: flex;
}

.gsi-popup-inner {
    position: relative;
    width: 68%;
    max-width: 1200px;
    max-height: 80vh;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.gsi-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.gsi-popup-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.gsi-popup-media {
    position: relative;
    line-height: 0;
}

.gsi-popup-img {
    display: block;
    width: 100%;
    height: auto;
}

.gsi-popup-media-code iframe,
.gsi-popup-media-code embed,
.gsi-popup-media-code video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Click-to-play cover image for embeds. Sits above the iframe (but below the
   close icon) until clicked, at which point frontend.js hides it, revealing
   the iframe underneath as a normal, fully interactive player. */
.gsi-popup-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 5;
}

.gsi-popup-video-overlay-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gsi-popup-video-overlay.gsi-popup-video-overlay-hidden {
    display: none;
}

@media screen and (max-width:980px) {
    .gsi-popup-inner{
        max-height: unset;
    }
}

@media screen and (max-width: 767px) {
    /* Portrait cover before interaction, per client request. The iframe itself
       stays fixed at 16/9 (see .gsi-popup-media-code iframe above); the overlay
       image covers this taller box completely, giving a true portrait look
       instead of a cropped-into/letterboxed landscape one. Once clicked,
       frontend.js adds gsi-popup-video-revealed to this element, switching it
       back to the video's normal 16/9 for playback. */
    .gsi-popup-media-code {
        aspect-ratio: 9 / 16;
    }

    .gsi-popup-media-code.gsi-popup-video-revealed {
        aspect-ratio: 16 / 9;
    }
}
@media screen and (max-width: 600px) {
    .gsi-popup-inner{
        width: 90%;
    }
}