/* Shared Video Popup — geladen door tt_enqueue_video_popup() vanuit elke
   shortcode die de overlay nodig heeft (video-with-text, locations, ...). */

.video_popup_wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 117, 187, 0.4); /* #1A75BB at 40% */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    box-sizing: border-box;
}

.video_popup {
    background: #FFF;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ratio constraints + Viewport height constraints */
.video_popup.is-portrait {
    max-width: min(450px, calc((100vh - 150px) * 9 / 16 + 30px));
}

.video_popup.is-landscape {
    max-width: min(1000px, calc((100vh - 150px) * 16 / 9 + 30px));
}

.video_popup_iframe_wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}

/* Padding Ratio Trick */
.is-portrait .video_popup_iframe_wrapper {
    padding-top: 177.78%; /* 16 / 9 * 100 */
}

.is-landscape .video_popup_iframe_wrapper {
    padding-top: 56.25%; /* 9 / 16 * 100 */
}

.video_popup_iframe_wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close_video_popup {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background-color: #fff;
    background-image: url(../../images/video-close.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    border-radius: 50%;
    transition: transform 0.2s ease;
    z-index: 10;
}

.close_video_popup:hover {
    transform: scale(1.1);
}

@media (max-width: 1040px), (max-height: 700px) {
    .close_video_popup {
        top: -50px;
        right: 0;
    }
}
