/* Video lightbox (assets/js/video-lightbox.js) and the click-to-play video posters that open it. */

html.roar-video-open {
    overflow: hidden;
}

.roar-video-lightbox {
    width: min( 1100px, calc( 100vw - 32px ) );
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.roar-video-lightbox::backdrop {
    background: rgba( 20, 8, 46, 0.88 );
}

.roar-video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba( 0, 0, 0, 0.45 );
}

.roar-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.roar-video-close {
    position: absolute;
    top: -52px;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba( 255, 255, 255, 0.14 );
    color: #fff;
    font-size: 30px;
    line-height: 44px;
    cursor: pointer;
}

.roar-video-close:hover,
.roar-video-close:focus-visible {
    background: rgba( 255, 255, 255, 0.28 );
}

/* Poster that replaces an inline YouTube embed (roar_video_poster_embed). */
.roar-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.roar-video-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.roar-video-poster:hover img {
    transform: scale( 1.02 );
}

.roar-video-poster .roar-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border-radius: 50%;
    background: #6821D6;
    box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.3 );
    transition: transform 0.2s ease;
}

.roar-video-poster .roar-video-play::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -14px 0 0 -8px;
    border-style: solid;
    border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent #fff;
}

.roar-video-poster:hover .roar-video-play,
.roar-video-poster:focus-visible .roar-video-play {
    transform: scale( 1.08 );
}

@media ( max-width: 600px ) {
    .roar-video-poster .roar-video-play {
        width: 64px;
        height: 64px;
        margin: -32px 0 0 -32px;
    }

    .roar-video-poster .roar-video-play::after {
        margin: -11px 0 0 -6px;
        border-width: 11px 0 11px 18px;
    }
}

@media ( prefers-reduced-motion: reduce ) {
    .roar-video-poster img,
    .roar-video-poster .roar-video-play {
        transition: none;
    }
}
