/*
 * Keuzehulp: de knop en de modal. Kleuren en maten uit docs/ONTWERPSYSTEEM.md;
 * de terugvalwaarden gelden alleen waar de Oxygen-variabelen ontbreken. De
 * modal staat in de footer, buiten Oxygen, dus elke knop zet zijn eigen
 * lettertype en regelhoogte.
 */

.er-keuzehulp-knop,
.er-kh {
    --er-kh-kop: "montserrat-custom", Montserrat, sans-serif;
    --er-kh-tekst: "open-sans-custom", "Open Sans", sans-serif;
    --er-kh-oranje-zacht: #fff6e3;
}

.er-keuzehulp-knop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 15px 26px;
    border: 0;
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-primary, #f5a912);
    color: var(--er-ink, #151912);
    font: 600 17px/1.3 var(--er-kh-tekst, "Open Sans", sans-serif);
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.er-keuzehulp-knop:hover {
    background: var(--er-primary-dark, #c48507);
    box-shadow: 0 8px 24px -12px rgba(21, 25, 18, 0.35);
}

.er-keuzehulp-knop:focus-visible,
.er-kh button:focus-visible,
.er-kh a:focus-visible,
.er-kh input:focus-visible {
    outline: 3px solid var(--er-ink, #151912);
    outline-offset: 2px;
}

html.er-kh-open {
    overflow: hidden;
}

.er-kh[hidden] {
    display: none !important;
}

.er-kh {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 32px;
    color: var(--er-ink, #151912);
    font: 400 16px/1.6 var(--er-kh-tekst, "Open Sans", sans-serif);
    text-align: left;
}

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

.er-kh__dim {
    position: absolute;
    inset: 0;
    background: rgba(21, 25, 18, 0.55);
}

.er-kh__modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 640px;
    max-width: 100%;
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    background: var(--er-surface, #fff);
    border-radius: var(--er-radius-md, 10px);
}

.er-kh__scherm {
    overflow-y: auto;
    padding: 28px 32px 0;
}

.er-kh__sluit {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--er-radius-pill, 999px);
    background: transparent;
    color: var(--er-ink-soft, #424b54);
    font: 400 22px/1 var(--er-kh-tekst, "Open Sans", sans-serif);
    cursor: pointer;
}

.er-kh__sluit:hover {
    background: var(--er-track, #eceeef);
    color: var(--er-ink, #151912);
}

.er-kh__stap,
.er-kh__uitleg {
    margin: 0;
    font-size: 13px;
    color: var(--er-ink-soft, #424b54);
}

.er-kh__balk {
    height: 6px;
    margin: 12px 48px 22px 0;
    background: var(--er-track, #eceeef);
    border-radius: var(--er-radius-pill, 999px);
}

.er-kh__vulling {
    height: 6px;
    background: var(--er-primary, #f5a912);
    border-radius: var(--er-radius-pill, 999px);
    transition: width 200ms ease;
}

.er-kh__titel {
    margin: 0 0 4px;
    padding: 0;
    color: var(--er-ink, #151912);
    font: 700 24px/1.15 var(--er-kh-kop, Montserrat, sans-serif);
    letter-spacing: normal;
    text-transform: none;
}

.er-kh__titel:focus {
    outline: none;
}

.er-kh__keuzes {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.er-kh__keuzes--3 {
    grid-template-columns: repeat(3, 1fr);
}

.er-kh__keuzes--4 {
    grid-template-columns: repeat(4, 1fr);
}

.er-kh__keuzes--5 {
    grid-template-columns: repeat(5, 1fr);
}

.er-kh__keuze {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    margin: 0;
    padding: 14px 8px;
    border: 1px solid var(--er-border, #cfd3d7);
    border-radius: var(--er-radius-md, 10px);
    background: var(--er-surface, #fff);
    color: var(--er-ink, #151912);
    font: 700 16px/1.25 var(--er-kh-tekst, "Open Sans", sans-serif);
    letter-spacing: normal;
    text-align: center;
    text-transform: none;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.er-kh[data-stap="spelers"] .er-kh__keuze {
    font-size: 18px;
}

.er-kh__keuze small {
    display: block;
    margin-top: 2px;
    color: var(--er-ink-soft, #424b54);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

.er-kh__keuze:hover {
    border-color: var(--er-border-strong, #aaa);
    box-shadow: 0 8px 24px -12px rgba(21, 25, 18, 0.35);
}

.er-kh__keuze[aria-pressed="true"] {
    border-color: var(--er-primary, #f5a912);
    background: var(--er-kh-oranje-zacht, #fff6e3);
    box-shadow: inset 0 0 0 1px var(--er-primary, #f5a912);
}

.er-kh__plekrij {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.er-kh__of {
    color: var(--er-ink-soft, #424b54);
    font-size: 14px;
}

.er-kh__postcode {
    display: flex;
    flex: 1 1 220px;
    gap: 8px;
    margin: 0;
}

.er-kh__veld {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--er-border, #cfd3d7);
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-surface, #fff);
    color: var(--er-ink, #151912);
    font: 400 16px/1.2 var(--er-kh-tekst, "Open Sans", sans-serif);
    text-transform: uppercase;
}

.er-kh__veld::placeholder {
    color: var(--er-ink-soft, #424b54);
    text-transform: none;
}

.er-kh__vanaf {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 0;
    font-weight: 600;
    font-size: 15px;
}

.er-kh__vanaf + .er-kh__keuzes {
    margin-top: 12px;
}

.er-kh__waar .er-kh__keuze {
    min-height: 52px;
    font-size: 15px;
}

.er-kh__melding {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-left: 4px solid var(--er-danger, #c62828);
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-surface-alt, #f9f9f9);
    font-size: 14px;
}

.er-kh__melding[hidden],
.er-kh__gespeeld[hidden] {
    display: none;
}

.er-kh__gespeeld {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--er-ink-soft, #424b54);
}

.er-kh__gespeeld .er-kh__inlog {
    color: var(--er-ink, #151912);
    font-weight: 600;
    text-decoration: underline;
}

.er-kh__vink {
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--er-cta, #427a54);
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.er-kh__onder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 24px 32px 0;
    padding: 18px 0 24px;
    border-top: 1px solid var(--er-track, #eceeef);
}

.er-kh__rechts {
    display: flex;
    align-items: center;
    gap: 16px;
}

.er-kh__link {
    margin: 0;
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--er-ink-soft, #424b54);
    font: 400 14px/1.3 var(--er-kh-tekst, "Open Sans", sans-serif);
    text-decoration: underline;
    text-transform: none;
    cursor: pointer;
}

.er-kh__link:hover {
    color: var(--er-ink, #151912);
}

.er-kh__knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-primary, #f5a912);
    color: var(--er-ink, #151912);
    font: 600 15px/1.3 var(--er-kh-tekst, "Open Sans", sans-serif);
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.er-kh__knop:hover {
    background: var(--er-primary-dark, #c48507);
    box-shadow: 0 8px 24px -12px rgba(21, 25, 18, 0.35);
}

.er-kh__knop--rand {
    border: 1px solid var(--er-border, #cfd3d7);
    background: var(--er-surface, #fff);
}

.er-kh__knop--rand:hover {
    border-color: var(--er-border-strong, #aaa);
    background: var(--er-surface, #fff);
}

.er-kh__knop[aria-disabled="true"] {
    cursor: progress;
    opacity: 0.7;
}

/* De uitslag: zelfde modal, zonder stappen en onderbalk, iets breder voor de kaarten. */
.er-kh[data-stap="uitslag"] .er-kh__modal {
    width: 720px;
}

.er-kh[data-stap="uitslag"] .er-kh__scherm {
    padding-bottom: 32px;
}

.er-kh[data-stap="uitslag"] .er-kh__stap,
.er-kh[data-stap="uitslag"] .er-kh__balk,
.er-kh[data-stap="uitslag"] .er-kh__onder {
    display: none;
}

.er-kh[data-stap="uitslag"] .er-kh__titel {
    padding-right: 40px;
}

.er-kh[data-stap="uitslag"] .er-kh__uitleg {
    font-size: 14px;
}

.er-kh__acties {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px;
}

.er-kh__acties svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.er-kh__laden {
    margin: 24px 0 0;
    color: var(--er-ink-soft, #424b54);
    font-size: 14px;
}

.er-kh__terugval {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 4px solid var(--er-primary, #f5a912);
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-kh-oranje-zacht, #fff6e3);
    font-size: 14px;
    font-weight: 600;
}

.er-kh__weer {
    font-weight: 600;
}

.er-kh__kamers {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.er-kh__kamer {
    position: relative;
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    padding: 16px;
    border: 1px solid var(--er-border, #cfd3d7);
    border-radius: var(--er-radius-md, 10px);
    background: var(--er-surface, #fff);
}

.er-kh__kamer--beste {
    margin-top: 14px;
    padding: 15px;
    border: 2px solid var(--er-primary, #f5a912);
}

.er-kh__lint {
    position: absolute;
    top: -13px;
    left: 16px;
    padding: 3px 12px;
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-primary, #f5a912);
    color: var(--er-ink, #151912);
    font: 700 13px/1.4 var(--er-kh-kop, Montserrat, sans-serif);
}

.er-kh__beeld {
    position: relative;
    align-self: start;
    height: 150px;
    overflow: hidden;
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-track, #eceeef);
}

.er-kh__beeld img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* Zonder foto: een donker vlak, anders verdwijnt het witte hartje. */
.er-kh__beeld--leeg {
    background: var(--er-ink-soft, #424b54);
}

/* Het hartje komt uit escaperooms-user-system; hier alleen de plek op het beeld. */
.er-kh .er-kaarthart {
    position: absolute;
    top: 6px;
    right: 6px;
    left: auto;
    margin: 0;
}

.er-kh__ai {
    position: absolute;
    right: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    margin: 0;
    padding: 2px 8px;
    border-radius: var(--er-radius-sm, 5px);
    background: rgba(21, 25, 18, 0.75);
    color: var(--er-surface, #fff);
    font-size: 11px;
    line-height: 1.4;
}

.er-kh__info {
    min-width: 0;
}

.er-kh__naam {
    margin: 0;
    padding: 0;
    color: var(--er-ink, #151912);
    font: 700 19px/1.2 var(--er-kh-kop, Montserrat, sans-serif);
    letter-spacing: normal;
    text-transform: none;
}

.er-kh__plek {
    margin: 2px 0 10px;
    color: var(--er-ink-soft, #424b54);
    font-size: 14px;
}

.er-kh__cijfers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 10px;
}

.er-kh__cijfer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--er-ink-soft, #424b54);
    font-size: 12px;
}

.er-kh__cijfer b {
    padding: 4px 8px;
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-primary, #f5a912);
    color: var(--er-ink, #151912);
    font: 700 15px/1.2 var(--er-kh-kop, Montserrat, sans-serif);
}

.er-kh__cijfer--er b {
    background: var(--er-ink, #151912);
    color: var(--er-surface, #fff);
}

.er-kh__geen {
    color: var(--er-ink-soft, #424b54);
    font-size: 13px;
}

.er-kh__redenen {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.er-kh__reden {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 3px 0;
    padding: 0;
    line-height: 1.45;
}

.er-kh__reden::before {
    content: none;
}

.er-kh__teken {
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--er-cta, #427a54);
    color: #fff;
    font-size: 11px;
    font-style: normal;
    line-height: 1;
}

.er-kh__reden--nee {
    color: #6b737b;
}

.er-kh__reden--nee .er-kh__teken {
    background: var(--er-track, #eceeef);
    color: #6b737b;
}

a.er-kh__knop {
    text-decoration: none;
}

.er-kh__meer {
    margin: 18px 0 0;
    font-size: 14px;
    text-align: center;
}

.er-kh__meer a {
    color: var(--er-ink, #151912);
    font-weight: 600;
    text-decoration: underline;
}

.er-kh__nudge {
    margin-top: 22px;
    padding: 16px;
    border-radius: var(--er-radius-md, 10px);
    background: var(--er-surface-alt, #f9f9f9);
    border: 1px solid var(--er-track, #eceeef);
    font-size: 14px;
}

.er-kh__nudge p {
    margin: 0 0 12px;
}

.er-kh__nudgeknoppen {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Het mailformulier onder de knoppen van de uitslag. */
.er-kh__acties [hidden] {
    display: none;
}

.er-kh__mail {
    margin: -6px 0 22px;
    padding: 16px;
    border: 1px solid var(--er-track, #eceeef);
    border-radius: var(--er-radius-md, 10px);
    background: var(--er-surface-alt, #f9f9f9);
    font-size: 14px;
}

.er-kh__maillabel {
    display: block;
    margin: 0 0 8px;
    font-weight: 600;
}

.er-kh__mailrij {
    display: flex;
    gap: 8px;
}

.er-kh__veld--mail {
    text-transform: none;
}

.er-kh__mailuitleg {
    margin: 8px 0 0;
    color: var(--er-ink-soft, #424b54);
    font-size: 13px;
}

.er-kh__turnstile:not(:empty) {
    margin-top: 12px;
}

.er-kh__mailmelding {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 4px solid var(--er-danger, #c62828);
    border-radius: var(--er-radius-sm, 5px);
    background: var(--er-surface, #fff);
}

.er-kh__mailmelding--klaar {
    margin: 0;
    border-left-color: var(--er-cta, #427a54);
    font-weight: 600;
}

.er-kh__mailmelding[hidden],
.er-kh__mailvorm[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .er-keuzehulp-knop,
    .er-kh__vulling,
    .er-kh__keuze,
    .er-kh__knop {
        transition: none;
    }
}

/* Telefoon: schermvullend, de knoppen onderaan binnen bereik van de duim. */
@media (max-width: 767px) {
    .er-kh {
        padding: 0;
        place-items: stretch;
    }

    .er-kh__modal {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .er-kh__scherm {
        flex: 1 1 auto;
        padding: 20px 16px 16px;
    }

    .er-kh__sluit {
        top: 6px;
        right: 6px;
    }

    .er-kh__titel {
        font-size: 21px;
    }

    .er-kh__keuzes--3,
    .er-kh__keuzes--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .er-kh__keuzes--5 {
        grid-template-columns: repeat(4, 1fr);
    }

    .er-kh__keuzes--5 .er-kh__keuze:last-child {
        grid-column: 1 / -1;
    }

    .er-kh__onder {
        flex-wrap: wrap;
        margin: 0;
        padding: 12px 16px 16px;
        border-top-color: var(--er-border, #cfd3d7);
    }

    .er-kh__rechts {
        display: contents;
    }

    .er-kh__knop[data-er-kh-volgende] {
        order: -1;
        flex: 1 1 100%;
    }

    .er-kh__plekrij > .er-kh__locatie {
        flex: 1 1 100%;
    }

    .er-kh__of {
        display: none;
    }

    .er-kh[data-stap="uitslag"] .er-kh__modal {
        width: 100%;
    }

    .er-kh[data-stap="uitslag"] .er-kh__scherm {
        padding-bottom: 24px;
    }

    .er-kh__acties .er-kh__knop {
        flex: 1 1 auto;
    }

    .er-kh__mailrij {
        flex-direction: column;
    }

    .er-kh__mailrij .er-kh__knop {
        width: 100%;
    }

    .er-kh__kamer {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .er-kh__kamer--beste {
        padding: 11px;
    }

    .er-kh__naam {
        font-size: 18px;
    }
}
