/* Cookie Consent Banner Styles — Design B Glassmorphism */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 550px;
    width: calc(100% - 40px);
    background: rgba(12, 12, 24, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #f0f2f5;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: none;
    animation: slideUp 0.4s ease-out;
}

.cookie-consent-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-consent-text {
    text-align: center;
}

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #f0f2f5;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #8b95a8;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.cookie-consent-btn {
    padding: 9px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    flex: 1;
    max-width: 140px;
}

.cookie-consent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cookie-consent-btn.accept {
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 11px 20px;
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.3);
    max-width: 160px;
    border: none;
}

.cookie-consent-btn.accept:hover {
    box-shadow: 0 5px 18px rgba(139, 92, 246, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.cookie-consent-btn.decline {
    background-color: transparent;
    color: #8b95a8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
}

.cookie-consent-btn.decline:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f0f2f5;
}

.cookie-consent-btn.settings {
    background-color: rgba(255, 255, 255, 0.06);
    color: #8b95a8;
    font-size: 0.75rem;
}

.cookie-consent-btn.settings:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f0f2f5;
}

/* RTL Support */
[dir="rtl"] .cookie-consent-content {
    direction: rtl;
}

[dir="rtl"] .cookie-consent-text {
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 15px;
    }

    .cookie-consent-text h3 {
        font-size: 0.95rem;
    }

    .cookie-consent-text p {
        font-size: 0.75rem;
    }

    .cookie-consent-actions {
        flex-wrap: wrap;
    }

    .cookie-consent-btn {
        font-size: 0.75rem;
        padding: 8px 12px;
        max-width: none;
    }

    .cookie-consent-btn.accept {
        font-size: 0.85rem;
        padding: 10px 16px;
    }
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: rgba(12, 12, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f0f2f5;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.cookie-settings-content h2 {
    margin: 0 0 20px 0;
    font-family: 'Syne', sans-serif;
    color: #8b5cf6;
    font-size: 1.5rem;
}

.cookie-category {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-category h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #f0f2f5;
}

.cookie-category p {
    margin: 0;
    font-size: 0.9rem;
    color: #8b95a8;
    line-height: 1.5;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.4s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #8b95a8;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #8b5cf6;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
    background-color: white;
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-settings-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-settings-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-settings-btn.save {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    color: #ffffff;
}

.cookie-settings-btn.save:hover {
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.cookie-settings-btn.cancel {
    background-color: rgba(255, 255, 255, 0.06);
    color: #8b95a8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-settings-btn.cancel:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f0f2f5;
}

/* RTL Support for Modal */
[dir="rtl"] .cookie-settings-content {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .cookie-category-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-settings-actions {
    justify-content: flex-start;
}
