/**
 * Ad Styles for Word Game
 * 
 * Styles for ad placements that are non-intrusive and mobile-friendly
 */

/* Common ad container styles */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Ad placeholder styling (for demonstration) */
.ad-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border-radius: 4px;
    padding: 20px;
    min-height: 90px;
    width: 100%;
    max-width: 728px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ad-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.ad-size {
    font-size: 12px;
    opacity: 0.7;
}

/* Top banner ad */
#ad-top-banner {
    margin-bottom: 20px;
}

#ad-top-banner .ad-placeholder {
    max-width: 728px;
    height: 90px;
}

/* Bottom banner ad */
#ad-bottom-banner {
    margin-top: 30px;
    margin-bottom: 20px;
}

#ad-bottom-banner .ad-placeholder {
    max-width: 728px;
    height: 90px;
}

/* Sidebar ad */
#ad-sidebar {
    margin: 20px 0;
}

#ad-sidebar .ad-placeholder {
    max-width: 300px;
    height: 250px;
}

/* Mobile banner ad */
#ad-mobile-banner {
    display: none; /* Hidden by default, shown on mobile */
}

/* Desktop styles */
@media (min-width: 769px) {
    /* Hide mobile-specific ads on desktop */
    #ad-mobile-banner {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        height: 0 !important;
        min-height: 0 !important;
    }
    
    /* Show desktop ads (only enabled ones will have content) */
    #ad-bottom-banner,
    #ad-sidebar {
        display: flex;
    }
    
    /* Top banner is disabled in config, so hide it */
    #ad-top-banner {
        display: none;
    }
    
    /* Standard desktop padding */
    body {
        padding-bottom: 20px;
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    /* Hide desktop-specific ads on mobile */
    #ad-top-banner,
    #ad-sidebar {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        height: 0 !important;
        min-height: 0 !important;
    }
    
    /* Show mobile ads */
    #ad-bottom-banner,
    #ad-mobile-banner {
        display: flex;
    }
    
    /* Make mobile ads responsive */
    #ad-bottom-banner .ad-placeholder,
    #ad-mobile-banner .ad-placeholder {
        max-width: 100%;
        width: 100%;
    }
    
    /* Add padding for bottom banner on mobile */
    body {
        padding-bottom: 20px;
    }
}

/* Ensure ads don't interfere with game elements */
.ad-container.non-intrusive {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.ad-container.non-intrusive:hover {
    opacity: 1;
}

/* Style adjustments for better integration */
.ad-container + .container,
.ad-container + .game-container {
    margin-top: 10px;
}

/* Dark Mode Styles for Ads */
body.dark-mode .ad-container {
    background-color: #1e1e2f;
    border-color: rgba(14, 165, 233, 0.3);
}

body.dark-mode #ad-mobile-banner {
    background: #1a1a2e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}
