/**
 * Casino Blocks Ultimate - Popup/Sticky Banner Styles
 * Version: 3.1.0
 */

/* Popup Container */
.cbu-popup-banner {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Inner wrapper needs relative positioning for close button */
.cbu-popup-banner > * {
    position: relative;
}

.cbu-popup-banner.cbu-popup-top {
    top: 0;
    bottom: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
}

.cbu-popup-banner.cbu-popup-bottom {
    bottom: 0;
    top: auto;
}

.cbu-popup-banner.cbu-popup-visible {
    transform: translateY(0);
}

/* Inner Content - Horizontal Compact Layout */
.cbu-popup-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px; /* Збільшено ще раз: з 20px/24px до 24px/28px */
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

/* Logo */
.cbu-popup-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 8px;
}

.cbu-popup-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Content - Single line */
.cbu-popup-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cbu-popup-title {
    font-size: 16px;
    font-weight: 700; /* Збільшено з 600 до 700 */
    margin: 0;
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3; /* Додано для кращої видимості */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit; /* Гарантуємо успадкування кольору */
}

.cbu-popup-subtitle {
    font-size: 14px; /* Збільшено з 13px до 14px */
    color: rgba(255, 255, 255, 0.9); /* Трохи яскравіше - 0.9 замість 0.85 */
    margin-top: 3px; /* Збільшено з 2px до 3px */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cbu-popup-promo {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cbu-popup-promo strong {
    color: rgba(255, 255, 255, 1);
    font-weight: 700;
}

/* Rating - Inline with content */
.cbu-popup-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cbu-popup-stars {
    font-size: 16px;
    line-height: 1;
}

.cbu-popup-score {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

/* Icon - Gift/Bonus Icon */
.cbu-popup-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 8px;
}

.cbu-popup-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* CTA Button - Compact size */
.cbu-popup-cta {
    flex-shrink: 0;
    padding: 8px 19px !important; /* Зменшено на 40%: було 14px 32px */
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-block;
    white-space: nowrap;
    transition: all 0.2s;
    text-align: center;
    background: #ff9500 !important;
    color: #fff !important;
    margin-right: 40px; /* Зменшено з 48px до 40px */
}

.cbu-popup-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cbu-popup-cta:active {
    transform: translateY(0);
}

/* Close Button */
.cbu-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    transition: all 0.2s;
    z-index: 10;
}

.cbu-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.cbu-popup-close:active {
    transform: scale(0.95);
}

/* Style Presets */

/* Dark Style (Gorilla) */
.cbu-popup-banner.cbu-popup-dark {
    background: #000000;
    color: #ffffff;
}

.cbu-popup-banner.cbu-popup-dark .cbu-popup-logo {
    background: rgba(255, 255, 255, 0.1);
}

/* Gradient Style (Fonbet) */
.cbu-popup-banner.cbu-popup-gradient {
    background: linear-gradient(90deg, #ff0000 0%, #ff6600 100%);
    color: #ffffff;
}

.cbu-popup-banner.cbu-popup-gradient .cbu-popup-logo {
    background: rgba(255, 255, 255, 0.15);
}

/* Light Style */
.cbu-popup-banner.cbu-popup-light {
    background: #ffffff;
    color: #1a202c;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.cbu-popup-banner.cbu-popup-light.cbu-popup-top {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cbu-popup-banner.cbu-popup-light .cbu-popup-logo {
    background: rgba(0, 0, 0, 0.05);
}

.cbu-popup-banner.cbu-popup-light .cbu-popup-subtitle {
    color: rgba(26, 32, 44, 0.7);
}

.cbu-popup-banner.cbu-popup-light .cbu-popup-close {
    background: rgba(0, 0, 0, 0.1);
}

.cbu-popup-banner.cbu-popup-light .cbu-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Mobile Responsive - Keep Horizontal, Normal Size */
@media (max-width: 768px) {
    .cbu-popup-inner {
        flex-direction: row;
        padding: 20px 22px; /* Збільшено з 17px/20px */
        gap: 14px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .cbu-popup-logo {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
    }
    
    .cbu-popup-icon {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
    }
    
    .cbu-popup-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .cbu-popup-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .cbu-popup-subtitle {
        font-size: 12px;
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .cbu-popup-promo {
        font-size: 10px;
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .cbu-popup-rating {
        flex-shrink: 0;
        gap: 8px;
    }
    
    .cbu-popup-stars {
        display: none; /* Hide stars on mobile */
    }
    
    .cbu-popup-score {
        font-size: 20px;
    }
    
    .cbu-popup-icon {
        width: 56px;
        height: 56px;
    }
    
    .cbu-popup-cta {
        padding: 7px 14px !important; /* Зменшено на 40%: було 12px 24px */
        font-size: 15px !important;
        white-space: nowrap;
        flex-shrink: 0;
        margin-right: 20px;
    }
    
    .cbu-popup-close {
        top: 6px;
        right: 6px;
        width: 24px; /* Зменшено з 28px */
        height: 24px;
        font-size: 16px; /* Зменшено з 18px */
    }
}

@media (max-width: 480px) {
    .cbu-popup-inner {
        padding: 18px 20px; /* Збільшено з 15px/17px */
        gap: 12px;
    }
    
    .cbu-popup-logo {
        width: 50px;
        height: 50px;
    }
    
    .cbu-popup-icon {
        width: 50px;
        height: 50px;
    }
    
    .cbu-popup-title {
        font-size: 13px;
    }
    
    .cbu-popup-subtitle {
        font-size: 11px;
        margin-top: 2px;
    }
    
    .cbu-popup-promo {
        font-size: 9px;
        margin-top: 1px;
    }
    
    .cbu-popup-score {
        font-size: 18px;
    }
    
    .cbu-popup-cta {
        font-size: 14px !important;
        padding: 6px 12px !important; /* Зменшено на 40%: було 10px 20px */
        margin-right: 17px;
    }
    
    .cbu-popup-close {
        top: 8px;
        right: 8px;
        width: 20px; /* Зменшено з 24px */
        height: 20px;
        font-size: 14px; /* Зменшено з 16px */
    }
}

/* Animation for entrance */
@keyframes cbuPopupSlideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes cbuPopupSlideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.cbu-popup-banner.cbu-popup-bottom.cbu-popup-visible {
    animation: cbuPopupSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cbu-popup-banner.cbu-popup-top.cbu-popup-visible {
    animation: cbuPopupSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlay (optional) */
.cbu-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.cbu-popup-overlay.cbu-popup-overlay-visible {
    opacity: 1;
    pointer-events: auto;
}
