/* 1. Main Outer Container */
.cvp-main-container {
    width: 100%;
    margin: 20px 0;
    clear: both;
}

/* 2. Responsive Wrapper */
.cvp-player-wrapper {
    position: relative;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    background: #000;
    overflow: hidden;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* 3. The 16:9 Aspect Ratio Box */
.cvp-video-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 ratio */
    background: #000;
}

/* 4. Filling the Box (Video, SDK Container, and Overlay) */
#cvp-player,
.cvp-play-overlay,
.yandex-video-ads-container { /* Yandex SDK often creates this class */
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain; /* Ensures video isn't stretched */
}

/* 5. Play Overlay - THE CRITICAL FIX */
.cvp-play-overlay {
    z-index: 10;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Allow clicking the play button */
}

/* When hidden, ensure clicks pass through to video controls */
.cvp-play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none; 
    visibility: hidden;
}

/* 6. Center Play Button */
.cvp-center-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: rgba(0, 123, 255, 0.9); /* Blue with slight transparency */
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    padding: 0;
    outline: none;
}

.cvp-center-play-btn:hover {
    transform: scale(1.1);
    background-color: #007bff;
}

.cvp-center-play-btn svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

/* 7. Custom Skip Button (Ensuring it stays on top of everything) */
.cvp-skip-ad-btn {
    position: absolute;
    bottom: 60px;
    right: 0;
    min-width: 120px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0 15px;
    z-index: 2147483647; /* Maximum possible Z-index */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    border-left: 4px solid #ffcc00;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hide skip button when not active */
.cvp-skip-ad-btn.is-hidden {
    display: none;
}