/* Shared extras: consent banner + legal pages. Theme variables come from the page (--neon-primary, data-mode). */

/* ---------- Consent banner ---------- */
.consent-banner {
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    margin-inline: auto;
    max-width: 34rem;
    z-index: 200;
    padding: 1.1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: 'Cairo', 'Inter', sans-serif;
}

.consent-title {
    margin: 0 0 0.25rem;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
}

.consent-body {
    margin: 0 0 0.9rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.consent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.consent-btn {
    min-height: 2.75rem;
    padding: 0.5rem 1.4rem;
    border-radius: 0.75rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.consent-accept {
    background: #06b6d4;
    color: #0f172a;
    border: 1px solid #06b6d4;
}

.consent-accept:hover {
    background: #22d3ee;
}

.consent-decline {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.4);
}

.consent-decline:hover {
    border-color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}

.consent-more {
    margin-inline-start: auto;
    font-size: 0.85rem;
    color: #67e8f9;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.consent-btn:focus-visible,
.consent-more:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .consent-banner {
        inset-inline: 0.5rem;
        bottom: 0.5rem;
    }
    .consent-more {
        margin-inline-start: 0;
        width: 100%;
    }
}

/* ---------- Legal pages (privacy.html / terms.html) ---------- */
html[lang="ar"] [data-en],
html[lang="en"] [data-ar] {
    display: none !important;
}

body.legal-page {
    --neon-primary: #7c3aed;
    --neon-primary-rgb: 124, 58, 237;
    background-color: #0f172a;
    color: #e2e8f0;
    overflow-x: hidden;
}

.legal-page .bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 25%);
}

.legal-card code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    font-size: 0.9em;
}

.legal-wrap {
    max-width: 52rem;
    margin-inline: auto;
    padding: 7rem 1rem 4rem;
}

.legal-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
    .legal-card {
        padding: 2.75rem 3rem;
    }
}

.legal-card h1 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 0.5rem;
}

.legal-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 2rem 0 0.6rem;
}

.legal-card p,
.legal-card li {
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 1rem;
}

.legal-card ul {
    list-style: disc;
    padding-inline-start: 1.4rem;
    margin: 0.5rem 0;
}

.legal-card a {
    color: #22d3ee;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-meta {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.legal-bar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.legal-bar-inner {
    max-width: 52rem;
    margin-inline: auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-bar a,
.legal-bar button {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.9rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: 0;
    cursor: pointer;
}

.legal-bar a:hover,
.legal-bar button:hover {
    color: #22d3ee;
}

/* Light mode (same data-mode switch as the landing page) */
html[data-mode="light"] .consent-banner {
    background: rgba(255, 255, 255, 0.97);
    color: #0f172a;
    border-color: rgba(var(--neon-primary-rgb, 124, 58, 237), 0.4);
}

html[data-mode="light"] .consent-title { color: #0f172a; }
html[data-mode="light"] .consent-body { color: #334155; }
html[data-mode="light"] .consent-decline { color: #0f172a; border-color: rgba(15, 23, 42, 0.4); }
html[data-mode="light"] .consent-decline:hover { background: rgba(15, 23, 42, 0.06); border-color: #0f172a; }
html[data-mode="light"] .consent-more { color: #0e7490; }

html[data-mode="light"] .legal-card { background: rgba(255, 255, 255, 0.85); border-color: rgba(15, 23, 42, 0.1); }
html[data-mode="light"] .legal-card h1,
html[data-mode="light"] .legal-card h2 { color: #0f172a; }
html[data-mode="light"] .legal-card p,
html[data-mode="light"] .legal-card li { color: #334155; }
html[data-mode="light"] .legal-card a { color: #0e7490; }
html[data-mode="light"] .legal-meta { color: #475569; }
html[data-mode="light"] .legal-bar { background: rgba(248, 250, 252, 0.92); border-color: rgba(15, 23, 42, 0.1); }
html[data-mode="light"] .legal-bar a,
html[data-mode="light"] .legal-bar button { color: #0f172a; }
