/* Privacy and Voorwaarden: the overview pages (introduction, index of cards, topics), the pages
   with an official text (components/official-text.njk) and the pop-up to request personal data.
   One style for every page under /privacy/ and /voorwaarden/. */

/* ---------- Text sections (page content around the official texts) ---------- */
/* sections get their spacing from the global section padding; a card above the official text sits as close as two cards in a row */
.legal:has(+ .document) { padding-bottom: 1.5rem; }
.legal__section { max-width: 46rem; margin-bottom: 3.5rem; scroll-margin-top: 7rem; }
.legal__section h2 { margin-bottom: 1rem; font-size: 1.75rem; line-height: 120%; }
.legal__section h2:not(:first-child) { margin-top: 2rem; }
.legal__section:last-child { margin-bottom: 0; }
/* Extra text around an official text: on a card like the official text's own */
.legal__section--card { max-width: none; padding: 1.5rem; border-radius: var(--radius-3xl); background-color: var(--color-blue-light); }
@media (min-width: 64rem) { .legal__section--card { padding: 2rem 3rem; } }
/* Short cards side by side */
.legal__cards { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .legal__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; } }
.legal__cards > .legal__section { margin-bottom: 0; }
.legal__section--card > * { max-width: 46rem; }
.legal__section--card > :last-child { margin-bottom: 0; }
.legal__section h3 { margin: 2rem 0 0.75rem; font-size: 1.375rem; }
.legal__section ul { padding-left: 1.25rem; }
.legal__section li { margin-bottom: 0.375rem; }
.legal__action { margin-top: 0.5rem; }

/* ---------- Index: one card per page ---------- */
.legal-index { display: grid; gap: 1rem; margin-bottom: 4rem; }
@media (min-width: 48rem) { .legal-index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; } }
@media (min-width: 64rem) { .legal-index--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.legal-index--stacked { grid-template-columns: none !important; gap: 1rem; margin-bottom: 0; }
.legal-index--stacked .legal-index__card { gap: 0.5rem; padding: 1.5rem; }
.legal-index--stacked .legal-index__title { font-size: 1.375rem; }
.legal-index--stacked .btn { margin-top: 0.25rem; padding-inline: 1rem; font-size: 1rem; }

/* Overview with a side column: the text on the left, the index on the right */
.legal__split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 4rem; }
.legal__aside { margin-bottom: 3.5rem; }
.legal__aside-title { margin-bottom: 0.75rem; font-size: 1.75rem; line-height: 120%; }
@media (min-width: 64rem) {
  .legal__split { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
  .legal__aside { grid-column: 2; grid-row: 1; margin-bottom: 0; }
  .legal__main { grid-column: 1; grid-row: 1; }
}
/* Stays in view while the text scrolls, when the window is tall enough for the whole column */
@media (min-width: 64rem) and (min-height: 58rem) { .legal__aside { position: sticky; top: calc(132px + 2.5rem); } } /* 132px: the fixed header */
.legal-index__card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; text-decoration-line: none; }
.legal-index__title { margin: 0; font-size: 1.5rem; line-height: 120%; }
.legal-index__text { flex: 1; margin: 0; }
.legal-index__card .btn { margin-top: 0.5rem; }

/* ---------- Official text ---------- */
.document { scroll-margin-top: 6rem; }
.document__card { padding: 1.5rem; margin-bottom: 3rem; border-radius: var(--radius-3xl); background-color: var(--color-blue-light); color: var(--color-primary); }
@media (min-width: 64rem) { .document__card { padding: 3rem; } }
.document__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgb(0 0 148 / 0.15); }
.document__head:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.document__title { flex: 1 1 100%; margin: 0; font-size: 1.75rem; line-height: 120%; }
.document__date { margin: 0; opacity: 0.75; }
.document__pdf { margin-left: auto; }
.document__pdf-icon { width: 1.125rem; height: 1.125rem; }
@media (max-width: 47.999rem) { .document__pdf { margin-left: 0; } }

.document__toc-title { margin-bottom: 0.5rem; font-weight: 700; }
.document__toc ol { padding: 0; margin: 0; list-style: none; }
@media (min-width: 48rem) { .document__toc ol { columns: 2; column-gap: 2rem; } }
.document__toc li { margin: 0 0 0.5rem; break-inside: avoid; }
.document__toc a { text-decoration-line: none; }
/* Numbered articles: the number in its own column, so all titles line up */
.document__toc--numbered a { display: grid; grid-template-columns: 2.25rem 1fr; }
.document__toc-nr { font-weight: 700; color: var(--color-blue); }
.document__toc-nr { font-variant-numeric: tabular-nums; }
@media (hover: hover) { .document__toc a:hover { text-decoration-line: underline; } }

/* The text keeps a readable width; tables use the full width */
/* The legal text itself in black (the ink of the PDFs); headings, numbers and links stay blue */
.document__body { overflow-wrap: break-word; color: #16162e; }
.document__body h2, .document__body h3, .document__body h4, .document__body a, .document__table th { color: var(--color-primary); }
.document__body > :not(.document__table) { max-width: 46rem; }
.document__body a { overflow-wrap: anywhere; }
.document__body h3 { margin: 2.5rem 0 1rem; font-size: 1.5rem; line-height: 120%; scroll-margin-top: 7rem; }
.document__body h3:first-child { margin-top: 0; }
/* Section numbers in their own colour, as in the PDF */
.document__body .section-nr { display: inline-block; min-width: 2.75rem; font-size: 0.75em; color: var(--color-blue); font-variant-numeric: tabular-nums; }
.document__body .section-nr:empty { display: none; }
.document__body h3:has(> .section-nr:not(:empty)) { display: flex; align-items: baseline; } /* a long title wraps beside its number */
.document__body .section-nr { flex: none; }
.document__body h4 { margin: 1.5rem 0 0.5rem; font-size: 1.125rem; }
.document__body p { margin-bottom: 0.875rem; }
.document__body ul, .document__body ol { padding-left: 1.25rem; margin-bottom: 0.875rem; }
.document__body li { margin-bottom: 0.375rem; }
.document__body a, .legal__section p a, .legal__section li a { text-decoration-line: underline; text-underline-offset: 2px; }
.document__contact { margin-bottom: 2rem; }
/* On phones the contact card follows the top card directly, like cards in a row */
@media (max-width: 63.999rem) { .document__card:has(+ .legal__split) { margin-bottom: 1rem; } }
.document__contact .legal__section--card { padding: 1.5rem; margin-bottom: 0; }
.document__contact h2 { font-size: 1.375rem; }
.document__body ol { list-style: decimal; }
.document__body ul { list-style: disc; }
/* "1.1 …" clauses: the number hangs in the margin, a list under a clause counts a, b, c */
.document__body .clause { position: relative; padding-left: 3rem; }
.clause__nr { position: absolute; left: 0; font-variant-numeric: tabular-nums; opacity: 0.7; }
.document__body .clause + ol { padding-left: 4.25rem; list-style: lower-alpha; }
.document__body .clause + ul { padding-left: 4.25rem; }
.document__table { margin: 1rem 0 1.5rem; overflow-x: auto; }
.document__table table { width: 100%; min-width: 26rem; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
/* As in the PDF: a tinted header row with small capitals, hairlines between the rows */
.document__table th { padding: 0.75rem 1rem; background-color: var(--color-blue-light); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; vertical-align: top; }
.document__table th:first-child { border-top-left-radius: var(--radius-xl); border-bottom-left-radius: var(--radius-xl); }
.document__table th:last-child { border-top-right-radius: var(--radius-xl); border-bottom-right-radius: var(--radius-xl); }
.document__table td { padding: 0.875rem 1rem; border-bottom: 1px solid rgb(0 0 148 / 0.12); text-align: left; vertical-align: top; }

/* ---------- Pop-up opvragen persoonsgegevens ---------- */
.privacy-modal { width: min(32rem, calc(100% - 2rem)); margin: auto; padding: 0; border: 0; border-radius: var(--radius-3xl); background-color: var(--color-white); color: var(--color-primary); box-shadow: 0 30px 80px -30px rgb(0 0 60 / 0.5); }
.privacy-modal::backdrop { background-color: rgb(0 0 60 / 0.55); }
.privacy-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.75rem 0; }
.privacy-modal__title { margin: 0; font-size: 1.5rem; }
.privacy-modal__close { display: flex; flex: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: var(--radius-xl); background-color: var(--color-accent); color: var(--color-primary); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.privacy-modal__body { padding: 1rem 1.75rem 0.5rem; }
.privacy-modal__note { margin-bottom: 1.5rem; font-size: 0.875rem; line-height: 1.5; opacity: 0.8; }
.privacy-modal__input { height: 3rem; padding-inline: 1rem; border: 1.5px solid rgb(0 0 148 / 0.25); border-radius: var(--radius-lg); background-color: var(--color-white); font-size: 1rem; }
.privacy-modal__input:focus { border-color: var(--color-primary); outline: none; }
.privacy-modal__input:user-invalid { border-color: #c2185b; }
.privacy-modal__foot { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1.25rem 1.75rem 1.75rem; }

/* status van het verzoek: form, loader, done, error */
.privacy-modal__status { display: none; margin: 1.25rem 0 0; padding: 0.75rem 1rem; border-radius: var(--radius-lg); background-color: var(--color-blue-light); font-weight: 500; }
.privacy-modal__status--done { background-color: var(--color-green-light); color: var(--color-green); }
.privacy-modal__status--error { background-color: var(--color-pink); }
.privacy-modal__form[data-state="loader"] .privacy-modal__status--loader,
.privacy-modal__form[data-state="done"] .privacy-modal__status--done,
.privacy-modal__form[data-state="error"] .privacy-modal__status--error { display: block; }
.privacy-modal__form[data-state="loader"] .privacy-modal__submit { opacity: 0.5; pointer-events: none; }

/* AI Connector (components/ai-connector.njk): tabs Algemeen | Privacy and a language switch above
   the text. Both languages are in the page; data-lang (set by the script) shows one of them. */
.aic__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.25rem; margin-bottom: 2rem; border-bottom: 1px solid rgb(0 0 148 / 0.15); }
.aic__tabs, .aic__lang { display: flex; gap: 0.375rem; padding: 0.25rem; border-radius: var(--radius-xl); background-color: var(--color-blue-light); }
.aic__tab, .aic__lang-btn { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.375rem 1rem; border: 0; border-radius: calc(var(--radius-xl) - 0.25rem); background: none; color: var(--color-primary); font: inherit; text-decoration: none; cursor: pointer; }
.aic__lang-btn { font-size: 0.9375rem; }
.aic__tab[aria-current="page"], .aic__lang-btn[aria-pressed="true"] { background-color: var(--color-primary); color: var(--color-white); }
@media (hover: hover) { .aic__tab:not([aria-current]):hover, .aic__lang-btn[aria-pressed="false"]:hover { background-color: rgb(0 0 148 / 0.08); } }
.aic__intro { max-width: 46rem; margin-bottom: 2rem; font-size: 1.125rem; }
.aic:not([data-lang]) .aic__version + .aic__version { margin-top: 4rem; } /* without JavaScript, both languages */
.aic:not([data-lang="en"]) .aic__tab [data-v="en"], .aic[data-lang="en"] .aic__tab [data-v="nl"] { display: none; }
.aic[data-lang="nl"] .aic__version[data-v="en"], .aic[data-lang="en"] .aic__version[data-v="nl"] { display: none; }
