/* PERSAL design system "Helder" — gedeeld tussen stap2.html, stap3.html en
   index.html (LH008), zodat de drie schermen van de medewerker-onboarding
   niet langer hun eigen kopie van dezelfde tokens/basisstijlen dragen. */
:root {
    --primary: #277CF2;
    --primary-dark: #1E6AD9;
    --primary-light: #E8F4FD;
    /* Acties met witte tekst: wit op merkblauw #277CF2 haalt maar 4,0:1.
       Binnen het productpalet: rust #1E6AD9 (5,1:1), hover navy #1D364F. */
    --action: #1E6AD9;
    --action-hover: #1D364F;
    --platform: #277CF2;
    --platform-dark: #277CF2;
    --platform-deep: #1E6AD9;
    --accent: #277CF2;
    --accent-hover: #1E6AD9;
    --success: #18804C;
    --error: #AE2438;
    --warning: #A2660A;
    --text: #1D364F;
    --text-secondary: #587086;
    --border: #E2E8EE;
    --border-focus: #277CF2;
    --bg: #EDF6FF;
    --card-bg: #FFFFFF;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 8px 22px rgba(29, 54, 79, 0.08);
    --shadow-lg: 0 18px 42px rgba(29, 54, 79, 0.12);
    --transition: 0.2s ease;
    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: var(--card-bg); border-bottom: 1px solid var(--border); padding: 20px max(20px, calc((100% - 980px) / 2)); }
.logo { color: var(--text); font-size: 25px; font-weight: 700; }
.logo span { color: var(--primary); }
main { max-width: 980px; margin: 32px auto; padding: 0 20px 48px; }
.intro, fieldset { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 0 0 20px; box-shadow: var(--shadow); }
h1 { font-size: 30px; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 20px; color: var(--primary-dark); }
p { line-height: 1.55; }
.employer { color: var(--text-secondary); margin: 8px 0 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input, select { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; color: var(--text); background: var(--card-bg); transition: border-color var(--transition); }
/* Safari negeert min-height op een standaard <select> (25 px hoog): eigen
   weergave met pijltje, zodat het tikdoel 44 px is (R3-3.4). */
select { -webkit-appearance: none; appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23587086' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
/* Voorbeeldtekst haalt 4,5:1 (R3-3.2). */
input::placeholder { color: var(--text-secondary); opacity: 1; }
/* Duidelijke focusring op alle bedienbare elementen (R3-3.1). */
input:focus, select:focus { border-color: var(--border-focus); outline: 3px solid var(--primary); outline-offset: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
h1[tabindex="-1"]:focus { outline: none; }
/* Veldfouten: zelfde klassen als het LH008-formulier (index.html). */
input.error, select.error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(174, 36, 56, 0.1); }
.error-message { display: none; margin: 6px 0 0; color: var(--error); font-size: 14px; font-weight: 600; }
.error-message.visible { display: block; }
input[type="file"] { padding: 8px; background: var(--primary-light); }
.full { grid-column: 1 / -1; }
.required::after { content: " *"; color: var(--error); }
.hint { color: var(--text-secondary); font-size: 14px; margin: 6px 0 0; }
.birthdate-hint { margin: 0 0 6px; }
.birthdate-outcome { color: var(--text-secondary); font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.birthdate-outcome:empty { display: none; }
button { border: 0; border-radius: var(--radius-sm); background: var(--action); color: #fff; font: inherit; font-weight: 700; padding: 13px 24px; cursor: pointer; transition: background var(--transition); }
button:hover:not([disabled]) { background: var(--action-hover); }
button[disabled] { opacity: .6; cursor: wait; }
#formStatus { min-height: 24px; margin: 16px 0; font-weight: 600; }
/* Controlescherm onboarding stap 1 (ronde 1, M1). */
.review { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.review > h2:focus { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.review-intro { color: var(--text-secondary); margin: 0 0 20px; }
.review-block { border-top: 1px solid var(--border); padding: 18px 0; }
.review-block-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.review-block h3 { font-size: 17px; margin: 0; color: var(--text); }
.review-list { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 20px; margin: 0; }
.review-list dt { color: var(--text-secondary); font-size: 14px; }
.review-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.review-mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.review-actions button, .review-edit { min-height: 44px; }
.button-secondary { background: var(--card-bg); color: var(--primary-dark); border: 1px solid var(--primary); }
.button-secondary:hover:not([disabled]) { background: var(--primary-light); }
.review-edit { padding: 8px 16px; }
@media (max-width: 600px) {
    .review { padding: 18px; }
    .review-list { grid-template-columns: 1fr; gap: 2px; }
    .review-list dd { margin-bottom: 10px; }
    .review-actions { flex-direction: column-reverse; }
    .review-actions button { width: 100%; }
}
#formStatus.error { color: var(--error); }
/* Concept teruggezet na verversen (R2-2). */
.draft-notice { margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--primary); border-radius: var(--radius); background: var(--primary-light); color: var(--text); font-weight: 600; }
.draft-notice[hidden] { display: none; }
.draft-refill-hint { color: var(--warning); font-weight: 600; }
#formStatus.success { color: var(--success); }
@media (max-width: 680px) { .grid { grid-template-columns: 1fr; } .full { grid-column: auto; } }

/* Buitenste "Stap X van 2"-header — bewust eigen klassenamen, niet
   .progress-step/.step-circle/.progress-line (dat is de interne 3-secties-
   voortgangsbalk van het LH008-formulier zelf, blijft daar ongewijzigd). */
.macro-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 980px;
    margin: 24px auto 0;
    padding: 14px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(29, 54, 79, 0.04);
}
/* Los formulier (/ en /form/{token}): geen onboarding-stappenbalk (R2-7). */
.macro-stepper[hidden] { display: none; }
.macro-step { display: flex; align-items: center; gap: 10px; }
.macro-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--border);
    color: var(--text-secondary);
    background: var(--card-bg);
}
.macro-step-text { display: flex; flex-direction: column; line-height: 1.25; }
.macro-step-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.macro-step-sub { font-size: 12px; color: var(--text-secondary); }
.macro-progress-line { flex: 0 0 40px; height: 2px; background: var(--border); }
.macro-step.is-active .macro-step-circle { background: var(--action); border-color: var(--action); color: #fff; }
.macro-step.is-active .macro-step-label { color: var(--primary-dark); }
.macro-step.is-completed .macro-step-circle { background: var(--success); border-color: var(--success); color: #fff; }
.macro-step.is-completed + .macro-progress-line { background: var(--success); }

/* Adresvelden die via PDOK automatisch zijn ingevuld. */
.field-autofilled { background: var(--primary-light); color: var(--text-secondary); }
.field-autofilled-edit { font-size: 14px; min-height: 44px; margin-top: 0; background: none; border: none; color: var(--primary-dark); padding: 0; font-weight: 600; text-decoration: underline; cursor: pointer; }
.field-autofilled-edit:hover:not([disabled]) { background: none; color: var(--text); }

/* Fieldsets die conditioneel verborgen zijn (bijv. Partnergegevens, alleen
   zichtbaar bij een passende burgerlijke staat). */
fieldset[hidden] { display: none; }

/* Label + help-tooltip (bijv. "Schrijfwijze achternaam"). */
.label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; position: relative; }
.label-row label { margin-bottom: 0; }
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: var(--action);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}
.tooltip-icon:hover, .tooltip-icon:focus-visible { background: var(--action-hover); }
/* Tikdoel van 44 px rond het kleine ?-rondje (R3-3.4). */
.tooltip-icon { position: relative; }
.tooltip-icon::before { content: ""; position: absolute; inset: -13px; }
.tooltip-popover {
    display: none;
    position: absolute;
    top: 26px;
    left: 0;
    z-index: 20;
    width: 300px;
    max-width: 80vw;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}
.tooltip-popover strong { display: block; margin-bottom: 6px; font-size: 13px; }
.tooltip-popover p { margin: 0; white-space: pre-line; }
.tooltip-icon:hover + .tooltip-popover,
.tooltip-icon:focus-visible + .tooltip-popover,
.tooltip-popover.is-open { display: block; }
