/**
 * Puzzle Registrations - het inschrijfformulier.
 *
 * Alles hangt aan CSS-variabelen op .pzl-registration. De instellingen
 * schrijven er een handvol van over (kleuren, afronding, breedte); de rest
 * stel je per site in je thema bij, met één regel:
 *
 *     .pzl-registration { --pzl-accent: #c0392b; --pzl-radius: 0; }
 *
 * Lettertype en tekstgrootte komen bewust NIET uit dit bestand: die horen bij
 * het thema, en een formulier in een ander lettertype dan de pagina eromheen
 * valt altijd op - in de verkeerde zin.
 */

.pzl-registration {
    /* Kleuren */
    --pzl-accent: #1d4ed8;
    --pzl-accent-hover: #1943ba;
    --pzl-accent-text: #ffffff;
    --pzl-text: inherit;
    --pzl-muted: #6b7280;
    --pzl-border: #d6d9de;
    --pzl-surface: #ffffff;
    --pzl-field-bg: #ffffff;
    --pzl-error: #b32d2e;
    --pzl-success: #1a7f37;

    /* Vorm */
    --pzl-radius: 6px;
    --pzl-gap: 16px;
    --pzl-pad: 14px;
    --pzl-width: 100%;

    max-width: var(--pzl-width);
    color: var(--pzl-text);
}

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

/* ----------------------------------------------------------- meldingen */

.pzl-registration__message {
    padding: var(--pzl-pad) 16px;
    margin: 0 0 var(--pzl-gap);
    background: var(--pzl-surface);
    border: 1px solid currentColor;
    border-left-width: 4px;
    border-radius: var(--pzl-radius);
}

.pzl-registration__message--error {
    color: var(--pzl-error);
}

.pzl-registration__message--success {
    color: var(--pzl-success);
}

/* De melding krijgt focus zodat een schermlezer ze voorleest; een rand
   eromheen is dan dubbelop. */
.pzl-registration__message:focus {
    outline: 0;
}

.pzl-registration__errors {
    padding-left: 1.2em;
    margin: 0;
}

.pzl-registration__errors li + li {
    margin-top: 4px;
}

.pzl-registration__closed,
.pzl-registration__notice {
    padding: var(--pzl-pad) 16px;
    margin: 0;
    color: var(--pzl-muted);
    background: var(--pzl-surface);
    border: 1px solid var(--pzl-border);
    border-radius: var(--pzl-radius);
}

/* --------------------------------------------------------- samenvatting */

.pzl-registration__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 12px 16px;
    margin: 0 0 var(--pzl-gap);
    background: var(--pzl-surface);
    border: 1px solid var(--pzl-border);
    border-radius: var(--pzl-radius);
}

.pzl-registration__summary-item {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.pzl-registration__summary-item--price {
    font-weight: 700;
    color: var(--pzl-accent);
}

.pzl-registration__summary-item--seats {
    color: var(--pzl-muted);
}

/* ------------------------------------------------------------ datumkeuze */

.pzl-registration__editions {
    padding: 0;
    margin: 0 0 var(--pzl-gap);
    border: 0;
}

.pzl-registration__legend {
    padding: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.pzl-registration__edition {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: var(--pzl-pad);
    margin-bottom: 8px;
    cursor: pointer;
    background: var(--pzl-surface);
    border: 1px solid var(--pzl-border);
    border-radius: var(--pzl-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pzl-registration__edition:hover {
    border-color: var(--pzl-accent);
}

/* De gekozen datum licht op in plaats van dikker te worden: een randbreedte
   die verspringt, laat de hele lijst meeschuiven. */
.pzl-registration__edition:has(input:checked) {
    border-color: var(--pzl-accent);
    box-shadow: inset 0 0 0 1px var(--pzl-accent);
}

.pzl-registration__edition:focus-within {
    outline: 2px solid var(--pzl-accent);
    outline-offset: 2px;
}

.pzl-registration__edition.is-full {
    cursor: not-allowed;
    opacity: 0.55;
}

.pzl-registration__edition.is-full:hover {
    border-color: var(--pzl-border);
}

.pzl-registration__edition input[type="radio"] {
    flex-shrink: 0;
    margin: 2px 0 0;
    accent-color: var(--pzl-accent);
}

.pzl-registration__edition-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pzl-registration__edition-date {
    font-weight: 600;
}

.pzl-registration__edition-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 0.9em;
    color: var(--pzl-muted);
}

/* ---------------------------------------------------------------- velden */

.pzl-registration__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px var(--pzl-gap);
}

.pzl-registration__field {
    margin-bottom: 12px;
}

.pzl-registration__field--narrow {
    max-width: 180px;
}

.pzl-registration__field label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95em;
    font-weight: 600;
}

.pzl-registration__field input[type="text"],
.pzl-registration__field input[type="email"],
.pzl-registration__field input[type="tel"],
.pzl-registration__field textarea {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: inherit;
    background: var(--pzl-field-bg);
    border: 1px solid var(--pzl-border);
    border-radius: var(--pzl-radius);
}

.pzl-registration__field input:focus,
.pzl-registration__field textarea:focus {
    border-color: var(--pzl-accent);
    outline: 2px solid var(--pzl-accent);
    outline-offset: 1px;
}

.pzl-registration__field textarea {
    min-height: 110px;
    resize: vertical;
}

.pzl-registration__required {
    color: var(--pzl-error);
}

.pzl-registration__field--checkbox {
    margin: 4px 0 var(--pzl-gap);
}

.pzl-registration__field--checkbox label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400;
}

.pzl-registration__field--checkbox input[type="checkbox"] {
    flex-shrink: 0;
    margin: 2px 0 0;
    accent-color: var(--pzl-accent);
}

/* Lokaas voor bots: nooit zichtbaar, maar wel in de HTML. */
.pzl-registration__field--honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ------------------------------------------------------------------ knop */

.pzl-registration__actions {
    margin-top: 4px;
}

.pzl-registration .pzl-registration__submit {
    padding: 12px 24px;
    font: inherit;
    font-weight: 600;
    color: var(--pzl-accent-text);
    cursor: pointer;
    background: var(--pzl-accent);
    border: 0;
    border-radius: var(--pzl-radius);
    transition: filter 0.15s ease;
}

.pzl-registration .pzl-registration__submit:hover,
.pzl-registration .pzl-registration__submit:focus {
    color: var(--pzl-accent-text);
    background: var(--pzl-accent-hover);
}

.pzl-registration .pzl-registration__submit:focus-visible {
    outline: 2px solid var(--pzl-accent);
    outline-offset: 2px;
}

.pzl-registration .pzl-registration__submit[disabled] {
    cursor: wait;
    opacity: 0.6;
}

.pzl-registration__payment-note {
    margin: 10px 0 0;
    font-size: 0.9em;
    color: var(--pzl-muted);
}

/* ------------------------------------------------- lijst met data (los) */

.pzl-registration__dates {
    padding: 0;
    margin: 0 0 var(--pzl-gap);
    list-style: none;
}

.pzl-registration__date {
    padding: 8px 0;
    border-bottom: 1px solid var(--pzl-border);
}

.pzl-registration__date:last-child {
    border-bottom: 0;
}

.pzl-registration__date a {
    color: inherit;
}

.pzl-registration__dates .is-full {
    color: var(--pzl-muted);
}

.pzl-registration__dates .is-selected {
    font-weight: 700;
    color: var(--pzl-accent);
}

.pzl-registration__chosen {
    font-weight: 600;
}

.pzl-registration__chosen--empty {
    font-weight: 400;
    color: var(--pzl-muted);
}

/* ---------------------------------------------------------------- mobiel */

@media (max-width: 600px) {
    .pzl-registration__row {
        grid-template-columns: 1fr;
    }

    .pzl-registration__field--narrow {
        max-width: none;
    }

    .pzl-registration .pzl-registration__submit {
        width: 100%;
    }
}
