﻿/* Cookie consent banner styles with English and Arabic layout support. */

.cookie-consent-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 24px;
}

.cookie-consent-box {
    width: min(760px, 100%);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    padding: 26px;
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.cookie-consent-header h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
}

.cookie-consent-header p,
.cookie-consent-section p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 15px;
}

.cookie-consent-section {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .cookie-consent-section.required {
        background: #eff6ff;
        border-color: #bfdbfe;
    }

    .cookie-consent-section h3 {
        margin: 0 0 6px;
        color: #1e293b;
        font-size: 17px;
        font-weight: 800;
    }

.cookie-always-active {
    white-space: nowrap;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.cookie-switch {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 30px;
    flex: 0 0 auto;
}

    .cookie-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .cookie-switch span {
        position: absolute;
        inset: 0;
        cursor: pointer;
        background: #cbd5e1;
        border-radius: 999px;
        transition: 0.25s ease;
    }

        .cookie-switch span::before {
            content: "";
            position: absolute;
            width: 24px;
            height: 24px;
            left: 3px;
            top: 3px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
            transition: 0.25s ease;
        }

    .cookie-switch input:checked + span {
        background: #2563eb;
    }

        .cookie-switch input:checked + span::before {
            transform: translateX(24px);
        }

.cookie-consent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.cookie-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

    .cookie-btn.primary {
        background: #2563eb;
        color: white;
    }

        .cookie-btn.primary:hover {
            background: #1d4ed8;
        }

    .cookie-btn.secondary {
        background: #e2e8f0;
        color: #0f172a;
    }

        .cookie-btn.secondary:hover {
            background: #cbd5e1;
        }

/* Arabic / RTL support */
html[dir="rtl"] .cookie-consent-box,
body[dir="rtl"] .cookie-consent-box {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .cookie-consent-actions,
body[dir="rtl"] .cookie-consent-actions {
    justify-content: flex-start;
}

html[dir="rtl"] .cookie-switch input:checked + span::before,
body[dir="rtl"] .cookie-switch input:checked + span::before {
    transform: translateX(-24px);
}

html[dir="rtl"] .cookie-switch span::before,
body[dir="rtl"] .cookie-switch span::before {
    left: auto;
    right: 3px;
}

@media (max-width: 640px) {
    .cookie-consent-overlay {
        padding: 14px;
    }

    .cookie-consent-box {
        padding: 20px;
        border-radius: 18px;
    }

    .cookie-consent-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .cookie-consent-actions {
        flex-direction: column-reverse;
    }

    .cookie-btn {
        width: 100%;
    }
}
