/**
 * CB Cookie Banner - Frontend Styles
 *
 * @package CB_Cookie_Banner
 * @since   1.0.0
 */

/* Banner Container */
.cb-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 2;
    background: #1a1a1a;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.cb-cookie-banner.cb-position-bottom {
    bottom: 0;
}

.cb-cookie-banner.cb-position-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cb-cookie-banner.cb-position-bottom-left,
.cb-cookie-banner.cb-position-bottom-right {
    bottom: 20px;
    left: auto;
    right: auto;
    max-width: 400px;
    border-radius: 0.5rem;
}

.cb-cookie-banner.cb-position-bottom-left {
    left: 20px;
}

.cb-cookie-banner.cb-position-bottom-right {
    right: 20px;
}

/* Dark Theme */
.cb-cookie-banner.cb-theme-dark .cb-banner-container {
    
    color: #fff;
}

.cb-cookie-banner.cb-theme-dark .cb-banner-title {
    color: #fff;
}

.cb-cookie-banner.cb-theme-dark .cb-banner-text {
    color: #ddd;
}

.cb-cookie-banner.cb-theme-dark a {
   
}

/* Banner Content */
.cb-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.cb-banner-content {
    flex: 1;
    min-width: 300px;
}

.cb-banner-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cb-banner-text {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.cb-banner-links {
    margin: 10px 0 0;
    font-size: 13px;
}

.cb-banner-links a {
    
    text-decoration: none;
}

.cb-banner-links a:hover {
    text-decoration: underline;
}

/* Banner Actions */
.cb-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cb-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.cb-btn.cb-btn-primary {
       background: var(--e-global-color-accent);
    color: var(--e-global-color-primary);
    border-radius: 0.5rem;
}

button.cb-btn.cb-btn-primary:hover {
            background: var(--e-global-color-b7e33d4);
    border-color:  var(--e-global-color-b7e33d4);
}



.cb-theme-dark .cb-btn-secondary {
 border-radius: 0.5rem;
}

.cb-theme-dark .cb-btn-secondary:hover {


    background: var(--e-global-color-b7e33d4);
    border: 2px solid var(--e-global-color-b7e33d4);
}

.cb-cookie-banner button.cb-modal-close {
    display: flex;
    padding: 8px 12px;
    border-radius: 0.5rem;
    align-items: center;
}

/* Modal */
.cb-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.cb-modal-content {
    position: relative;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
    background: var(--e-global-color-primary);
}

.cb-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cb-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.cb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: #666;
}

.cb-modal-close:hover {
    color: #000;
}

.cb-modal-body {
    padding: 20px;
}

.cb-modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Categories */
.cb-categories {
    margin: 20px 0;
}

.cb-category {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    margin-bottom: 10px;
}

.cb-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cb-category-header label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.cb-category-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.cb-category-desc {
    margin: 0;
    font-size: 13px;
    color: #666;
    padding-left: 28px;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* WPML Floating Switcher - Move up when banner is visible */
body:has(.cb-cookie-banner) #rb-wpml-floating-switcher {
    transition: bottom 0.3s ease;
}

body:has(.cb-cookie-banner.cb-position-bottom) #rb-wpml-floating-switcher {
    bottom: calc(var(--cb-banner-height, 150px) + 20px) !important;
}

body:has(.cb-cookie-banner.cb-position-bottom-left) #rb-wpml-floating-switcher,
body:has(.cb-cookie-banner.cb-position-bottom-right) #rb-wpml-floating-switcher {
    bottom: calc(var(--cb-banner-height, 200px) + 20px) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .cb-banner-container {
        flex-direction: column;
    }

    .cb-banner-actions {
        width: 100%;
    }

    .cb-btn {
        flex: 1;
        text-align: center;
    }

    .cb-cookie-banner.cb-position-bottom-left,
    .cb-cookie-banner.cb-position-bottom-right {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}
