/* XplayTube Video Fixer — player layout */
.xplaytube-fixer-wrap {
    width: 100%;
    background-color: #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.xplaytube-fixer-wrap .video-js {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* ---- Ad overlay (iframe gate + mp4 player) ---- */
.xcp-ad {
    position: absolute;
    inset: 0;
    z-index: 30;
    overflow: hidden;
    background: #000;
}
.xcp-ad__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.xcp-ad__click {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    cursor: pointer;
}
.xcp-ad__click[hidden],
.xcp-ad__skip[hidden] { display: none !important; }
.xcp-ad__label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font: 600 12px/1.3 sans-serif;
    pointer-events: none;
}
.xcp-ad__mute {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 5;
    padding: 6px 9px;
    border: 0;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
/*
 * Skip button: large, high-contrast and always visible (no hover needed).
 * !important + the extra .xcp-ad prefix keep theme / Video.js button rules
 * from shrinking or fading it.
 */
.xcp-ad .xcp-ad__skip {
    position: absolute !important;
    right: 12px !important;
    bottom: 48px !important;
    z-index: 50 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 96px;
    padding: 12px 22px !important;
    margin: 0 !important;
    border: 2px solid #ffffff !important;
    border-radius: 6px !important;
    background: rgba(0, 0, 0, 0.88) !important;
    color: #ffffff !important;
    font: 700 16px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: 0.3px;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    white-space: nowrap;
}
.xcp-ad .xcp-ad__skip:disabled {
    cursor: default;
    background: rgba(0, 0, 0, 0.88) !important;
    color: #ffffff !important;
    opacity: 1 !important;
}
.xcp-ad .xcp-ad__skip:not(:disabled):hover,
.xcp-ad .xcp-ad__skip:not(:disabled):focus-visible {
    background: #e62117 !important;
    border-color: #e62117 !important;
}
.xcp-ad .xcp-ad__skip[hidden] { display: none !important; }
@media (max-width: 480px) {
    .xcp-ad .xcp-ad__skip {
        right: 8px !important;
        bottom: 40px !important;
        min-height: 40px;
        min-width: 84px;
        padding: 10px 16px !important;
        font-size: 15px !important;
    }
}
.xcp-ad__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: xcp-spin 0.8s linear infinite;
    pointer-events: none;
}
@keyframes xcp-spin { to { transform: rotate(360deg); } }

/* While an ad runs in the Video.js player, hide its own chrome and overlays. */
.video-js.xcp-ad-active .vjs-control-bar,
.video-js.xcp-ad-active .vjs-big-play-button,
.video-js.xcp-ad-active .vjs-loading-spinner,
.video-js.xcp-ad-active .vjs-poster,
.video-js.xcp-ad-active .xplay-player-logo,
.video-js.xcp-ad-active .xplay-player-ticker { display: none !important; }

/*
 * Xplay Theme's .iframe-wrapper uses a height:0 + padding-bottom:56.25% trick
 * that only works with an absolutely-positioned <iframe> child. We replace the
 * iframe with a normal <video>, so neutralize the hack or the wrapper collapses.
 * (player.js applies the same fix inline for browsers without :has().)
 */
.iframe-wrapper:has(> .xplaytube-fixer-wrap) {
    height: auto;
    padding-bottom: 0;
}
