/* ===================================
   GERENCIADOR DE ANÚNCIOS - PUBLIC CSS
   Carrossel de anúncios responsivo
   =================================== */

.ads-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ads-carousel-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

.ads-carousel-item {
    display: none;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.ads-carousel-item.active {
    display: block;
    opacity: 1;
}

.ads-carousel-item a {
    display: block;
    width: 100%;
}

.ads-carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Controles do carrossel */
.ads-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #e1e1e1;
}

.ads-prev,
.ads-next {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ads-prev:hover,
.ads-next:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.ads-prev:active,
.ads-next:active {
    transform: scale(0.95);
}

/* Dots (indicadores) */
.ads-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ads-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d1d1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ads-dot:hover {
    background: #999;
    transform: scale(1.2);
}

.ads-dot.active {
    background: #667eea;
    width: 30px;
    border-radius: 6px;
}

/* Animação de fade */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ads-carousel-item.active {
    animation: fadeIn 0.6s ease-in-out;
}

/* Estilos específicos por posição */

/* Header - Leaderboard Desktop */
.ads-carousel[data-position="header"] {
    margin: 20px auto;
    max-width: 728px;
}

.ads-carousel[data-position="header"] .ads-carousel-item img {
    max-height: 90px;
    object-fit: cover;
}

/* Sidebar - Medium Rectangle */
.ads-carousel[data-position="sidebar"] {
    margin: 20px 0;
    max-width: 300px;
}

.ads-carousel[data-position="sidebar"] .ads-carousel-item img {
    max-height: 250px;
    object-fit: cover;
}

/* Footer - Leaderboard */
.ads-carousel[data-position="footer"] {
    margin: 20px auto;
    max-width: 728px;
}

.ads-carousel[data-position="footer"] .ads-carousel-item img {
    max-height: 90px;
    object-fit: cover;
}

/* Responsivo - Mobile */
@media (max-width: 767px) {
    /* Header e Footer no mobile */
    .ads-carousel[data-position="header"],
    .ads-carousel[data-position="footer"] {
        max-width: 320px;
    }
    
    .ads-carousel[data-position="header"] .ads-carousel-item img,
    .ads-carousel[data-position="footer"] .ads-carousel-item img {
        max-height: 50px;
    }
    
    /* Sidebar no mobile - manter tamanho */
    .ads-carousel[data-position="sidebar"] {
        max-width: 100%;
    }
    
    /* Controles menores no mobile */
    .ads-prev,
    .ads-next {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .ads-dot {
        width: 10px;
        height: 10px;
    }
    
    .ads-dot.active {
        width: 24px;
    }
}

/* Loading state */
.ads-carousel.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ads-carousel.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Acessibilidade - foco visível */
.ads-carousel-item a:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.ads-prev:focus,
.ads-next:focus,
.ads-dot:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
