/**
 * CVP Ad Engine Styles v3.0.0
 */

/* ═══ VAST CONTAINER (pre/mid/post-roll) ═══ */
.cvp-vast-container {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: #000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.cvp-vast-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cvp-vast-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cvp-vast-skip {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 52;
}
.cvp-vast-countdown {
    color: #fff;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 4px;
}
.cvp-vast-skip-btn {
    background: rgba(255,255,255,0.9);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cvp-vast-skip-btn:hover {
    background: #fff;
    transform: scale(1.05);
}
.cvp-vast-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,0.85);
    color: #333;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 52;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cvp-vast-cta {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: #f0c040;
    color: #000;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 4px;
    z-index: 52;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cvp-vast-cta:hover {
    background: #ffd700;
    transform: scale(1.05);
}


/* ═══ PAUSE OVERLAY ═══ */
.cvp-pause-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.cvp-pause-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}
.cvp-pause-content img,
.cvp-pause-content video {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    border-radius: 8px;
}
.cvp-pause-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 42;
    transition: all 0.2s;
}
.cvp-pause-close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}
.cvp-pause-vast-loading {
    color: #aaa;
    font-size: 14px;
}


/* ═══ BANNERS — Uses pause overlay CSS, shown on load ═══ */
/* .cvp-banner-auto inherits .cvp-pause-overlay styles */
.cvp-banner-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}
.cvp-banner-close:hover { background: rgba(255,0,0,0.7); }
.cvp-banner-countdown {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 2;
    font-family: -apple-system, sans-serif;
}


/* ═══ INPAGE PUSH — Inside player area ═══ */
.cvp-inpage-push {
    position: absolute;
    z-index: 45;
    width: 300px;
    max-width: 80%;
    background: rgba(10,10,20,0.92);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    overflow: hidden;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    pointer-events: auto;
}
.cvp-inpage-push.cvp-inpage-visible,
.cvp-inpage-push[style*="opacity: 1"] {
    transform: translateY(0);
    opacity: 1;
}
.cvp-inpage-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    color: #999;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}
.cvp-inpage-close:hover {
    background: rgba(255,0,0,0.4);
    color: #fff;
}
.cvp-inpage-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #fff;
}
.cvp-inpage-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}
.cvp-inpage-text {
    flex: 1;
    min-width: 0;
}
.cvp-inpage-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cvp-inpage-body {
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ═══ VIDEO SLIDER — Inside player area ═══ */
.cvp-slider {
    position: absolute;
    z-index: 44;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    background: #000;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    pointer-events: auto;
}
.cvp-slider.cvp-slider-visible {
    transform: translateY(0);
    opacity: 1;
}
.cvp-slider video {
    display: block;
    width: 100%;
    cursor: pointer;
    border-radius: 10px;
}
.cvp-slider-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
}
.cvp-slider-close:hover {
    background: rgba(255,0,0,0.7);
}

/* ═══ MOBILE RESPONSIVE ═══ */
@media (max-width: 480px) {
    .cvp-inpage-push { width: calc(100vw - 20px); }
    .cvp-slider { width: 240px !important; }
    .cvp-vast-skip { bottom: 8px; right: 8px; }
    .cvp-vast-cta { bottom: 8px; left: 8px; font-size: 11px; padding: 6px 12px; }
    .cvp-vast-label { font-size: 9px; }
}
