/*
 * LayerCloud cookie-consent banner styles (issue #79).
 * First-party file; loaded by every public shell. Logical properties only,
 * so the banner follows the document direction (rtl on /fa/) with no
 * extra rules. No inline styles are used anywhere - the document CSP stays
 * strict.
 */
.lc-consent {
    position: fixed;
    inset-inline-start: 0;
    inset-inline-end: 0;
    bottom: 0;
    z-index: 2147483000;
    display: flex;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

.lc-consent-card {
    pointer-events: auto;
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(8, 14, 21, 0.97);
    color: #d1fae5;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(16, 185, 129, 0.12);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    backdrop-filter: blur(6px);
}

.lc-consent-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #ecfdf5;
}

.lc-consent-body {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: rgba(209, 250, 229, 0.78);
}

.lc-consent-links {
    display: flex;
}

.lc-consent-links a {
    font-size: 12px;
    font-weight: 700;
    color: #34d399;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lc-consent-links a:hover {
    color: #a7f3d0;
}

.lc-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.lc-consent-btn {
    appearance: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.lc-consent-accept {
    border: 1px solid #10b981;
    background: #10b981;
    color: #04120b;
}

.lc-consent-accept:hover {
    background: #34d399;
}

.lc-consent-decline {
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: transparent;
    color: #a7f3d0;
}

.lc-consent-decline:hover {
    border-color: #34d399;
    color: #ecfdf5;
}

@media (max-width: 640px) {
    .lc-consent { padding: 10px; }
    .lc-consent-card { padding: 16px; }
    .lc-consent-actions { justify-content: stretch; }
    .lc-consent-btn { flex: 1 1 auto; text-align: center; }
}

/* #159: light mode. The card was rgba(8,14,21,0.97) in BOTH themes - a
   near-black slab sitting on a white page with a 0.55 black shadow, which
   read as a rendering fault rather than a surface. The hexes below are the
   same emerald family the dark rules use, at the stops that clear 4.5:1 on
   a white card. The html.light class is the same hook the app's own theme
   bootstrap writes (utils/theme.ts), so the banner follows the visitor's
   stored choice with no extra plumbing - and this file stays first-party
   with no inline styles, so the CSP is untouched. */
html.light .lc-consent-card {
    border-color: rgba(5, 150, 105, 0.35);
    background: #ffffff;
    color: #065f46;
    box-shadow: 0 18px 60px rgba(6, 35, 25, 0.18), 0 0 40px rgba(16, 185, 129, 0.10);
}

html.light .lc-consent-title { color: #064e3b; }

html.light .lc-consent-body { color: #4b6358; }

html.light .lc-consent-links a { color: #047857; }

html.light .lc-consent-links a:hover { color: #065f46; }

html.light .lc-consent-accept {
    border-color: #059669;
    background: #059669;
    color: #ffffff;
}

html.light .lc-consent-accept:hover { background: #047857; }

html.light .lc-consent-decline {
    border-color: rgba(5, 150, 105, 0.45);
    color: #065f46;
}

html.light .lc-consent-decline:hover {
    border-color: #059669;
    color: #064e3b;
}
