/* ==========================================================================
   formbuilder.css – het contactformulier in de stijl van de website
   Wordt geladen door /site/templates/form-builder.php (het formulier staat in een iframe).
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    size-adjust: 107.64%;
    ascent-override: 90.49%;
    descent-override: 22.56%;
    line-gap-override: 0%;
}

:root {
    color-scheme: light;
    --ink: #0a0a0a;
    --muted: #55555a;
    --pop: #FFED01;
    --accent: #0000fe;
    --error: #d4001a;
    --radius: 5px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, html body.hugo-form {
    background: transparent !important;
    margin: 0;
    padding: 0;
}

html body.hugo-form {
    font-family: 'Inter', 'Inter Fallback', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

/* Ruimte rondom, zodat de focus-gloed niet wordt afgeknipt */
html body.hugo-form #content { padding: 6px !important; }

/* ---------- Velden ---------- */
body.hugo-form .Inputfields { list-style: none; margin: 0; padding: 0; }
body.hugo-form .Inputfield { margin: 0 0 24px; }

/* Labels */
body.hugo-form .InputfieldHeader,
body.hugo-form label.InputfieldHeader {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink);
}

/* Required marker: asterisk in blue instead of red */
body.hugo-form .FormBuilder .InputfieldStateRequired > .InputfieldHeader:first-child:after {
    content: "*";
    margin-left: 0.25em;
    color: var(--accent);
    font-weight: 800;
}

/* Tekstvelden */
body.hugo-form input[type=text],
body.hugo-form input[type=email],
body.hugo-form input[type=tel],
body.hugo-form input[type=url],
body.hugo-form input[type=number],
body.hugo-form input[type=password],
body.hugo-form input[type=search],
body.hugo-form input[type=date],
body.hugo-form input[type=time],
body.hugo-form input[type=datetime-local],
body.hugo-form textarea,
body.hugo-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 14px 16px;
    font: inherit;
    font-size: 16px;               /* 16px voorkomt in-zoomen op iPhone bij focus */
    color: var(--ink);
    background: transparent;          /* zelfde kleur als de pagina-achtergrond */
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: box-shadow 0.2s ease;
}

body.hugo-form textarea {
    min-height: 180px;
    resize: vertical;
}

body.hugo-form select {
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none' stroke='%230a0a0a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

body.hugo-form ::placeholder { color: #8b8b92; opacity: 1; }

/* Focus: zachte gele ring */
body.hugo-form input:focus,
body.hugo-form textarea:focus,
body.hugo-form select:focus {
    background: transparent;
    box-shadow: 0 0 0 3px var(--pop);
}

/* Checkbox & radio */
body.hugo-form input[type=checkbox],
body.hugo-form input[type=radio] {
    width: 20px;
    height: 20px;
    margin: 0 10px 0 0;
    accent-color: var(--ink);
    vertical-align: -4px;
    transform: none;
    top: 0;
}

body.hugo-form .InputfieldCheckbox label,
body.hugo-form .InputfieldRadios label,
body.hugo-form .InputfieldCheckboxes label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}

/* Beschrijving & notities */
body.hugo-form .description,
body.hugo-form .notes {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--muted);
}

body.hugo-form .notes { margin: 8px 0 0; }

/* ---------- Verstuurknop ---------- */
body.hugo-form button[type=submit],
body.hugo-form input[type=submit],
body.hugo-form .InputfieldSubmit button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0;
    padding: 12px 22px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    background: transparent !important;       /* kleur uit de module-instelling overschrijven */
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

body.hugo-form button[type=submit]::after {
    content: "\2197";
    font-size: 16px;
    line-height: 1;
}

/* Hover: tekst en pijl worden vetter */
body.hugo-form button[type=submit]:hover {
    -webkit-text-stroke: 0.6px currentColor;
}

body.hugo-form button[type=submit]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------- Meldingen ---------- */
body.hugo-form .alert,
body.hugo-form p.alert {
    margin: 0 0 24px;
    padding: 16px 20px;
    font-weight: 600;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
}

body.hugo-form .alert-success,
body.hugo-form .success {
    background: var(--pop);
    color: var(--ink);
}

body.hugo-form .alert-error,
body.hugo-form p.error {
    background: #fff;
    color: var(--error);
    border-color: var(--error);
}

body.hugo-form .input-error,
body.hugo-form .InputfieldError {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--error);
}

body.hugo-form .InputfieldStateError input,
body.hugo-form .InputfieldStateError textarea,
body.hugo-form .InputfieldStateError select {
    border-color: var(--error);
}

/* Kolombreedtes (indien ingesteld in FormBuilder): nette tussenruimte */
body.hugo-form .InputfieldFormWidths .InputfieldColumnWidth > .InputfieldHeader,
body.hugo-form .InputfieldFormWidths .InputfieldColumnWidth > .InputfieldContent { padding-left: 12px; }
body.hugo-form .InputfieldFormWidths .InputfieldColumnWidthFirst > .InputfieldHeader,
body.hugo-form .InputfieldFormWidths .InputfieldColumnWidthFirst > .InputfieldContent { padding-left: 0; }

@media (max-width: 479px) {
    body.hugo-form button[type=submit] { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
