/* SiteTech cookie banner, settings panel and the footer button (assets/consent.js). Scoped to #st-consent and
   .st-consent-open so it cannot collide with shared.css or home.css. Colours come from tokens.css only.
   The two answers, Decline and Accept, are the same button: same size, same weight, same colours. */

#st-consent, #st-consent * { box-sizing: border-box; }
#st-consent[hidden], #st-consent [hidden] { display: none; }

#st-consent {
    position: fixed;
    z-index: 700;                       /* above the chat widget (500) and the header */
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
    color: var(--fg-soft);
    font-family: 'Geist', system-ui, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
#st-consent .st-consent-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fg-title);
}
#st-consent .st-consent-text { margin: 0 0 12px; color: var(--fg-muted); }
#st-consent a { color: var(--cyan); text-decoration: underline; }

#st-consent .st-consent-actions { display: flex; gap: 8px; }
#st-consent .st-consent-btn {
    flex: 1 1 0;
    min-height: 44px;
    min-width: 44px;
    padding: 0 16px;
    background: var(--fg);
    color: var(--bg);
    border: 1px solid var(--fg);
    border-radius: 22px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
/* "Back" in the panel is the one place a button is quieter: it is not an answer. */
#st-consent .st-consent-btn.st-consent-btn-quiet { background: transparent; color: var(--fg); border-color: var(--border); }
#st-consent .st-consent-manage {
    display: inline-block;
    min-height: 44px;
    margin-top: 4px;
    padding: 0 4px;
    background: none;
    border: none;
    color: var(--cyan);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
#st-consent button:focus-visible,
#st-consent a:focus-visible,
#st-consent input:focus-visible,
.st-consent-open:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

#st-consent .st-consent-row {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border-soft);
}
#st-consent .st-consent-row input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--cyan); }
#st-consent .st-consent-rowname { font-weight: 600; color: var(--fg-title); }
#st-consent .st-consent-rowtext { grid-column: 2; margin: 2px 0 0; color: var(--fg-muted); font-size: 13px; }
#st-consent .st-consent-panel .st-consent-actions { margin-top: 12px; }

/* The footer button reads as one of the footer's links. */
.site-footer .footer-nav .st-consent-open {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--fg-faint);
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.25s;
}
.site-footer .footer-nav .st-consent-open:hover { color: var(--fg); }
@media (max-width: 720px) { .site-footer .footer-nav .st-consent-open { letter-spacing: 0; } }

@media (min-width: 600px) {
    #st-consent {
        left: 16px;
        right: auto;
        bottom: 16px;
        width: 420px;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
        padding-bottom: 16px;
        border: 1px solid var(--border);
        border-radius: 16px;
    }
}
