/* Consent banner, footer "Preferenze cookie" control and tables of the legal pages.
   Loaded after site.css: uses its tokens (--ac, --ink, --muted, --line, --r). */

/* ---------- Banner: a white box in the lower left corner, no overlay ---------- */
.consent {
    position: fixed; left: 1.5rem; bottom: 1.5rem; z-index: 10050;
    width: calc(100% - 3rem); max-width: 34rem; max-height: calc(100vh - 3rem); overflow-y: auto;
    padding: 1.5rem 1.5rem 1.4rem;
    background: #fff; color: var(--ink);
    border: 1px solid var(--line); border-top: 2px solid var(--ac); border-radius: var(--r);
    box-shadow: 5px 6px 14px rgba(22, 22, 22, .12);
    font-size: .97rem; line-height: 1.5;
}
.consent[hidden], .consent-panel[hidden] { display: none; }
.consent h2 { font-size: 1.15rem; font-weight: 400; line-height: 1.3; margin: 0 2.5rem .6rem 0; }
.consent h2:focus { outline: 0; }
.consent p { margin: 0 0 1.1rem; color: var(--muted); }
.consent p a { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* Accept and refuse: same component, same size, side by side */
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.consent .btn-site { justify-content: center; min-width: 8.5rem; padding: .6rem 1.2rem; cursor: pointer; }
.consent .btn-site::after { content: none; }
.consent-more { margin-left: auto; padding: .6rem 0; border: 0; background: none; color: var(--ac-ink); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }

.consent-close { position: absolute; top: .6rem; right: .6rem; display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--ink); cursor: pointer; }
.consent-close:hover { background: var(--ac-soft); }
.consent-close svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.consent-panel { margin-top: 1.1rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.consent-panel ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.consent-panel li { display: flex; align-items: flex-start; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.consent-panel input { flex: none; width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--ac); }
.consent-panel label { color: var(--muted); }
.consent-panel label strong { color: var(--ink); font-weight: 600; }

.consent button:focus-visible, .consent a:focus-visible, .consent input:focus-visible,
.linklike:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

@media (max-width: 575.98px) {
    .consent { left: .75rem; bottom: .75rem; width: calc(100% - 1.5rem); max-height: calc(100vh - 1.5rem); padding: 1.25rem 1.1rem 1.1rem; }
    .consent .btn-site { flex: 1 1 0; min-width: 0; }
    .consent-more { flex-basis: 100%; margin-left: 0; text-align: left; }
}

/* ---------- A button that reads as a link (footer "Preferenze cookie") ---------- */
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.linklike:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.site-footer .linklike { color: var(--foot-fg); }
.site-footer .linklike:hover { color: var(--foot-strong); }

/* ---------- Legal pages: everything is scoped to .legal, set on the text column of privacy.html and cookie.html ---------- */
.legal .legal-date { font-size: .9rem; }
.legal address { max-width: 46rem; margin: 0 0 1rem; color: var(--muted); font-style: normal; line-height: 1.7; }
.legal .block > h3 { margin-top: 1.75rem; }
.legal .block > h2 + h3 { margin-top: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 0 0 1.5rem; }
.legal-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .95rem; }
.legal-table th, .legal-table td { padding: .7rem 1rem .7rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { font-weight: 600; border-bottom-color: var(--ink); white-space: nowrap; }
.legal-table td { color: var(--muted); }
.legal-table code { color: var(--ink); font-size: .9em; }
.legal .consent-status { padding: .9rem 1.1rem; border-radius: var(--r); background: var(--box); color: var(--ink) !important; }
.legal button.btn-site { cursor: pointer; }
