/**
 * MUSICA THEME - ADVERTISING MODULE CSS
 * ⚡ PERFORMANCE OPTIMIZATION - Conditional Loading
 *
 * Extracted from modules.css for better performance.
 * Only loads when advertising module is active.
 *
 * Size: ~2.7 KB
 * Impact: Reduces CSS bloat on pages without ads
 *
 * @package Musica_Theme
 * @version 1.0.0
 */

/* ==========================================================================
   ADVERTISING MODULE
   ========================================================================== */
/* Musica Ads - Frontend Styles */

/* Wrapper principal - CRITICAL para evitar CLS */
.musica-ads-wrapper {
    position: relative;
    margin: 20px 0;
    min-height: 280px;
}

/* Label PUB - Requisito legal PT */
.musica-ads-label {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    z-index: 10;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

/* Placeholder de loading - evita CLS */
.musica-ads-loading {
    background: #f5f5f5;
    border: 1px dashed #ccc;
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 12px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estados de erro */
.musica-ads-error {
    background: #ffe6e6;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 15px;
    text-align: center;
    font-size: 12px;
}

/* Container dos anúncios */
.musica-ad-container {
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.musica-ad-custom,
.musica-ad-image,
.musica-ad-adsense,
.musica-ad-video {
    max-width: 100%;
}

.musica-ad-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.musica-ad-image a {
    display: block;
    transition: opacity 0.3s ease;
}

.musica-ad-image a:hover {
    opacity: 0.85;
}

.musica-ad-video video {
    max-width: 100%;
    height: auto;
}

/* Zonas de anúncios */
.musica-ad-zone {
    margin: 20px 0;
}

.musica-ad-zone-fallback {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border: 1px dashed #ddd;
    color: #999;
}

/* Auto-insert */
.musica-ads-auto-insert {
    clear: both;
}

/* Lazy loading placeholder */
.musica-ad-loading {
    min-height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsivo */
@media (max-width: 768px) {
    .musica-ad-container,
    .musica-ads-wrapper {
        margin: 15px 0;
    }
}
