/**
 * Genesis Child: video popup dialog.
 *
 * Styles for the <dialog class="genesis-child-video-popup"> that
 * lib/video-popup.php prints in the footer and assets/javascript/video-popup.js
 * fills with the video iframe. Enqueued only on pages that render the
 * [influex_popup_video] shortcode. The play link and thumbnail are styled in
 * custom.css (section 4.5) because they must be in place at first paint.
 *
 * WP Rocket's Remove Unused CSS is told to keep this file, and its inlined copy,
 * because the dialog is closed when pages are crawled (see lib/video-popup.php).
 */

.genesis-child-video-popup {
    background: transparent;
    border: 0;
    margin: auto;
    max-width: 1200px;
    overflow: visible;
    padding: 0;
    width: min(90vw, 1200px, 160vh);
}

.genesis-child-video-popup::backdrop {
    background-color: rgba(0, 0, 0, 0.8);
}

.genesis-child-video-popup-player {
    aspect-ratio: 16 / 9;
    background-color: #000;
    position: relative;
    width: 100%;
}

.genesis-child-video-popup-player > iframe {
    border: 0;
    display: block;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.genesis-child-video-popup-close {
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 4.4rem;
    height: 44px;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: -50px;
    top: -50px;
    width: 44px;
}

.genesis-child-video-popup-close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

html.genesis-child-video-popup-open {
    overflow: hidden;
}

@media only screen and (max-width: 1366px) {

    .genesis-child-video-popup-close {
        right: 0;
    }
}

@media (prefers-reduced-motion: no-preference) {

    .genesis-child-video-popup[open] {
        animation: genesis-child-video-popup-fade 0.15s ease-out;
    }

    @keyframes genesis-child-video-popup-fade {

        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}
