/* ========================================
   GDPR Cookie Consent Styles
   ======================================== */

/* Overlay */
.cc-overlay {
    position: fixed;
    inset: 0;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: ccFadeIn 0.3s ease;
}

@keyframes ccFadeIn {
    from {
        opacity: 0;
    }


    to {
        opacity: 1;
    }
}

/* Modal */
.cc-modal {
    background: linear-gradient(145deg, #141824, #1a1f33);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px !important;
    padding: 32px !important;
    max-width: 520px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.06) !important;
    animation: ccSlideUp 0.35s ease !important;
    font-family: 'Nunito', sans-serif !important;
}

@keyframes ccSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }


    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.cc-header {
    text-align: center !important;
    margin-bottom: 24px !important;
    font-family: 'Nunito', sans-serif !important;
    margin-top: -20px;
}

.cc-header-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: -40px !important;
    position: relative !important;
    z-index: 10 !important;
}

.cc-close-btn {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0 !important;
}


.cc-icon {
    font-size: 42px !important;
}

.cc-header h2 {
    font-family: 'Nunito', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--text-main, #f1f5f9) !important;
}

.cc-subtitle {
    font-size: 13px !important;
    color: #94a3b8 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* Categories */
.cc-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.cc-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    transition: border-color 0.2s;
}

.cc-category:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.cc-category-info {
    flex: 1;
    min-width: 0;
}

.cc-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.cc-cat-icon {
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.cc-cat-icon.cc-necessary {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.cc-cat-icon.cc-analytics {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.cc-cat-icon.cc-functional {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
}

.cc-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 6px;
}

.cc-badge.cc-required {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.cc-category-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

/* Toggle Switch */
.cc-toggle {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.cc-toggle input {
    display: none;
}

.cc-slider {
    display: block;
    width: 48px;
    height: 26px;
    background: #334155;
    border-radius: 26px;
    position: relative;
    transition: background 0.3s;
}

.cc-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #94a3b8;
    border-radius: 50%;
    transition: transform 0.3s, background 0.3s;
}

.cc-toggle input:checked+.cc-slider {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.cc-toggle input:checked+.cc-slider::after {
    transform: translateX(22px);
    background: #fff;
}

.cc-slider.cc-disabled {
    background: rgba(34, 197, 94, 0.25);
    cursor: not-allowed;
}

.cc-slider.cc-disabled::after {
    background: #22c55e;
    transform: translateX(22px);
}

/* Buttons */
.cc-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cc-btn {
    flex: 1;
    padding: 13px 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cc-btn:active {
    transform: scale(0.97);
}

.cc-btn-selected {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cc-btn-selected:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cc-btn-refuse {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cc-btn-refuse:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.35);
}

.cc-btn-all {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.cc-btn-all:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}

.cc-settings-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2147483647;
    /* Enforce maximum z-index */
    background: var(--card-bg, #1e293b);
    color: var(--text-muted, #94a3b8);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cc-hidden {
    display: none !important;
}

.cc-settings-btn:hover {
    background: var(--bg-primary, #0f172a);
    color: var(--text-main, #f8fafc);
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Light theme button */
.theme-light .cc-settings-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-light .cc-settings-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

.cc-promo-btn {
    position: fixed;
    bottom: 72px;
    /* Positioned slightly above the settings button */
    left: 24px;
    z-index: 2147483647;
    /* Enforce maximum z-index */
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 600px) {
    .cc-overlay {
        padding: 16px !important;
        overflow-y: auto !important;
    }

    .cc-modal {
        padding: 20px 0 0 0 !important;
        /* Remove bottom padding to let sticky actions touch bottom */
        max-height: 85vh !important;
        /* Prevents modal from overflowing the fixed overlay on short height screens */
        width: 100% !important;
        margin: 0 auto !important;
        border-radius: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .cc-header {
        margin-bottom: 16px !important;
        padding: 24px 20px 16px !important;
    }

    .cc-icon {
        font-size: 32px !important;
    }

    .cc-header h2 {
        font-size: 18px !important;
    }

    .cc-subtitle {
        font-size: 12px !important;
    }

    .cc-categories,
    .cc-terms-link {
        padding: 0 20px !important;
    }

    .cc-actions {
        padding: 15px 20px !important;
        position: sticky !important;
        bottom: 0 !important;
        background: inherit !important;
        z-index: 10 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin-top: 10px !important;
    }

    .cc-promo-btn,
    .cc-settings-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
        left: 16px !important;
    }

    .cc-settings-btn {
        bottom: 24px !important;
    }

    .cc-promo-btn {
        bottom: 72px !important;
    }

    .cc-actions>div,
    .cc-actions {
        display: flex;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .cc-actions>div.cc-hidden {
        display: none !important;
    }

    .cc-actions .cc-btn {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: none !important;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .cc-modal {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .cc-category {
        padding: 14px;
    }
}

/* Terms link */
.cc-terms-link {
    text-align: center;
    font-size: 0.78rem;
    color: #777;
    margin: 20px 0 12px;
    padding: 0;
}

.cc-terms-link a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
}

.cc-terms-link a:hover {
    text-decoration: underline;
}

/* Light Theme for Modal */
.cc-modal.theme-light {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.cc-modal.theme-light .cc-header h2 {
    color: #1e293b;
}

.cc-modal.theme-light .cc-subtitle {
    color: #64748b;
}

.cc-modal.theme-light .cc-category {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.cc-modal.theme-light .cc-category-title {
    color: #334155;
}

.cc-modal.theme-light .cc-category:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cc-modal.theme-light .cc-btn-selected {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.cc-modal.theme-light .cc-btn-selected:hover {
    background: #e2e8f0;
}

.cc-modal.theme-light .cc-btn-refuse {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.cc-modal.theme-light .cc-btn-refuse:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

/* Theme Toggle Button */
.cc-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #94a3b8;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}

.theme-light .cc-theme-toggle {
    color: #64748b;
}

.theme-light .cc-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}


@media (max-width: 480px) {
    .cc-promo-carousel-wrapper {
        min-height: 280px;
    }
}
