/* Cookie Banner Styles - Modern & GDPR Compliant */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 24px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #2563eb;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.cookie-text h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-text p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

.cookie-policy-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.cookie-policy-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cookie-btn-accept {
    background: #10b981;
    color: white;
}

.cookie-btn-accept:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cookie-btn-reject {
    background: #ef4444;
    color: white;
}

.cookie-btn-reject:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cookie-btn-manage {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.cookie-btn-manage:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

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

.cookie-settings-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-settings-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.cookie-close-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.cookie-settings-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

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

.cookie-category h3 {
    margin: 0;
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

.cookie-category p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.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: #d1d5db;
    transition: 0.3s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #10b981;
}

.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-required-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.cookie-settings-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .cookie-banner {
        background: #1f2937;
        border-top-color: #3b82f6;
    }

    .cookie-text h3 {
        color: #f9fafb;
    }

    .cookie-text p {
        color: #d1d5db;
    }

    .cookie-btn-manage {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }

    .cookie-btn-manage:hover {
        background: #4b5563;
    }

    .cookie-settings-content {
        background: #1f2937;
    }

    .cookie-settings-header {
        border-bottom-color: #374151;
    }

    .cookie-settings-header h2 {
        color: #f9fafb;
    }

    .cookie-close-btn {
        color: #9ca3af;
    }

    .cookie-close-btn:hover {
        background: #374151;
        color: #f9fafb;
    }

    .cookie-category {
        background: #111827;
        border-color: #374151;
    }

    .cookie-category h3 {
        color: #f9fafb;
    }

    .cookie-category p {
        color: #9ca3af;
    }

    .cookie-settings-footer {
        border-top-color: #374151;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner-content {
        flex-direction: column;
    }

    .cookie-icon {
        font-size: 24px;
    }

    .cookie-text h3 {
        font-size: 18px;
    }

    .cookie-text p {
        font-size: 13px;
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .cookie-settings-content {
        margin: 10px;
        max-height: 95vh;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 16px;
    }

    .cookie-settings-footer {
        flex-direction: column;
    }

    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 12px;
    }

    .cookie-text h3 {
        font-size: 16px;
    }

    .cookie-text p {
        font-size: 12px;
    }

    .cookie-btn {
        font-size: 13px;
        padding: 12px 16px;
    }
}


/* RTL (Arabic) Support */
[dir="rtl"] .cookie-banner-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-banner-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-category {
    border-left: none;
    border-right: 4px solid #e5e7eb;
}

[dir="rtl"] .cookie-category:nth-child(1) {
    border-right-color: #2563eb;
}

[dir="rtl"] .cookie-category:nth-child(2) {
    border-right-color: #10b981;
}

[dir="rtl"] .cookie-category:nth-child(3) {
    border-right-color: #f59e0b;
}

[dir="rtl"] .cookie-settings-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-category-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-required-badge {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .cookie-settings-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-toggle-slider:before {
    left: auto;
    right: 3px;
}

[dir="rtl"] .cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(-24px);
}

@media (max-width: 768px) {
    [dir="rtl"] .cookie-banner-actions {
        flex-direction: column;
    }
    
    [dir="rtl"] .cookie-settings-footer {
        flex-direction: column;
    }
}
