/* Cookie Consent Banner - Professional Government Style */

/* Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.hide {
    transform: translateY(100%);
}

/* Banner Inner */
.cookie-consent-inner {
    background: linear-gradient(135deg, rgba(10, 38, 71, 0.98) 0%, rgba(20, 66, 114, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.3);
    padding: 20px 24px;
}

/* Content Layout */
.cookie-consent-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Icon */
.cookie-consent-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2C74B3, #205295);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(44, 116, 179, 0.3);
}

.cookie-consent-icon i {
    font-size: 24px;
    color: #fff;
}

/* Text Content */
.cookie-consent-text {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-title .official-badge {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cookie-consent-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin: 0;
}

.cookie-consent-description a {
    color: #60A5FA;
    text-decoration: underline;
    text-decoration-color: rgba(96, 165, 250, 0.4);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.cookie-consent-description a:hover {
    color: #93C5FD;
    text-decoration-color: rgba(147, 197, 253, 0.6);
}

/* Buttons Container */
.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

/* Button Base */
.cookie-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Accept Button */
.cookie-btn-accept {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Decline Button */
.cookie-btn-decline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Settings Button */
.cookie-btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 12px 16px;
}

.cookie-btn-settings:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.cookie-settings-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 580px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.show .cookie-settings-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.cookie-settings-header {
    background: linear-gradient(135deg, #0A2647, #144272);
    padding: 20px 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-settings-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-settings-header h3 i {
    font-size: 20px;
    color: #60A5FA;
}

.cookie-settings-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Modal Body */
.cookie-settings-body {
    padding: 24px;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
}

.cookie-settings-intro {
    font-size: 14px;
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
}

/* Cookie Category */
.cookie-category {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.cookie-category:hover {
    border-color: #CBD5E1;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-title i {
    color: #2C74B3;
    font-size: 16px;
}

.cookie-category-desc {
    font-size: 12px;
    color: #64748B;
    line-height: 1.6;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #CBD5E1;
    border-radius: 26px;
    transition: all 0.3s ease;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    right: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked+.cookie-toggle-slider {
    background: linear-gradient(135deg, #10B981, #059669);
}

.cookie-toggle input:checked+.cookie-toggle-slider:before {
    transform: translateX(-22px);
}

.cookie-toggle input:disabled+.cookie-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Required Badge */
.required-badge {
    background: #EFF6FF;
    color: #2563EB;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Modal Footer */
.cookie-settings-footer {
    background: #F1F5F9;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #E2E8F0;
}

.cookie-btn-save {
    background: linear-gradient(135deg, #0A2647, #144272);
    color: #fff;
}

.cookie-btn-save:hover {
    background: linear-gradient(135deg, #144272, #205295);
    transform: translateY(-2px);
}

.cookie-btn-accept-all {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
}

.cookie-btn-accept-all:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-inner {
        padding: 16px;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-icon {
        display: none;
    }

    .cookie-consent-text {
        min-width: 100%;
    }

    .cookie-consent-title {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    .cookie-btn-settings {
        width: 100%;
    }

    .cookie-settings-container {
        max-height: 90vh;
    }

    .cookie-settings-body {
        max-height: calc(90vh - 180px);
    }
}

@media (max-width: 480px) {
    .cookie-consent-title {
        font-size: 14px;
    }

    .cookie-consent-description {
        font-size: 12px;
    }

    .cookie-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}