/**
 * DesiMaza Video Player Ads Engine - Public CSS
 */

/* Make player container positioned relative so absolute overlays bind to it */
#dm-player-container,
.responsive-player,
.dt-player-container,
.video-player-area {
    position: relative !important;
}

/* ================= PRE-ROLL AD OVERLAY ================= */
.dm-preroll-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
    background: #000000 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.dm-preroll-media-box {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dm-preroll-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.dm-preroll-banner-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.dm-preroll-code-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Sponsored Badge */
.dm-ad-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.85);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* Sound / Unmute Button */
.dm-ad-unmute-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: background 0.2s ease;
}

.dm-ad-unmute-btn:hover {
    background: rgba(226, 27, 34, 0.9);
}

/* CTA Button for VAST Ad */
.dm-vast-cta-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10003;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.4px;
    padding: 9px 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dm-vast-cta-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.7);
    color: #ffffff !important;
}

.dm-vast-cta-btn:active {
    transform: translateY(1px);
}

/* VAST Loading Spinner */
.dm-vast-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.dm-vast-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #e21b22;
    border-radius: 50%;
    animation: dmSpin 0.8s linear infinite;
}

@keyframes dmSpin {
    to { transform: rotate(360deg); }
}

/* Countdown Badge (Before Skip) */
.dm-ad-skip-timer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10002;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    pointer-events: none;
}

.dm-ad-timer-num {
    display: inline-block;
    background: #e21b22;
    color: #ffffff;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 3px;
    min-width: 16px;
    text-align: center;
}

/* Skip Ad Button (After Countdown) */
.dm-ad-skip-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10003;
    background: #e21b22;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(226, 27, 34, 0.6);
    transition: transform 0.15s ease, background 0.2s ease;
    animation: dmSkipGlow 1.8s infinite ease-in-out;
}

.dm-ad-skip-btn:hover {
    background: #c01319;
    transform: scale(1.05);
}

.dm-ad-skip-btn:active {
    transform: scale(0.96);
}

@keyframes dmSkipGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(226, 27, 34, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(226, 27, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(226, 27, 34, 0);
    }
}

/* ================= PAUSE AD OVERLAY ================= */
.dm-pause-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9990 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(3px) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.dm-pause-box {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.dm-pause-banner-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    display: block;
    cursor: pointer;
}

.dm-pause-close-btn,
.dm-ad-close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e21b22;
    color: #fff;
    border: 2px solid #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
    z-index: 10005;
}

.dm-pause-close-btn:hover,
.dm-ad-close-btn:hover {
    transform: scale(1.15);
    background: #c01319;
}

/* ================= FLOATING BOTTOM PLAYER BANNER ================= */
.dm-player-bottom-banner {
    position: absolute !important;
    bottom: 35px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9980 !important;
    max-width: 96% !important;
    background: rgba(17, 24, 39, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7) !important;
}

.dm-bottom-banner-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .dm-ad-skip-timer {
        bottom: 12px;
        right: 12px;
        font-size: 11px;
        padding: 6px 12px;
    }

    .dm-ad-skip-btn {
        bottom: 12px;
        right: 12px;
        font-size: 12px;
        padding: 7px 16px;
    }

    .dm-ad-badge {
        top: 8px;
        left: 8px;
        font-size: 10px;
        padding: 3px 7px;
    }

    .dm-vast-cta-btn {
        bottom: 12px;
        left: 12px;
        font-size: 11px;
        padding: 6px 12px;
    }

    .dm-ad-unmute-btn {
        top: 8px;
        right: 8px;
        font-size: 10px;
        padding: 4px 8px;
    }
}
