/* Используем уникальные классы с префиксом ad-banner- для избежания конфликтов */
.ad-banner-wrapper {
    position: fixed;
    z-index: 99999;
    display: none;
    transition: all 0.5s ease;
}

.ad-banner-wrapper.show {
    display: block;
}

.ad-banner-wrapper.bottom-right { bottom: 20px; right: 20px; }
.ad-banner-wrapper.bottom-left { bottom: 20px; left: 20px; }
.ad-banner-wrapper.top-right { top: 20px; right: 20px; }
.ad-banner-wrapper.top-left { top: 20px; left: 20px; }
.ad-banner-wrapper.top-center { top: 20px; left: 50%; transform: translateX(-50%); }
.ad-banner-wrapper.bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); }
.ad-banner-wrapper.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ad-banner-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    padding: 20px;
    min-width: 200px;
    max-width: 100%;
}

.ad-banner-close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    transition: all 0.3s;
    z-index: 10;
}

.ad-banner-close:hover {
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

.ad-banner-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.ad-banner-link:hover {
    text-decoration: none !important;
}

.ad-banner-content {
    font-size: 14px;
    line-height: 1.6;
}

.ad-banner-media,
.ad-banner-gif {
    width: 100%;
    height: auto;
    display: block;
}

.ad-banner-video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Анимации */
.ad-banner-wrapper.fade {
    animation: adBannerFadeIn 0.5s ease;
}

@keyframes adBannerFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.ad-banner-wrapper.slide {
    animation: adBannerSlideIn 0.5s ease;
}

@keyframes adBannerSlideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ad-banner-wrapper.bounce {
    animation: adBannerBounceIn 0.6s ease;
}

@keyframes adBannerBounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.ad-banner-wrapper.scale {
    animation: adBannerScaleIn 0.4s ease;
}

@keyframes adBannerScaleIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .ad-banner-wrapper {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
        bottom: 10px !important;
        top: auto !important;
        transform: none !important;
    }
    
    .ad-banner-wrapper.center {
        top: 50% !important;
        left: 5% !important;
        transform: translateY(-50%) !important;
    }
    
    .ad-banner-inner {
        padding: 15px;
    }
    
    .ad-banner-content {
        font-size: 13px;
    }
    
    .ad-banner-close {
        width: 26px;
        height: 26px;
        font-size: 16px;
        line-height: 26px;
        right: 8px;
        top: 8px;
    }
}

@media (max-width: 480px) {
    .ad-banner-inner {
        padding: 12px;
    }
    
    .ad-banner-content {
        font-size: 12px;
    }
    
    .ad-banner-close {
        width: 22px;
        height: 22px;
        font-size: 14px;
        line-height: 22px;
        right: 5px;
        top: 5px;
    }

    /* ============================================
    CAROUSEL STYLES
    ============================================ */

    .ad-carousel-wrapper {
        position: relative;
        overflow: hidden;
        margin: 20px auto;
        width: 100%;
    }

    .ad-carousel-container {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .ad-carousel-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 0.5s ease;
        z-index: 1;
    }

    .ad-carousel-slide.active {
        opacity: 1;
        z-index: 2;
    }

    .ad-carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .ad-carousel-slide a {
        display: block;
        width: 100%;
        height: 100%;
        text-decoration: none;
    }

    .ad-carousel-caption {
        position: absolute;
        bottom: 20px;
        left: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        padding: 15px 20px;
        border-radius: 8px;
        z-index: 3;
    }

    .ad-carousel-caption h3 {
        margin: 0 0 5px;
        font-size: 18px;
        color: #fff;
    }

    .ad-carousel-caption p {
        margin: 0;
        font-size: 14px;
        opacity: 0.9;
    }

    /* Navigation Arrows */
    .ad-carousel-prev,
    .ad-carousel-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        border: none;
        padding: 12px 18px;
        font-size: 24px;
        cursor: pointer;
        border-radius: 50%;
        transition: all 0.3s;
    }

    .ad-carousel-prev:hover,
    .ad-carousel-next:hover {
        background: rgba(0, 0, 0, 0.8);
    }

    .ad-carousel-prev {
        left: 10px;
    }

    .ad-carousel-next {
        right: 10px;
    }

    /* Dots */
    .ad-carousel-dots {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
        gap: 8px;
    }

    .ad-carousel-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.3s;
        border: none;
    }

    .ad-carousel-dot.active {
        background: #fff;
        transform: scale(1.2);
    }

    .ad-carousel-dot:hover {
        background: rgba(255, 255, 255, 0.8);
    }

    /* Responsive */
    @media (max-width: 768px) {
        .ad-carousel-caption {
            bottom: 10px;
            left: 10px;
            right: 10px;
            padding: 10px 15px;
        }
        
        .ad-carousel-caption h3 {
            font-size: 16px;
        }
        
        .ad-carousel-caption p {
            font-size: 12px;
        }
        
        .ad-carousel-prev,
        .ad-carousel-next {
            padding: 8px 14px;
            font-size: 18px;
        }
    }

    @media (max-width: 480px) {
        .ad-carousel-caption {
            bottom: 5px;
            left: 5px;
            right: 5px;
            padding: 8px 12px;
        }
        
        .ad-carousel-caption h3 {
            font-size: 14px;
        }
        
        .ad-carousel-caption p {
            font-size: 11px;
        }
        
        .ad-carousel-prev,
        .ad-carousel-next {
            padding: 6px 10px;
            font-size: 14px;
        }
    }
}

