/* Google AdSense Manager - Frontend Styles */

/* Ad container styling */
.gam-ad-container {
    margin: 20px 0;
    text-align: center;
    clear: both;
    overflow: hidden;
}

.gam-ad-container .adsbygoogle {
    display: block;
    margin: 0 auto;
}

/* Widget ad styling */
.gam-widget-ad {
    margin: 15px 0;
    text-align: center;
    overflow: hidden;
}

.gam-widget-ad .adsbygoogle {
    display: block;
    margin: 0 auto;
}

/* Responsive ad containers */
.gam-ad-container.gam-responsive,
.gam-widget-ad.gam-responsive {
    width: 100%;
    max-width: 100%;
}

/* Ad alignment options */
.gam-ad-left {
    float: left;
    margin: 10px 20px 10px 0;
}

.gam-ad-right {
    float: right;
    margin: 10px 0 10px 20px;
}

.gam-ad-center {
    margin: 20px auto;
    display: block;
    text-align: center;
}

/* Common ad sizes styling */
.gam-ad-leaderboard {
    max-width: 728px;
    margin: 20px auto;
}

.gam-ad-banner {
    max-width: 468px;
    margin: 15px auto;
}

.gam-ad-square {
    max-width: 250px;
    margin: 15px auto;
}

.gam-ad-rectangle {
    max-width: 336px;
    margin: 15px auto;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .gam-ad-container {
        margin: 15px 0;
    }

    .gam-ad-left,
    .gam-ad-right {
        float: none;
        margin: 15px auto;
        display: block;
        text-align: center;
    }

    /* Ensure ads don't overflow on mobile */
    .gam-ad-container .adsbygoogle,
    .gam-widget-ad .adsbygoogle {
        max-width: 100%;
        overflow: hidden;
    }

    /* Specific mobile ad adjustments */
    .gam-ad-leaderboard .adsbygoogle {
        max-width: 320px;
        max-height: 100px;
    }

    .gam-ad-banner .adsbygoogle {
        max-width: 320px;
        max-height: 100px;
    }
}

@media screen and (max-width: 480px) {
    .gam-ad-container {
        margin: 10px 0;
    }

    .gam-widget-ad {
        margin: 10px 0;
    }

    /* Ensure very small screens display properly */
    .gam-ad-container .adsbygoogle,
    .gam-widget-ad .adsbygoogle {
        min-width: 300px;
        max-width: 320px;
    }
}

/* Print styles - hide ads when printing */
@media print {
    .gam-ad-container,
    .gam-widget-ad,
    .adsbygoogle {
        display: none !important;
    }
}

/* Accessibility improvements */
.gam-ad-container:focus,
.gam-widget-ad:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading state */
.gam-ad-container.gam-loading,
.gam-widget-ad.gam-loading {
    background: #f5f5f5;
    border: 1px dashed #ccc;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.gam-ad-container.gam-loading:before,
.gam-widget-ad.gam-loading:before {
    content: "Loading ad...";
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gam-ad-container,
    .gam-widget-ad {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gam-ad-container *,
    .gam-widget-ad * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
