/**
 * Ad Component Styles
 * Master stylesheet for ad-related components
 * 
 * @author Savage Side Bets
 * @version 1.0.0
 */

/* =============================================================================
   Ad Slot Container
   ============================================================================= */

.ad-slot {
    width: 100%;
    display: block;
    margin: 16px 0;
    min-height: 90px;
    position: relative;
}

/* Ensure ad slots don't cause layout shift */
.ad-slot[data-placement] {
    contain: layout style;
}

/* =============================================================================
   House Ad (Fallback when real ads unavailable)
   ============================================================================= */

.house-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 12px;
    background: var(--color-bg, #ffffff);
    text-align: center;
}

.house-cta-text {
    margin: 0;
    font-size: 14px;
    color: var(--color-text, #333333);
    font-weight: 500;
}

.house-cta-button {
    padding: 8px 16px;
    background: var(--color-primary, #2c3e50);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.house-cta-button:hover {
    opacity: 0.9;
}

.house-cta-button:active {
    opacity: 0.8;
}

/* =============================================================================
   Interstitial Ad Overlay
   ============================================================================= */

.ad-interstitial {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ad-box {
    width: min(92vw, 480px);
    background: var(--color-bg, #ffffff);
    color: var(--color-text, #333333);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ad-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary, #666666);
    margin-bottom: 12px;
    font-weight: 600;
}

.ad-body {
    margin-bottom: 16px;
}

.ad-body p {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.5;
}

.ad-text-small {
    font-size: 14px;
    color: var(--color-text-secondary, #666666);
}

.ad-close {
    width: 100%;
    padding: 12px;
    background: var(--color-primary, #2c3e50);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.ad-close:hover {
    opacity: 0.9;
}

.ad-close:active {
    opacity: 0.8;
}

.ad-close:focus {
    outline: 2px solid var(--color-primary, #2c3e50);
    outline-offset: 2px;
}

/* =============================================================================
   AdSense Specific Styles
   ============================================================================= */

.adsbygoogle {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* Ensure ads don't overflow on mobile */
.adsbygoogle iframe {
    max-width: 100% !important;
}

/* =============================================================================
   Dark Mode Support
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    .house-cta {
        background: var(--color-bg-dark, #1a1a1a);
        border-color: var(--color-border-dark, #333333);
    }

    .house-cta-text {
        color: var(--color-text-dark, #e0e0e0);
    }

    .ad-box {
        background: var(--color-bg-dark, #1a1a1a);
        color: var(--color-text-dark, #e0e0e0);
    }

    .ad-label {
        color: var(--color-text-secondary-dark, #999999);
    }

    .ad-text-small {
        color: var(--color-text-secondary-dark, #999999);
    }
}

/* =============================================================================
   Responsive Adjustments
   ============================================================================= */

@media (max-width: 768px) {
    .ad-slot {
        margin: 12px 0;
        min-height: 80px;
    }

    .ad-box {
        width: 90vw;
        padding: 20px;
    }

    .ad-body p {
        font-size: 15px;
    }

    .ad-text-small {
        font-size: 13px;
    }
}
