/* Popup Banner Styles */

.ccb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ccb-popup-overlay.ccb-popup-visible {
    opacity: 1;
}

.ccb-popup-container {
    position: relative;
    background: transparent !important;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ccb-popup-overlay.ccb-popup-visible .ccb-popup-container {
    transform: scale(1);
}

.ccb-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.ccb-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.ccb-popup-content {
    padding: 20px;
}

/* Sticky Banner Styles */

.ccb-sticky-banner {
    position: fixed;
    left: 0;
    width: 100%;
    background: transparent !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999998;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
}

.ccb-sticky-banner.ccb-sticky-visible {
    transform: translateY(0);
}

.ccb-sticky-top {
    top: 0;
    transform: translateY(-100%);
}

.ccb-sticky-top.ccb-sticky-visible {
    transform: translateY(0);
}

.ccb-sticky-bottom {
    bottom: 0;
    transform: translateY(100%);
}

.ccb-sticky-bottom.ccb-sticky-visible {
    transform: translateY(0);
}

.ccb-sticky-content {
    position: relative;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.ccb-sticky-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.ccb-sticky-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Desktop styles */
@media (min-width: 768px) {
    .ccb-popup-container {
        max-width: 600px;
    }

    .ccb-sticky-content {
        padding: 20px;
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    .ccb-popup-container {
        max-width: 95%;
        max-height: 85vh;
    }

    .ccb-popup-content {
        padding: 15px;
    }

    .ccb-sticky-content {
        padding: 10px;
    }

    .ccb-sticky-close {
        width: 26px;
        height: 26px;
        font-size: 18px;
        top: 5px;
        right: 5px;
    }
}

/* Animation for exit intent */
@keyframes ccbShake {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.02); }
    75% { transform: scale(0.98); }
}

.ccb-popup-overlay.ccb-exit-intent .ccb-popup-container {
    animation: ccbShake 0.5s ease;
}

/* Увеличение размеров для мобильных устройств */
@media (max-width: 767px) {
    
    /* 1. Делаем Sticky баннер выше (больше padding) */
    .ccb-sticky-banner .ccb-sticky-content {
        padding: 25px 15px !important; /* Увеличиваем вертикальный паддинг */
    }

    /* 2. Делаем картинку внутри прилипашки максимально большой */
    .ccb-sticky-content img {
        width: 100% !important; /* Растягиваем на всю ширину */
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* 3. Делаем все баннеры в попапах на мобильных крупнее */
    .ccb-popup-container {
        width: 98% !important; /* Растягиваем почти на весь экран */
        max-width: 98% !important;
    }
    
    .ccb-popup-content {
        padding: 25px !important; /* Больше свободного пространства вокруг контента */
    }

    /* 4. Увеличиваем размер кнопок закрытия, чтобы легче было попасть пальцем */
    .ccb-sticky-close, 
    .ccb-popup-close {
        width: 34px !important;
        height: 34px !important;
        font-size: 24px !important;
        top: 8px !important;
        right: 8px !important;
    }
}
