/**
 * consent.css — cookie consent banner + preferences dialog.
 *
 * Visual language follows the existing site: Inter, --grey-* tokens from style.css,
 * 8px radii, the same navy/white contrast as the header. Deliberately plain: a consent
 * notice that looks like an ad gets dismissed reflexively, which is the opposite of
 * what informed consent means.
 *
 * `html { zoom: calc(100vw / 1440) }` in style.css scales the whole desktop canvas, and
 * position:fixed elements ride that zoom (the site header at style.css:65 already does).
 * So these sizes are in the same 1440-wide design space as the rest of the site, and the
 * mobile breakpoint drops the zoom exactly as it does everywhere else.
 */

.consent-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 9000;              /* above the site header (1000) and the search overlay */
    margin: 0 auto;
    max-width: 1100px;
    background: var(--white, #fff);
    color: var(--grey-700, #374151);
    border: 1px solid var(--grey-200, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(17, 24, 39, .18);
    padding: 22px 26px;
    font-family: var(--font, 'Inter', sans-serif);
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

/* Hidden until the script decides it is needed, so a visitor who has already chosen
   never sees a flash of the banner on a cached page. */
.consent-banner[hidden] { display: none; }

.consent-copy { flex: 1 1 460px; min-width: 0; }

.consent-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--grey-900, #111827);
}

.consent-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
}

.consent-text a { color: #1d4ed8; text-decoration: underline; }

.consent-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.consent-btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

/* Accept and Reject are given identical weight on purpose. A prominent "Accept" beside a
   faint "Reject" is the dark pattern the ICO calls out most often; equal prominence is
   the thing that makes the consent valid. */
.consent-btn--accept { background: var(--grey-900, #111827); color: #fff; }
.consent-btn--accept:hover { background: #000; }

.consent-btn--reject {
    background: var(--white, #fff);
    color: var(--grey-900, #111827);
    border-color: var(--grey-300, #d1d5db);
}
.consent-btn--reject:hover { background: var(--grey-100, #f3f4f6); }

.consent-btn:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

/* The persistent "Cookie settings" control in the footer, so a choice can be withdrawn
   as easily as it was given — PECR requires withdrawal to be as easy as consent. */
.consent-reopen {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .consent-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 18px;
        gap: 16px;
    }
    .consent-actions { width: 100%; }
    .consent-btn { flex: 1 1 auto; text-align: center; }
}
