/* ==========================================================================
   ADS CAROUSEL COMPONENT
   Carrossel automático com suporte para vídeos, imagens e GIFs
   ========================================================================== */

.ads-carousel-wrapper {
    width: 100%;
    margin: 14px 0 20px 0;
    box-sizing: border-box;
}

.ads-carousel {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: 250px;
    background-color: #121212;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    user-select: none;
    touch-action: pan-y;
}

.ads-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    cursor: grab;
}

.ads-carousel-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.ads-carousel-track::-webkit-scrollbar {
    display: none;
}

.ads-carousel-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    overflow: hidden;
}

.ads-carousel-slide.active {
    z-index: 2;
}

.ad-media-container {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ad-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.ad-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.45) 0%,
        transparent 35%,
        transparent 65%,
        rgba(0, 0, 0, 0.45) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.ad-sponsor-info {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
    pointer-events: none;
}

.ad-sponsor-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #EA1D2C;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.ad-sponsor-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.ad-audio-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    pointer-events: auto;
    transition: background-color 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.ad-audio-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.08);
}

.ad-audio-btn:active {
    transform: scale(0.95);
}

.ad-badge {
    display: none !important;
}

.ads-carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    pointer-events: auto;
}

.ad-indicator {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.ad-indicator.active {
    width: 20px;
    background: #ffffff;
}

/* Responsividade para telas menores */
@media (max-width: 480px) {
    .ads-carousel {
        border-radius: 14px;
    }
    .ad-sponsor-info {
        top: 10px;
        left: 10px;
        gap: 8px;
    }
    .ad-sponsor-logo {
        width: 28px;
        height: 28px;
    }
    .ad-sponsor-title {
        font-size: 0.85rem;
    }
    .ad-audio-btn {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }
    .ads-carousel-indicators {
        bottom: 10px;
    }
}
