/**
 * Video page styles.
 *
 * Loaded only on singular video pages (see functions.php).
 * Keeps the heavy player iframe out of the critical CSS path and reserves
 * space for the player, poster and ad slots to prevent CLS.
 */

/* Click-to-play facade ----------------------------------------------------- */
.video-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 10px;
    cursor: pointer;
    contain: layout;
}

.video-facade .video-poster,
.video-facade img.video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
}

.video-facade .video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 26px;
    line-height: 72px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.video-facade .video-play-button:hover,
.video-facade .video-play-button:focus {
    background: rgba(204, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.05);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.video-facade .video-play-button::before {
    content: "\25B6";
}

.video-facade .video-facade__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-facade.is-loading {
    opacity: 0.85;
}

.video-facade.is-playing {
    background: #000;
}

.video-facade iframe,
.video-facade video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

/* Responsive player wrapper (kept for backward compatibility) -------------- */
.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 10px;
}

.video-player iframe,
.video-player video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

/* Reserve space for ad slots to prevent CLS ------------------------------- */
.adult-advertising {
    min-height: 90px;
    contain: layout;
}

.adult-advertising--top,
.adult-advertising--bottom,
.adult-advertising--top-center {
    min-height: 100px;
}

.popup-side-banner__group {
    min-height: 250px;
    contain: layout;
}

/* Fallback for browsers without aspect-ratio support --------------------- */
@supports not (aspect-ratio: 16 / 9) {
    .video-facade,
    .video-player,
    .responsive-player {
        height: 0;
        padding-bottom: 56.25%;
    }

    .video-facade .video-poster,
    .video-facade iframe,
    .video-facade video,
    .video-player iframe,
    .video-player video,
    .responsive-player > iframe,
    .responsive-player .video-js,
    .responsive-player .fluid_video_wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Reduced motion preference ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .video-facade .video-play-button {
        transition: none;
    }
}
