/* ============================================
   REVVED UP CARS - AD STYLING
   Modern, non-intrusive ad containers
   ============================================ */

/* Ad Container Base */
.revved-ad-container {
    position: relative;
    margin: 24px 0;
    padding: 0;
}

.revved-ad-container.sidebar-ad {
    margin: 0;
}

/* Minimal "Ad" label - top left corner */
.revved-ad-label {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 1;
    font-weight: 500;
}

[data-theme="dark"] .revved-ad-label {
    background: rgba(30,30,30,0.9);
    color: #666;
}

/* Ad wrapper - clean border */
.revved-ad-wrapper {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    min-height: 100px;
}

[data-theme="dark"] .revved-ad-wrapper {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

/* Sidebar Ad - 300x250 or 300x600 */
.sidebar-ad .revved-ad-wrapper {
    min-height: 250px;
}

.sidebar-ad-tall .revved-ad-wrapper {
    min-height: 600px;
}

/* In-content Ad - Horizontal responsive */
.content-ad .revved-ad-wrapper {
    min-height: 90px;
}

/* Header/Footer Ad - Leaderboard */
.leaderboard-ad .revved-ad-wrapper {
    min-height: 90px;
    max-height: 120px;
}

/* AdSense specific styling */
.revved-ad-wrapper ins.adsbygoogle {
    display: block;
    width: 100%;
}

/* When ad is empty/unfilled - hide gracefully */
.revved-ad-wrapper ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

.revved-ad-container:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
    display: none !important;
}

/* Placeholder for when no ad is loaded */
.ad-placeholder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: inherit;
    color: #ccc;
    font-size: 12px;
}

[data-theme="dark"] .ad-placeholder-content {
    color: #444;
}

/* Old widget-ad override for compatibility */
.widget-ad {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

.widget-ad .ad-label {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 1;
    margin: 0;
}

[data-theme="dark"] .widget-ad .ad-label {
    background: rgba(30,30,30,0.9);
    color: #666;
}

.widget-ad .ad-placeholder {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    min-height: 250px;
}

[data-theme="dark"] .widget-ad .ad-placeholder {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

/* In-Article Ad Styling */
.article-ad {
    margin: 32px 0;
    padding: 16px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .article-ad {
    border-color: #333;
}

.article-ad .revved-ad-label {
    position: static;
    display: block;
    text-align: center;
    margin-bottom: 8px;
    background: none;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .revved-ad-container {
        margin: 16px 0;
    }
    
    .leaderboard-ad .revved-ad-wrapper {
        min-height: 50px;
    }
    
    .sidebar-ad-tall .revved-ad-wrapper {
        min-height: 250px;
    }
}

/* Hide ads on very small screens for better UX */
@media (max-width: 480px) {
    .sidebar-ad-tall {
        display: none;
    }
}

/* In-Article Ad Styling */
.revved-in-article-ad {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
}

.revved-in-article-ad .revved-ad-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .revved-in-article-ad {
        background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
        border-color: rgba(255,255,255,0.08);
    }
}

/* Multiplex Ad Section */
.multiplex-ad-section {
    padding: 3rem 0;
    background: #f8f9fa;
    margin-top: 2rem;
}

.multiplex-ad {
    max-width: 100%;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
}

.multiplex-ad .revved-ad-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
}

@media (prefers-color-scheme: dark) {
    .multiplex-ad-section {
        background: #111;
    }
    .multiplex-ad {
        background: #1a1a1a;
    }
}

/* ============================================
   Horizontal Hero Ad - Below Slider
   ============================================ */
.revved-ad-horizontal-hero {
    margin: 20px auto 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}

.revved-ad-horizontal-hero .revved-container {
    position: relative;
}

.revved-ad-horizontal-hero .revved-ad-wrapper {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1f1a 0%, #0d0f0d 100%);
    border: 1px solid rgba(197, 214, 49, 0.15);
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
}

.revved-ad-horizontal-hero .adsbygoogle {
    width: 100%;
    max-width: 970px;
    min-height: 90px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .revved-ad-horizontal-hero {
    margin: 20px auto 0 auto;
        margin: 24px auto;
        padding: 0 16px;
    }
    
    .revved-ad-horizontal-hero .revved-ad-wrapper {
        min-height: 100px;
        padding: 12px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .revved-ad-horizontal-hero {
    margin: 20px auto 0 auto;
        margin: 20px auto;
        padding: 0 12px;
    }
    
    .revved-ad-horizontal-hero .revved-ad-wrapper {
        min-height: 120px;
    }
}

/* Reduce spacing when editors-pick follows ad */
.revved-ad-horizontal-hero + .editors-pick-section {
    margin-top: 0;
    padding-top: 24px;
}
