/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 550px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    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-size: 1rem;
    font-weight: 600;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.95;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.cookie-consent-btn {
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 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.2);
}

.cookie-consent-btn.accept {
    background-color: #ffffff;
    color: #ffffff;
    background: linear-gradient(135deg, #5568d3 0%, #6b4ba2 100%);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 11px 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    max-width: 160px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-btn.accept:hover {
    background: linear-gradient(135deg, #4557c2 0%, #5a3a91 100%);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-consent-btn.decline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.cookie-consent-btn.decline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
}

.cookie-consent-btn.settings {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.75rem;
}

.cookie-consent-btn.settings:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* 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;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: #ffffff;
    color: #333333;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-settings-content h2 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 1.5rem;
}

.cookie-category {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.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: #333;
}

.cookie-category p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    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: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #667eea;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.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: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-settings-btn.save {
    background-color: #667eea;
    color: #ffffff;
}

.cookie-settings-btn.save:hover {
    background-color: #5568d3;
}

.cookie-settings-btn.cancel {
    background-color: #e0e0e0;
    color: #333333;
}

.cookie-settings-btn.cancel:hover {
    background-color: #d0d0d0;
}

/* 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;
}
