/**
 * Tube Ads Manager - Frontend Styles (Commercial Responsive Architecture)
 */

/* Desktop (>= 992px): Dual 300x250 Stack beside Video Player */
@media screen and (min-width: 992px) {
    .happy-under-player-mobile {
        display: none !important;
    }

    .tube-player-side-ad-stack {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .tube-player-side-ad-stack .tam-ad-slot-wrapper {
        width: 300px !important;
        min-height: 250px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }
}

/* Individual Ad Slot Container (Always Perfectly Centered) */
.tube-ad-slot,
.tube-mobile-ad-container {
    width: 100% !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 auto !important;
}

.tube-ad-slot img,
.tube-ad-slot iframe,
.tube-ad-slot ins,
.tube-mobile-ad-container img,
.tube-mobile-ad-container iframe,
.tube-mobile-ad-container ins {
    max-width: 100% !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border: none !important;
}

/* Commercial Ad Placeholder (XVideos / Pornhub 1:1 Dark Standard - Guaranteed Centered) */
.ad-placeholder-300x250 {
    width: 300px !important;
    height: 250px !important;
    background: #141414 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: #666666 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
    position: relative !important;
    user-select: none !important;
    margin: 0 auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.ad-placeholder-300x250:hover {
    border: none !important;
    background: #171717 !important;
}

.ad-placeholder-300x250 .ad-label {
    position: absolute !important;
    top: 8px !important;
    left: 10px !important;
    font-size: 9px !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    color: #555555 !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

.ad-placeholder-300x250 .ad-inner-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
}

.ad-placeholder-300x250 .ad-size {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #777777 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
}

.ad-placeholder-300x250 .ad-desc {
    font-size: 11px !important;
    color: #555555 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
}

/* Under Player & Header Ad Styles */
.tube-ad-under_player,
.tube-ad-header_ad {
    text-align: center !important;
    margin: 14px auto !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

/* Mobile Responsiveness (< 992px) - 100% Centered & Zero Left/Right Drift */
@media screen and (max-width: 991px) {
    /* Hide the desktop side ad column completely on mobile */
    .player-side-ad-col {
        display: none !important;
    }

    /* Video player stage becomes full width standalone player */
    .video-player-stage {
        display: block !important;
        margin: 0 0 10px 0 !important;
        width: 100% !important;
    }

    .video-player-stage .player-main-col {
        width: 100% !important;
        display: block !important;
    }

    /* Mobile ad zone renders cleanly directly under video player - 100% Centered */
    .happy-under-player-mobile {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 14px auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        clear: both !important;
    }

    .happy-under-player-mobile iframe,
    .happy-under-player-mobile ins,
    .happy-under-player-mobile img,
    .happy-under-player-mobile .ad-placeholder-300x250,
    .happy-under-player-mobile .tube-mobile-ad-container {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .happy-under-player-mobile:empty {
        display: none !important;
        margin: 0 !important;
    }
}
