/* KWS Invul-app — huisstijl-replica (bron: goedgekeurde previews / gen_previews.py,
   afgeleid van MDBootstrap-op-Bootstrap 4 in de hoofdapp; ui-inventory §5). */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    background: #fff;
    font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    color: #212529;
    font-size: 16px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p { margin: 0 0 1rem; }
a { color: #007bff; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* navbar — #007bff (bg-kws), MDB-shadow, witte brand */
.navbar {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    background: #007bff;
    padding: .68rem 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12);
    position: relative;
    z-index: 2;
}
.navbar .brand { color: #fff; font-size: 1.15rem; font-weight: 300; }

/* breadcrumb — blue-grey lighten-4 */
.content-pad { padding: 1.1rem 1rem 0; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #cfd8dc;
    border-radius: .25rem;
    padding: .75rem 1rem;
    font-size: .95rem;
    flex-wrap: wrap;
    margin: 0;
}
.breadcrumb a { color: #212529; text-decoration: none; }
.breadcrumb .sep { color: #455a64; }
.breadcrumb .active { color: #455a64; }

/* card-skelet (form-elegant) */
.content { padding: 1rem; flex: 1 0 auto; }
.card {
    background: #fff;
    border: 0;
    border-radius: .25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12);
}
.card-body { padding: 1.25rem; margin: 0 1.5rem; }
h3 { font-size: 1.75rem; font-weight: 300; color: #4f4f4f; text-align: center; margin: .75rem 0 1.25rem; }
h3 strong { font-weight: 700; }
.h5 { font-size: 1.25rem; font-weight: 300; margin: 1rem 0 .75rem; line-height: 1.4; }

/* progress — 4px plat, #0d47a1 */
.progress { height: 4px; background: #eee; border-radius: 0; margin-bottom: 1rem; overflow: hidden; }
.progress-bar { height: 4px; background: #0d47a1; }

/* alerts — stock BS4-kleuren */
.alert {
    position: relative;
    padding: .75rem 2.2rem .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
    font-size: .98rem;
}
.alert p { margin-bottom: .5rem; }
.alert .mb-0, .alert p:last-child { margin-bottom: 0; }
.alert-info { color: #0c5460; background: #d1ecf1; border-color: #bee5eb; }
.alert-warning { color: #856404; background: #fff3cd; border-color: #ffeeba; }
.alert-danger { color: #721c24; background: #f8d7da; border-color: #f5c6cb; }
.close {
    position: absolute; top: .3rem; right: .75rem;
    font-size: 1.4rem; font-weight: 300; color: inherit;
    opacity: .5; background: none; border: 0; cursor: pointer;
    line-height: 1; padding: .2rem;
}

/* geneste (inleiding) card + markdown */
.inner { padding: 1rem 0; }
.inner .card-body { margin: 0; }
.md h5 { font-size: 1.1rem; font-weight: 500; margin: 0 0 .5rem; }
.md p { margin: 0 0 .5rem; }
.md p:last-child { margin-bottom: 0; }
.md ul { margin: .25rem 0 0 1.25rem; padding: 0; }
.md li { margin: .2rem 0; }

/* material radios / checkboxes — CSS-getekend, accent #4285f4 */
.form-check { position: relative; display: block; padding-left: 0; margin-bottom: .45rem; }
.form-check.mb-4 { margin-bottom: 1.15rem; }
.form-check-input { position: absolute; left: -9999px; opacity: 0; }
.form-check-label {
    position: relative;
    display: inline-block;
    padding-left: 2.19rem;
    line-height: 1.57rem;
    font-size: 1rem;
    cursor: pointer;
    min-height: 20px;
}
.form-check-label::before {
    content: "";
    position: absolute; left: 0; top: 2px;
    width: 18px; height: 18px;
    border: 2px solid #5a5a5a;
    background: transparent;
}
input[type=radio] + .form-check-label::before { border-radius: 50%; }
input[type=checkbox] + .form-check-label::before { border-radius: 2px; }
input[type=radio]:checked + .form-check-label::before { border-color: #4285f4; }
input[type=radio]:checked + .form-check-label::after {
    content: "";
    position: absolute; left: 4px; top: 6px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #4285f4;
}
input[type=checkbox]:checked + .form-check-label::before { background: #4285f4; border-color: #4285f4; }
input[type=checkbox]:checked + .form-check-label::after {
    content: "";
    position: absolute; left: 6px; top: 4px;
    width: 6px; height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(40deg);
}
.form-check-input:disabled + .form-check-label { color: rgba(0,0,0,.46); cursor: default; }
.form-check-input:disabled + .form-check-label::before { border-color: rgba(0,0,0,.3); }
.form-check-input:focus-visible + .form-check-label::before { outline: 2px solid #4285f4; outline-offset: 2px; }
.form-check-label.smc { display: inline-flex; align-items: center; min-height: 44px; }
.form-check-label.smc::before { top: calc(50% - 9px); }
input[type=radio]:checked + .form-check-label.smc::after { top: calc(50% - 5px); }
.form-check-label img { vertical-align: middle; }

/* toelichting (canEnterAdditionalText) */
.toelichting { padding-left: 2.19rem; }
.toelichting .lbl-small { font-size: .8rem; color: #9e9e9e; margin: 0 0 .1rem; }
.toelichting .md-form { margin: .3rem 0 1rem; }
.toelichting[hidden] { display: none; }

/* md-form underline-inputs (geen box; focus = #4285f4) */
.md-form { margin: 1.3rem 0; }
.md-form input, .md-form textarea {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #ced4da;
    border-radius: 0;
    background: transparent;
    padding: .5rem 0 .35rem;
    font-family: inherit;
    font-weight: 300;
    font-size: 1rem;
    color: #212529;
    outline: 0;
    resize: none;
}
.md-form input:focus, .md-form textarea:focus {
    border-bottom: 1px solid #4285f4;
    box-shadow: 0 1px 0 0 #4285f4;
}
.md-form input::placeholder, .md-form textarea::placeholder { color: #9e9e9e; font-weight: 300; opacity: 1; }
.md-form input:disabled, .md-form textarea:disabled { color: rgba(0,0,0,.46); border-bottom-style: dashed; }
.grey-hint { color: #9e9e9e; font-weight: 300; font-size: small; }
.form-text { display: block; font-size: 12.8px; margin-top: .25rem; }
.text-danger { color: #dc3545; }

/* buttons — MDB: uppercase, radius .125rem, raised shadow; primary #4285f4, default teal #2bbbad */
.btn {
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    font-family: inherit;
    font-size: .81rem;
    font-weight: 400;
    letter-spacing: .02em;
    padding: .84rem 2.14rem;
    margin: .375rem;
    border: 0;
    border-radius: .125rem;
    box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12);
    color: #fff;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
}
.form-elegant .btn:hover { box-shadow: 0 5px 11px rgba(66,133,244,.35), 0 4px 15px rgba(0,0,0,.15); }
.btn:focus-visible { outline: 2px solid #0d47a1; outline-offset: 2px; }
.btn-primary { background: #4285f4; }
.btn-default { background: #2bbbad; }
.btn-outline-default { background: transparent; color: #2bbbad; border: 2px solid #2bbbad; box-shadow: none; }
.btn-outline-default:hover { box-shadow: none; }
.btn-sm { padding: .42rem 1.1rem; font-size: .72rem; margin: 0; }
.audio-row { margin: .75rem 0 0; }
.row-button { margin-top: 16px; }

/* later-verder-link (nieuw scherm, design U-7) */
.later-link { text-align: center; margin: .75rem 0 0; font-size: .85rem; }
.btn-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: #2bbbad;
    text-decoration: underline;
    cursor: pointer;
}
.unload-hint { font-size: .82rem; color: #9e9e9e; margin: .75rem 0 0; }

/* save-chip (htmx navigatie-save-feedback, aria-live) */
.save-row { text-align: right; margin: .25rem 0 0; min-height: 1.5rem; }
.save-chip {
    display: inline-block;
    font-size: .78rem;
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 1rem;
    padding: .12rem .65rem;
}
.save-chip-err { color: #856404; background: #fff3cd; border-color: #ffeeba; }
.save-chip-err a, .save-chip-err .btn-link { color: #856404; text-decoration: underline; }

/* XoverY/P&A-kolommen (F2b) — hoofdapp-grid: ≤3 kolommen 12-grid, >3 vaste 350px met h-scroll */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.row > [class^="col-"] { padding: 0 8px; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.d-flex { display: flex; }
.d-flex > [data-kolom], .d-flex > div { padding: 0 8px; flex: 0 0 auto; }
.naam-chip { background: #0d47a1; color: #fff; }
/* hoofdapp: alleen de tekst rond de chip vergrijst; de chip zelf blijft navy (parity) */
.grey-text { color: #9e9e9e; }

/* taal-vlaggen (Start-taalkiezer, F2b) */
.vlag { width: 24px; vertical-align: middle; margin-right: .35rem; }

/* vraag-uitleg — cursieve monospace pre (hoofdapp-quirk), met wrap zodat mobiel niet overloopt */
.uitleg-wrap { margin: 1rem 0 0; }
pre.uitleg {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-style: italic;
    font-size: .85rem;
    color: #212529;
    margin: 0;
    white-space: pre-wrap;
}

/* afdrukken-antwoorden-tabel */
.afdruk-tabel { width: 100%; border-collapse: collapse; font-size: .95rem; }
.afdruk-tabel th, .afdruk-tabel td { padding: .4rem .6rem; text-align: left; vertical-align: top; font-weight: 300; }
.afdruk-tabel thead th { background: #d3d3d3; font-weight: 400; }
.afdruk-tabel .c-nr { width: 3%; }
.pre-line { white-space: pre-line; }

/* footer — identiek aan hoofdapp (bewust laag contrast, pariteit; AA-claim geldt niet voor de footer) */
.page-footer { margin-top: 2.25rem; background: rgba(0,0,0,.2); flex-shrink: 0; }
.footer-copy {
    padding: 15px;
    line-height: 25px;
    color: rgba(255,255,255,.6);
    background: rgba(0,0,0,.2);
    text-align: center;
    font-size: .85rem;
}
.footer-copy a { color: rgba(255,255,255,.6); text-decoration: underline; }

/* mobiel (≤768px) — hoofdapp-compaction */
@media (max-width: 768px) {
    body { font-size: 15px; }
    .content-pad { padding: .75rem .5rem 0; }
    .content { padding: .5rem; }
    .card-body { margin: 0 10px; padding: 7px; }
    .breadcrumb { font-size: .85rem; padding: .5rem .6rem; }
    .progress { margin-bottom: 8px; }
    .h5 { margin: .25rem 0 .5rem; }
    .md-form { margin: .5rem 0; }
    .form-check { min-height: 44px; display: flex; align-items: center; margin-bottom: .15rem; }
    .form-check.mb-4 { margin-bottom: .35rem; }
    .row-button { margin-top: 8px; }
    .btn { padding-left: 18px; padding-right: 18px; margin-left: 0; }
    h3 { font-size: 1.4rem; }
    .page-footer { margin-top: 1.25rem; }
}

/* enkele-pagina-modus (F3, design par. 13.B) — replica hoofdapp .domain-header/.singlepageantwoord */
.domain-header {
    background: #007bff;
    color: #fff;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    border-radius: 8px;
    padding: .5rem 1rem;
    margin-top: 2rem;
}
.question { font-weight: bold; margin: 1rem 0 .5rem; }
.sp-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.sp-card {
    flex: 1 1 0;
    min-width: 8.5rem;
    background: #F2F2F2;
    border-radius: .25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 2px 10px rgba(0,0,0,.12);
    text-align: center;
    padding: 1rem .5rem;
    cursor: pointer;
    font-weight: 300;
}
.sp-card.sel { background: #4285f480; }
.sp-card .form-check { display: block; padding: 0; margin: 0 0 .35rem; min-height: 20px; }
.sp-card .form-check-label { display: inline-block; padding-left: 18px; min-height: 18px; }
.sp-textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ced4da;
    border-radius: 0;
    background: transparent;
    font: inherit;
    font-weight: 300;
    padding: .3rem 0;
    resize: none;
    overflow: hidden;
    outline: none;
}
.sp-textarea:focus { border-bottom: 1px solid #4285f4; box-shadow: 0 1px 0 0 #4285f4; }
.sp-textarea::placeholder { color: #9e9e9e; font-weight: 300; }
