/* AdSense Ad Container Optimization */

.ad-container {
    min-height: 90px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    transition: all 0.3s ease;
}

.ad-container:hover {
    background: #e9ecef;
}

.ad-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Sidebar Ad Sticky */
.sidebar-ad-sticky {
    position: sticky;
    top: 80px;
    z-index: 100;
}

/* In-Feed Ad Styling */
.ad-in-feed {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

/* Ad Loading State */
.adsbygoogle[data-ad-status="unfilled"] {
    min-height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Mobile Optimization */
@media (max-width: 991px) {
    .sidebar-ad-sticky {
        position: relative;
        top: 0;
    }
    
    .ad-container {
        margin: 12px 0;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .ad-container {
    background: #212529;
}

[data-theme="dark"] .ad-container:hover {
    background: #343a40;
}

[data-theme="dark"] .ad-in-feed {
    background: #1a1d20;
    border-color: #343a40;
}

/* Performance: Prevent Layout Shift */
.adsbygoogle {
    display: block !important;
    min-height: 50px;
}

/* Ensure ads don't break layout */
.ad-container iframe,
.adsbygoogle iframe {
    max-width: 100%;
}

