/* Cookie consent banner. Self-contained (with fallbacks) because the older admin pages don't load base.css. */

.consent {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    width: min(400px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid var(--border, #e1e3de);
    border-radius: 16px;
    background: var(--surface, #fbfbfa);
    color: var(--text, #15181b);
    box-shadow: var(--shadow, 0 1px 2px rgb(27 35 28 / 0.06), 0 8px 28px rgb(27 35 28 / 0.12));
    font-family: var(--font, system-ui, sans-serif);
    font-size: 14px;
    line-height: 1.45;
}

.consent p { margin: 0; }

.consent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.consent-btn {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--border, #e1e3de);
    border-radius: 10px;
    background: var(--surface, #fbfbfa);
    color: inherit;
    font: inherit;
    font-weight: 550;
    cursor: pointer;
}
.consent-btn:hover { background: var(--surface-2, #f1f2ef); }
.consent-btn:focus-visible { outline: 2px solid var(--accent, #2453d6); outline-offset: 2px; }

.consent-btn-primary {
    border-color: var(--accent, #2453d6);
    background: var(--accent, #2453d6);
    color: var(--accent-ink, #ffffff);
}
.consent-btn-primary:hover { background: var(--accent, #2453d6); filter: brightness(1.08); }

@media (prefers-color-scheme: dark) {
    .consent {
        border-color: var(--border, #2b2f34);
        background: var(--surface, #17191c);
        color: var(--text, #eceef0);
    }
}

@media (max-width: 767px) {
    .consent {
        right: 12px;
        left: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
    }
    .consent-actions .consent-btn { flex: 1; }
}
