/* Cookie consent banner (#consent, from partials/consent.*.html) and the footer "Cookie
   settings" control. The banner sits outside .lp like #donate, so it carries its own font rule.
   Desktop: a card in the bottom inline-start corner (bottom-left on ltr, bottom-right on rtl),
   opposite the floating donate button (.sticky / .t2-float). Mobile: a full-width bar along the
   bottom; while it is open consent-banner.js sets `is-consent-open` and --consent-h on <html>
   and the floating button is lifted above it. z-index 80: above .sticky (70) and .t2-float (45),
   under #donate (100). Direction comes from <html dir>; only logical properties here. */

.consent {
    position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 80;
    max-width: 360px;
    font-family: var(--font); font-size: .95rem; line-height: 1.5;
    color: var(--ink); background: var(--white);
    border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem;
    box-shadow: 0 14px 34px -8px rgba(0, 0, 0, .35);
}
.consent[hidden] { display: none; }
.consent__text { margin: 0 0 .8rem; }
.consent__text a { color: inherit; text-underline-offset: 3px; }

/* One rule for both buttons: Accept and Decline have equal weight by construction. */
.consent__btns { display: flex; gap: .6rem; }
.consent__btn {
    flex: 1 1 0; font: inherit; font-weight: 800; min-height: 44px; padding: .55rem 1rem;
    border-radius: 999px; border: 2px solid var(--olive-black);
    background: var(--olive-black); color: #fff; cursor: pointer;
}
.consent__btn:hover { background: var(--olive); }

/* Footer control: a <button> (it opens a panel, not a page) styled as the neighbouring links.
   Not `all: unset`, which would drop the :focus-visible outline from base.css. */
.cookie-settings {
    background: none; border: 0; padding: 0; margin: 0;
    font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px;
    cursor: pointer;
}
.cookie-settings:hover { color: var(--olive-lite); }

/* Covers landing.css's 760px and t2.css's 800px breakpoints. Both lift selectors (0,1,1) beat
   the sheets' .sticky / .t2-float (0,1,0) whatever the load order.
   The bar is one row, at most 40px tall (1px border + 3px padding + 32px buttons + 3px; the
   safe-area inset is added below that): the text (two short lines at most) on the inline-start
   side, the two buttons, no longer stretched, on the inline-end side. */
@media (max-width: 800px) {
    .consent {
        inset-inline: 0; inset-block-end: 0; max-width: none;
        display: flex; align-items: center; gap: .5rem;
        font-size: .75rem; line-height: 1.2;
        border-radius: 0; border-width: 1px 0 0;
        padding: 3px .75rem calc(3px + env(safe-area-inset-bottom));
    }
    .consent__text { flex: 1 1 auto; margin: 0; }
    .consent__text a { white-space: nowrap; }    /* the link wraps as a whole, not mid-phrase */
    .consent__btns { flex: 0 0 auto; gap: .4rem; }
    .consent__btn { flex: 0 0 auto; min-height: 32px; padding: 0 .8rem; font-size: .8rem; }
    html.is-consent-open .sticky {
        inset-block-end: calc(var(--consent-h, 0px) + 12px + env(safe-area-inset-bottom));
    }
    html.is-consent-open .t2-float { inset-block-end: var(--consent-h, 0px); }
}
