/* ==========================================================================
   Coolworkx klusaanvragen – basisstijl (publiek + gedeeld met beheer)
   Mobile-first, geen externe fonts of frameworks (snel laden).
   ========================================================================== */

:root {
    --navy: #0b2540;
    --navy-2: #12365c;
    --blue: #0a66c2;
    --blue-dark: #084f96;
    --blue-soft: #e8f1fb;
    --spark: #38bdf8;
    --bg: #f3f6fa;
    --surface: #ffffff;
    --text: #1c2b3a;
    --muted: #5b6b7c;
    --border: #d8e0ea;
    --border-strong: #b9c6d6;
    --danger: #c0262d;
    --danger-soft: #fdecec;
    --success: #137a3d;
    --success-soft: #e7f6ec;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(11, 37, 64, .06), 0 4px 16px rgba(11, 37, 64, .06);
    --focus: 0 0 0 3px rgba(10, 102, 194, .35);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }

h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 .6em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

[hidden] { display: none !important; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }

.visually-hidden, .skip-link:not(:focus) {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* ---------- Header / footer ---------- */
.site-header { background: var(--navy); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: .2px; }
.brand:hover { color: #fff; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(56, 189, 248, .16); color: var(--spark); }
.brand-logo { max-height: 40px; width: auto; }
.header-tagline { font-size: .85rem; color: #b8c7d9; display: none; }

.site-main { padding-bottom: 48px; }

.site-footer { border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: .875rem; }
.footer-inner { padding-top: 20px; padding-bottom: 20px; }
.footer-inner p { margin: 0 0 4px; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #e6eef7;
    padding: 28px 0 56px;
    margin-bottom: -32px;
}
.hero h1 { color: #fff; font-size: 1.85rem; margin-bottom: .4em; }
.hero .lead { font-size: 1.08rem; max-width: 640px; color: #d3e0ee; }
.hero-points { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; color: #b8c7d9; }
.hero-points li::before { content: "✓"; color: var(--spark); font-weight: 700; margin-right: 6px; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 16px;
    margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 10px 20px;
    font: inherit; font-weight: 600; line-height: 1.2;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-primary[disabled] { background: #7ea9d6; cursor: wait; }
.btn-secondary { background: var(--blue-soft); color: var(--blue-dark); border-color: #c9ddf3; }
.btn-secondary:hover { background: #d9e9f9; color: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-ghost:hover { background: #eef2f7; color: var(--navy); }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 12px 28px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.hero .btn-primary { background: var(--spark); color: var(--navy); }
.hero .btn-primary:hover { background: #7dd3fc; color: var(--navy); }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; border: 1px solid; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-error { background: var(--danger-soft); border-color: #f3b9bb; color: #7a1519; }
.alert-error a { color: #7a1519; font-weight: 600; }
.alert-success { background: var(--success-soft); border-color: #b5e2c4; color: #0d5129; }

/* ---------- Formulier ---------- */
.request-form { position: relative; }
.form-section h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 1.2rem; }
.step {
    display: inline-grid; place-items: center; flex: 0 0 auto;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--blue-soft); color: var(--blue-dark); font-size: .95rem; font-weight: 700;
}
.section-intro { color: var(--muted); font-size: .95rem; }

.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
fieldset.field { margin-bottom: 20px; }
label, legend { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
legend { padding: 0; }
.req { color: var(--danger); }
.optional { font-weight: 400; color: var(--muted); font-size: .9em; }
.hint { font-size: .875rem; color: var(--muted); margin: 6px 0 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"],
input[type="date"], input[type="datetime-local"], input:not([type]), select, textarea {
    display: block; width: 100%;
    min-height: 50px; padding: 12px 14px;
    font: inherit; font-size: 1.0625rem; color: var(--text);
    background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
select {
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
::placeholder { color: #93a1b1; }

.has-error input, .has-error textarea, .has-error select, input[aria-invalid="true"], textarea[aria-invalid="true"] {
    border-color: var(--danger);
}
.field-error { color: var(--danger); font-size: .9rem; font-weight: 600; margin: 6px 0 0; }
.field-error::before { content: "⚠ "; }

.grid-2, .grid-street, .grid-city { display: grid; gap: 0 14px; grid-template-columns: 1fr; align-items: start; }
.grid-street { grid-template-columns: 1fr 132px; }
.grid-street label, .grid-city label { white-space: nowrap; }
.grid-city { grid-template-columns: 120px 1fr; }

/* Honeypot: onzichtbaar voor mensen, wel aanwezig voor bots */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Keuzekaarten (categorieën) */
.choice-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.choice { position: relative; margin: 0; font-weight: 500; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
    display: flex; align-items: center; gap: 10px;
    min-height: 52px; padding: 10px 14px 10px 44px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: #fff; color: var(--text); line-height: 1.3;
    position: relative; transition: border-color .15s, background-color .15s;
}
.choice span::before {
    content: ""; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; border: 2px solid var(--border-strong); border-radius: 5px; background: #fff;
}
.choice input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--navy); font-weight: 600; }
.choice input:checked + span::before {
    border-color: var(--blue); background: var(--blue)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.choice input:focus-visible + span { box-shadow: var(--focus); }

.other-details { margin-top: -6px; }

/* Pill-radio's (timing / contact) */
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { margin: 0; font-weight: 500; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
    display: inline-flex; align-items: center; min-height: 46px; padding: 8px 16px;
    border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; color: var(--text);
    transition: border-color .15s, background-color .15s;
}
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input:focus-visible + span { box-shadow: var(--focus); }

/* Upload */
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-align: center; padding: 24px 16px; cursor: pointer;
    border: 2px dashed var(--border-strong); border-radius: var(--radius); background: #f8fafd;
    color: var(--blue-dark); font-weight: 600; transition: border-color .15s, background-color .15s;
}
.upload-zone:hover, .upload-zone.is-dragover { border-color: var(--blue); background: var(--blue-soft); }
.file-input:focus-visible + .file-list, .file-input:focus-visible ~ .upload-zone { box-shadow: var(--focus); }
.upload-title { font-size: 1.05rem; }
.upload-sub { font-weight: 400; font-size: .85rem; color: var(--muted); }

.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.file-list li {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
}
.file-list li.is-invalid { border-color: var(--danger); background: var(--danger-soft); }
.file-thumb {
    flex: 0 0 48px; width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: #eef2f7;
    display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted);
}
.file-meta { flex: 1; min-width: 0; }
.file-name { display: block; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: .8rem; color: var(--muted); }
.file-remove {
    flex: 0 0 auto; min-width: 40px; min-height: 40px; border: 0; border-radius: 6px;
    background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer;
}
.file-remove:hover { background: #eef2f7; color: var(--danger); }

.checkbox-line { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.checkbox-line input { flex: 0 0 auto; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--blue); }

.form-submit .btn { margin-top: 4px; }
.upload-progress { text-align: center; color: var(--muted); font-size: .9rem; margin: 10px 0 0; }

/* ---------- Bevestiging ---------- */
.confirmation { text-align: center; padding: 32px 20px; margin-top: 24px; }
.confirm-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.confirmation .lead { font-size: 1.1rem; font-weight: 600; }
.request-number {
    display: inline-flex; flex-direction: column; gap: 4px; margin: 12px 0 20px; padding: 16px 28px;
    background: var(--blue-soft); border-radius: var(--radius); border: 1px solid #c9ddf3;
}
.request-number .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.request-number strong { font-size: 1.4rem; color: var(--navy); letter-spacing: .5px; }

.error-page { margin-top: 32px; }

/* ---------- Breakpoints ---------- */
@media (min-width: 600px) {
    .card { padding: 26px 28px; }
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-street { grid-template-columns: 1fr 150px; }
    .grid-city { grid-template-columns: 160px 1fr; }
    .choice-grid { grid-template-columns: 1fr 1fr; }
    .header-tagline { display: inline; }
    .hero { padding: 44px 0 72px; }
    .hero h1 { font-size: 2.3rem; }
}

@media (min-width: 900px) {
    .choice-grid { grid-template-columns: repeat(3, 1fr); }
    .container.narrow { max-width: 860px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* ---------- Privacyverklaring ---------- */
.prose { margin-top: 24px; line-height: 1.65; }
.prose h2 { margin-top: 1.6em; font-size: 1.15rem; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.plain-table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; }
.plain-table th, .plain-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.plain-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .3px; }
.privacy-hint { margin: 8px 0 14px 36px; }
.site-footer a { color: var(--muted); }

/* ---------- Klantaccounts ---------- */
.header-account { margin-left: auto; }
.header-link { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; white-space: nowrap; }
.header-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.header-tagline + .header-account { margin-left: 16px; }
.account-banner { background: var(--blue-soft); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .95rem; margin: -4px 0 16px; }
.account-banner.muted { background: #f6f8fb; }
.account-cta { margin: 8px auto 20px; max-width: 520px; padding: 18px; border: 1px solid #c9ddf3; border-radius: var(--radius); background: var(--blue-soft); }
.account-cta h2 { font-size: 1.1rem; margin-bottom: .4em; }
.auth-card { margin-top: 24px; }
.auth-links { margin: 12px 0 0; font-size: .95rem; text-align: center; }
.confirm-icon.is-error { background: var(--danger-soft); color: var(--danger); }
.account-page { margin-top: 24px; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.account-head h1 { margin-bottom: .2em; }
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head-row h2 { margin: 0; }
.my-requests { list-style: none; margin: 0; padding: 0; }
.my-requests li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.my-requests li:last-child { border-bottom: 0; }
.my-request-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.status-pill { background: var(--blue-soft); color: var(--blue-dark); border-radius: 999px; padding: 2px 12px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.appointment { color: var(--success); }
.account-page details > summary { cursor: pointer; list-style: none; }
.account-page details > summary::-webkit-details-marker { display: none; }
.account-page details > summary h2 { display: inline; margin: 0; }
.account-page details > summary::after { content: "▾"; float: right; color: var(--muted); }
.account-page details[open] > summary { margin-bottom: 12px; }
.danger-card summary h2 { color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9b1c22; color: #fff; }
