/* ------------------------------------------------------------------
   Huisstijl Maten ICT (afgeleid van matenict.nl)
   ------------------------------------------------------------------ */

/* Lettertypes lokaal gehost in de map fonts/ (past binnen font-src 'self') */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/roboto-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/roboto-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/roboto-latin-700-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/poppins-latin-600-normal.woff2") format("woff2");
}

:root {
    --rood: #b5363a;
    --rood-donker: #a2393f;
    --font: "Roboto", "Helvetica Neue", Arial, sans-serif;
    --font-ui: "Poppins", Helvetica, Arial, Verdana, sans-serif;
    --breedte: 72rem;

    --bg: #ffffff;
    --vlak: #f7f7f8;
    --text: #333843;
    --muted: #69727d;
    --line: #e3e4e7;
    --accent: var(--rood);
    --voet-bg: #333843;
    --voet-text: #9da3b5;
    color-scheme: light;
}

/* Donker: handmatig gekozen, of 'Systeem' met een donkere systeeminstelling */
:root[data-theme="dark"] {
    --bg: #23262d;
    --vlak: #2b2f37;
    --text: #e8e9ec;
    --muted: #9da3b5;
    --line: #3a3f49;
    --accent: #e0686c;
    --voet-bg: #1b1d22;
    --voet-text: #85868c;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        --bg: #23262d;
        --vlak: #2b2f37;
        --text: #e8e9ec;
        --muted: #9da3b5;
        --line: #3a3f49;
        --accent: #e0686c;
        --voet-bg: #1b1d22;
        --voet-text: #85868c;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
}

/* ---------- Kop ---------- */
.kop {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.kop-inhoud {
    max-width: var(--breedte);
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 2.5rem;
}

.logo-link {
    display: block;
    text-decoration: none;
}


.logo {
    display: block;
    height: 2.4rem;
    width: auto;
}

.woordmerk {
    font-size: 1.75rem;
    font-weight: 700;
    font-style: italic;
    color: var(--accent);
}

/* Weergaveschakelaar in de stijl van de knop "Hulp op afstand" */
.thema {
    margin-left: auto;
    display: flex;
    border: 2px solid var(--rood);
}

.thema button {
    font-family: var(--font-ui);
    font-size: .8125rem;
    font-weight: 600;
    padding: .4rem .9rem;
    background: transparent;
    color: var(--text);
    border: 0;
    cursor: pointer;
}

.thema button + button { border-left: 2px solid var(--rood); }

.thema button:hover { color: var(--accent); }

.thema button[aria-pressed="true"],
.thema button[aria-pressed="true"]:hover {
    background: var(--rood);
    color: #ffffff;
}

/* ---------- Rode band ---------- */
.band {
    position: relative;
    background: var(--rood);
    color: #ffffff;
}

.band::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% - 1px);          /* 1px overlap, zodat er nooit een naadje ontstaat */
    width: 2.8rem;
    height: calc(1.2rem + 1px);
    background: var(--rood);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform: translateX(-50%);
}

.band-inhoud {
    max-width: var(--breedte);
    margin: 0 auto;
    padding: 1.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .25rem 2rem;
}

.band h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.band p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

/* ---------- Inhoud ---------- */
main {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--breedte);
    margin: 0 auto;
    padding: 3.5rem 2rem 4rem;
}

.zoek { margin-bottom: 1.25rem; }

.zoek label {
    display: block;
    font-weight: 500;
    margin-bottom: .35rem;
}

.zoek input {
    width: 100%;
    max-width: 24rem;
    padding: .65rem .8rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 0;
}

.zoek input:focus {
    outline: none;
    border-color: var(--rood);
    box-shadow: inset 0 0 0 1px var(--rood);
}

.tabel-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: .8rem 1.1rem;
    text-align: left;
    white-space: nowrap;
}

thead th {
    background: var(--vlak);
    font-family: var(--font-ui);
    font-size: .875rem;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
}

th a {
    color: var(--text);
    text-decoration: none;
    padding-bottom: .2rem;
    border-bottom: 2px solid transparent;
}

th a:hover { color: var(--accent); }

th[aria-sort="ascending"] a,
th[aria-sort="descending"] a { border-bottom-color: var(--rood); }

tbody tr + tr td { border-top: 1px solid var(--line); }

tbody tr:hover { background: var(--vlak); }

td.naam {
    width: 100%;
    white-space: normal;
    word-break: break-word;
}

td.naam a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

td.naam a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.ext {
    display: inline-block;
    min-width: 3.4rem;
    margin-right: .8rem;
    padding: .05rem .4rem;
    font-family: var(--font-ui);
    font-size: .6875rem;
    font-weight: 600;
    text-align: center;
    color: var(--accent);
    border: 1px solid currentColor;
}

td.grootte, td.datum {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

td.grootte, thead th:nth-child(2) { text-align: right; }

.leeg {
    margin: 0;
    padding: 1.5rem 1.1rem;
    color: var(--muted);
}

/* ---------- Secties (toolspagina) ---------- */
.sectie + .sectie { margin-top: 3.5rem; }

.sectie h2 {
    margin: 0 0 1.25rem;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
}

/* Knoppen in de stijl van "Hulp op afstand" */
.knoppen {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.knop {
    display: inline-block;
    font-family: var(--font-ui);
    font-weight: 600;
    padding: .7rem 1.4rem;
    color: var(--text);
    text-decoration: none;
    border: 2px solid var(--rood);
}

.knop:hover {
    background: var(--rood);
    color: #ffffff;
}

/* Genummerde opschoontools met instructie */
.stappenlijst {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
}

.stappenlijst li {
    display: flex;
    gap: 1.25rem;
    padding: 1.1rem 1.25rem;
}

.stappenlijst li + li { border-top: 1px solid var(--line); }

.nr {
    flex: 0 0 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    background: var(--rood);
}

.tool-naam {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.tool-naam:hover {
    color: var(--accent);
    text-decoration: underline;
}

.instructie {
    margin: .2rem 0 0;
    color: var(--muted);
}

.pijl {
    color: var(--accent);
    margin: 0 .2rem;
}

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

code {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .875em;
    padding: .05rem .35rem;
    color: var(--text);
    background: var(--vlak);
    border: 1px solid var(--line);
}

/* Tegels voor extra tools */
.tegels {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.tegels li {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.tegels a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: .85rem 1.1rem;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.tegels a:hover {
    background: var(--vlak);
    color: var(--accent);
}

.ext-extern {
    color: var(--muted);
}

/* ---------- Generatoren (pop-up) ---------- */
body.gen { min-height: 100%; }

.gen-kop {
    background: var(--rood);
    color: #ffffff;
    padding: .7rem 1.25rem;
}

.gen-kop h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.gen-inhoud {
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
    padding: 1rem 1.25rem 1.25rem;
}

.codes {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid var(--line);
}

.codes li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .5rem .5rem .8rem;
}

.codes li + li { border-top: 1px solid var(--line); }

.code-label {
    flex: 0 0 2.4rem;
    font-family: var(--font-ui);
    font-size: .6875rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
}

.code {
    flex: 1 1 auto;
    min-width: 0;
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .9rem;
    word-break: break-all;
    user-select: all;
}

.kopieer {
    flex: 0 0 auto;
    font-family: var(--font-ui);
    font-size: .75rem;
    font-weight: 600;
    padding: .3rem .65rem;
    color: var(--text);
    background: transparent;
    border: 2px solid var(--rood);
    cursor: pointer;
}

.kopieer:hover,
.kopieer.gekopieerd {
    background: var(--rood);
    color: #ffffff;
}

.knop-klein {
    font-size: .875rem;
    padding: .45rem 1rem;
}

/* ---------- Voet ---------- */
.voet {
    background: var(--voet-bg);
    color: var(--voet-text);
    font-size: .9rem;
}

.voet-inhoud {
    max-width: var(--breedte);
    margin: 0 auto;
    padding: 1.4rem 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 2rem;
}

.voet p { margin: 0; }

.voet a {
    color: #ffffff;
    text-decoration: none;
}

.voet a:hover { text-decoration: underline; }

/* ---------- Toegankelijkheid & mobiel ---------- */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 40rem) {
    .kop-inhoud, .band-inhoud, main, .voet-inhoud { padding-left: 1.25rem; padding-right: 1.25rem; }
    .logo { height: 2rem; }
    .kop-inhoud { padding-top: .75rem; padding-bottom: .75rem; gap: .75rem 1rem; }
    .woordmerk { font-size: 1.4rem; }
    .sectie h2 { font-size: 1.5rem; }
    .stappenlijst li { gap: .9rem; padding: 1rem; }
    .thema button { padding: .35rem .55rem; font-size: .75rem; }
    .band h1 { font-size: 1.75rem; }
    .band p { font-size: 1rem; }
    main { padding-top: 2.75rem; }
    th:nth-child(3), td.datum { display: none; }
}
