/* Privacy consent banner (Phase 2). Loaded on every page; the banner itself
   stays hidden unless assets/js/consent.js shows it, so there is no layout
   shift and no effect on the page when no banner is needed.
   z-index sits below the floating contact actions (z-index 1000 in main.css)
   so WhatsApp / assessment buttons stay visible and clickable above it. */
.consent-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    /* The expanded Manage panel must stay usable on short/small screens:
       the banner never exceeds the viewport height and scrolls internally,
       so every control remains reachable. */
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    color: var(--text-dark, #14201a);
    border: 1px solid var(--border-soft, #dcefd9);
    border-radius: var(--radius-md, 16px);
    box-shadow: 0 16px 48px rgba(27, 67, 50, 0.18);
    padding: 18px 20px;
    max-width: 680px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.consent-banner[hidden] {
    display: none;
}

/* Keyboard navigation: every interactive element in the banner and the
   footer settings button gets a clearly visible focus indicator. All
   controls are native buttons/inputs/links, so they are reachable and
   operable by keyboard in DOM order whenever the banner is visible, and
   removed from the tab order while it (or the Manage panel) is hidden. */
.consent-banner button:focus-visible,
.consent-banner a:focus-visible,
.consent-banner input:focus-visible,
.consent-settings-btn:focus-visible {
    outline: 3px solid var(--accent-orange, #e86014);
    outline-offset: 2px;
}

.consent-banner__text {
    margin: 0 0 12px;
}

.consent-banner__text a {
    color: var(--mid-green, #2d6a4f);
    text-decoration: underline;
}

.consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.consent-banner__manage {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft, #dcefd9);
}

.consent-banner__manage[hidden] {
    display: none;
}

.consent-banner__toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.consent-banner__toggle input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--dark-green, #1b4332);
}

.consent-banner__note {
    margin: 10px 0 12px;
    color: var(--text-muted, #5c6b5e);
    font-size: 0.85rem;
}

.consent-settings-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 14px;
}

.consent-settings-btn:hover {
    color: var(--accent-green, #52b788);
}

@media (min-width: 768px) {
    .consent-banner {
        right: auto;
        width: 520px;
    }
}

@media (max-width: 480px) {
    .consent-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 14px 16px;
        max-height: calc(100dvh - 20px);
    }

    .consent-banner__actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}
