/* ─────────────────────────────
   Algemene opmaak
───────────────────────────── */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #000000;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─────────────────────────────
   Containers
───────────────────────────── */
.container,
.controle-wrapper {
    max-width: 720px;
    margin: 40px auto;
    padding: 30px 40px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ─────────────────────────────
   Titels
───────────────────────────── */
h1, h2 {
    text-align: center;
    color: #000000;
    margin-bottom: 20px;
}

/* ─────────────────────────────
   Formulieren en velden
───────────────────────────── */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 600;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    color: #000000;
}

input[type="text"],
input[type="email"],
input[type="date"],
textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    margin-top: 5px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

/* ─────────────────────────────
   Handtekeningcanvas
───────────────────────────── */
canvas:not(.pdf-page) {
    display: block;
    margin: 10px auto;
    border: 2px solid #000000;
    border-radius: 6px;
    background-color: #fff;
    touch-action: none;
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 2.5 / 1;
}

/* ─────────────────────────────
   PDF.js canvas
───────────────────────────── */
canvas.pdf-page {
    display: block;
    margin: 1em auto;
    max-width: 100%;
    height: auto;
    border: none;
    background: none;
    width: auto;
}

/* ─────────────────────────────
   Knoppen
───────────────────────────── */
button,
input[type="submit"] {
    font-family: inherit;
    background-color: #000000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

button:hover,
input[type="submit"]:hover {
    background-color: #000000;
}

/* ─────────────────────────────
   Button layout
───────────────────────────── */
.button-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;
}

.button-row form {
    flex: 1 1 200px;
    display: flex;
    justify-content: center;
}

.button-row button,
.button-row input[type="submit"] {
    width: 100%;
    max-width: 250px;
}

/* Altijd knoppen onder elkaar, ook op desktop */
.button-row.vertical-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
}

.button-row.vertical-buttons button {
    width: 100%;
    max-width: none;
}

/* ─────────────────────────────
   Checkbox
───────────────────────────── */
input[type="checkbox"] {
    transform: scale(1.2);
    margin-top: 0;
    cursor: pointer;
}

label.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    cursor: pointer;
}

.checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    max-width: 720px;
    margin: 30px auto;
    padding: 0 20px;
    text-align: left;
}

.checkbox-wrapper span {
    font-size: 0.95em;
    line-height: 1.5;
}

.checkbox-wrapper a {
    color: #000;
    text-decoration: underline;
}

.checkbox-wrapper a:hover {
    text-decoration: none;
}

/* ─────────────────────────────
   Foutmeldingen, info, kleine tekst
───────────────────────────── */
.note,
p {
    font-size: 0.95em;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.form-error {
    color: red;
    font-size: 0.95em;
    text-align: center;
    margin: 10px 0 20px 0;
}

/* ─────────────────────────────
   Iframe preview (optioneel)
───────────────────────────── */
.preview-frame {
    width: 100%;
    height: 800px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: block;
}

/* ─────────────────────────────
   Footer
───────────────────────────── */
.footer {
    text-align: center;
    margin: 30px 0;
}

.footer img {
    max-width: 200px;
    height: auto;
}

/* ─────────────────────────────
   Linkjes
───────────────────────────── */
a {
    color: #000000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────
   Responsief (mobiel)
───────────────────────────── */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1, h2 {
        font-size: 1.4em;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    button,
    input[type="submit"] {
        width: 100%;
    }
}