/* =========================================================================
   Pop-up: Discovery call
   Desktop: twee kolommen (940 x 596) — wit tekstpaneel links, formulier rechts.
   <=1024px: één kolom, opsomming vervalt (zo staat het in het ontwerp).
   ========================================================================= */

.hh-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: var(--primary-font, "Klavika", sans-serif);
    color: var(--primary-color, #1C2945);
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Wint van de display:flex hierboven dankzij de hogere specificiteit. */
.hh-popup[hidden] {
    display: none;
}

.hh-popup.is-open {
    opacity: 1;
}

.hh-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 41, 69, 0.8);
}

.hh-popup__dialog {
    position: relative;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    width: 940px;
    max-width: 100%;
    max-height: calc(100vh - 4rem);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 24px 64px rgba(9, 18, 43, 0.28);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.hh-popup.is-open .hh-popup__dialog {
    transform: translateY(0);
}

/* ------------------------------------------------------------- sluiten -- */
.hh-popup .hh-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #6E7385;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Alleen het icoon verkleurt — nooit een vlak achter de knop. Alle statussen
   staan er expliciet bij, want een kale <button> pakt zijn achtergrond anders
   terug van de browser-default of een globale knopstijl. */
.hh-popup .hh-popup__close,
.hh-popup .hh-popup__close:hover,
.hh-popup .hh-popup__close:focus,
.hh-popup .hh-popup__close:focus-visible,
.hh-popup .hh-popup__close:active {
    border: none;
    background: none;
    box-shadow: none;
}

.hh-popup .hh-popup__close svg {
    width: 14px;
    height: 14px;
}

.hh-popup .hh-popup__close:hover {
    color: var(--primary-color, #1C2945);
}

.hh-popup .hh-popup__close:focus-visible {
    outline: 2px solid var(--magenta-color, #A52A87);
    outline-offset: 2px;
}

/* -------------------------------------------------------- linkerkolom -- */
/* min-height:0 — een grid-item krimpt anders niet onder zijn inhoud, waardoor
   de max-height van de dialoog wordt genegeerd en overflow niet werkt. */
.hh-popup__aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #fff;
}

.hh-popup__aside-body {
    padding: 40px 40px 32px;
}

.hh-popup__title {
    margin: 0;
    font-size: 2.75rem;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--primary-color, #1C2945);
}

/* S-1. De marge rechts houdt de regel smal, zoals in het ontwerp. */
.hh-popup__subtitle {
    margin: 16px 4rem 0 0;
    font-family: var(--primary-font, "Klavika Basic", "Klavika", sans-serif);
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    color: var(--S---Mid-grey-1, #808E96);
}

.hh-popup__divider {
    margin: 28px 0 24px;
    border: 0;
    border-top: 1px solid var(--mid-purple-color, #E1DBE1);
}

.hh-popup__usps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hh-popup__usps li {
    position: relative;
    padding-left: 18px;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 170%;
    color: #808E96;
}

.hh-popup__usps li + li {
    margin-top: 14px;
}

.hh-popup__usps li::before {
    content: "";
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #C4C7D0;
}

/* Duwt het beeld naar de onderkant van de kolom, zoals in het ontwerp.
   flex:none is essentieel — als flex-item zou het beeld anders meekrimpen
   zodra de tekst erboven de kolom bijna vult, en dus (vrijwel) verdwijnen. */
.hh-popup__image {
    display: block;
    flex: none;
    width: 100%;
    /* Verhouding in plaats van een vaste hoogte: het beeld schaalt mee met de
       kolombreedte, zodat de uitsnede op mobiel even ruim is als op desktop.
       Met een vaste hoogte sneed mobiel bijna twee keer zo hard bij. */
    aspect-ratio: 2 / 1;
    height: auto;
    margin-top: auto;
    object-fit: cover;
    object-position: center;
}

/* ------------------------------------------------------- rechterkolom -- */
.hh-popup__main {
    min-width: 0;
    min-height: 0;
    padding: 40px;
    background: var(--light-grey-color, #F7F8F8);
    overflow-y: auto;
}

.hh-popup__form-title {
    margin: 0 0 24px;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    color: #1C2945;
}

.hh-popup__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hh-popup__field {
    margin-bottom: 16px;
}

.hh-popup__row .hh-popup__field {
    margin-bottom: 0;
}

.hh-popup__row + .hh-popup__field,
.hh-popup__row + .hh-popup__row {
    margin-top: 16px;
}

.hh-popup__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--primary-color, #1C2945);
}

.hh-popup__optional {
    color: #8C90A0;
}

/* Aan .hh-popup gehangen zodat deze regels van de globale formulierstijlen
   uit de Elementor-kit winnen, die later worden ingeladen. */
.hh-popup .hh-popup__field input,
.hh-popup .hh-popup__field select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #D9DEE5;
    border-radius: 0.375rem;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.2;
    color: var(--primary-color, #1C2945);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hh-popup .hh-popup__field input::placeholder {
    color: #9BA0AE;
    opacity: 1;
}

.hh-popup .hh-popup__field input:focus,
.hh-popup .hh-popup__field select:focus {
    outline: none;
    border-color: var(--magenta-color, #A52A87);
    box-shadow: 0 0 0 3px rgba(165, 42, 135, 0.12);
}

/* Ongeldig pas markeren nadat er één keer is verzonden. */
.hh-popup .hh-popup__form.is-validated input:invalid,
.hh-popup .hh-popup__form.is-validated select:invalid {
    border-color: #B3261E;
}

/* Eigen chevron; de native select houdt de mobiele UX en toegankelijkheid. */
.hh-popup__select {
    position: relative;
}

.hh-popup__select select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

/* Zolang "Maak een keuze" geselecteerd is, leest het als een placeholder.
   Het veld is niet verplicht, dus :invalid kan hier niet gebruikt worden. */
.hh-popup__select select:has(option[value=""]:checked) {
    color: #9BA0AE;
}

.hh-popup__select-chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--primary-color, #1C2945);
}

/* ---------------------------------------------------------- akkoord ---- */
.hh-popup__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
}

.hh-popup__consent input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--magenta-color, #A52A87);
    cursor: pointer;
}

.hh-popup__consent label {
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.hh-popup__consent a {
    color: var(--magenta-color, #A52A87);
    text-decoration: underline;
}

.hh-popup__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hh-popup__error {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #B3261E;
}

/* ----------------------------------------------------------- knop ------ */
.hh-popup__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    padding: 0 1.5rem;
    border: 1px solid #C142A2;
    border-radius: 2px;
    background: linear-gradient(61deg, #A52A87 13.96%, #C14DA5 86.04%);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: filter 0.25s ease;
}

.hh-popup__submit:hover,
.hh-popup__submit:focus-visible {
    filter: brightness(0.92);
}

.hh-popup__submit:focus-visible {
    outline: 2px solid var(--primary-color, #1C2945);
    outline-offset: 2px;
}

.hh-popup__submit[disabled] {
    cursor: progress;
    filter: saturate(0.6) brightness(1.05);
}

.hh-popup__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hh-popup-spin 0.7s linear infinite;
}

.hh-popup__form.is-sending .hh-popup__spinner {
    display: block;
}

@keyframes hh-popup-spin {
    to {
        transform: rotate(360deg);
    }
}

.hh-popup__reassurance {
    margin: 14px 0 0;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    line-height: 170%;
    text-align: center;
    color: #808E96;
}

/* -------------------------------------------------------- bedankt ------ */
/* Na verzenden blijft alleen het bedanktscherm over, verticaal gecentreerd:
   de kolomhoogte wordt bepaald door de linkerkolom, dus zonder centrering
   hangt de tekst bovenin met een leeg vlak eronder. */
.hh-popup__main.is-submitted {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hh-popup__main.is-submitted .hh-popup__form-title {
    display: none;
}

.hh-popup__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    text-align: center;
}

/* Zonder deze regel wint de display:flex hierboven van het hidden-attribuut
   (een auteursregel gaat altijd voor op de UA-stijl van [hidden]). */
.hh-popup__success[hidden] {
    display: none;
}

.hh-popup__success:focus {
    outline: none;
}

.hh-popup__success-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--magenta-color, #A52A87);
}

.hh-popup__success h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.25;
}

.hh-popup__success p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #4A506A;
}

/* ====================================================== mobiele variant = */
@media (max-width: 1024px) {
    .hh-popup {
        padding: 1rem;
    }

    .hh-popup__dialog {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 420px);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .hh-popup__aside-body {
        padding: 28px 24px 22px;
    }

    .hh-popup__title {
        font-size: 2rem;
    }

    /* Geen marge rechts: op mobiel past de ondertitel op één regel. */
    .hh-popup__subtitle {
        margin: 12px 0 0;
        font-size: 1rem;
    }

    /* Het ontwerp laat de opsomming op mobiel weg. */
    .hh-popup__divider,
    .hh-popup__usps {
        display: none;
    }

    /* Verhouding komt uit de basisregel; alleen het naar onderen duwen vervalt. */
    .hh-popup__image {
        margin-top: 0;
    }

    .hh-popup__main {
        padding: 24px;
        overflow-y: visible;
    }

    .hh-popup__form-title {
        margin-bottom: 20px;
        font-size: 1.125rem;
    }

    /* Alle velden onder elkaar; de gap van 16px regelt de tussenruimte al. */
    .hh-popup__row {
        grid-template-columns: minmax(0, 1fr);
    }

    .hh-popup .hh-popup__close {
        top: 12px;
        right: 12px;
    }
}

/* Op korte schermen mag de dialoog de volle hoogte gebruiken. */
@media (max-width: 1024px) and (max-height: 740px) {
    .hh-popup {
        align-items: flex-start;
        padding: 0.5rem;
    }

    .hh-popup__dialog {
        max-height: calc(100vh - 1rem);
    }
}

/* ================================================== Elementor-editor === */
/* De pop-up staat verborgen, dus in de editor zou de widget een leeg blok
   zijn. Daar tonen we de dialoog inline zodat je hem kunt vullen en zien. */
body.elementor-editor-active .hh-popup[hidden] {
    display: flex;
    position: relative;
    padding: 0;
    opacity: 1;
}

body.elementor-editor-active .hh-popup__backdrop {
    display: none;
}

body.elementor-editor-active .hh-popup__dialog {
    max-height: none;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {

    .hh-popup,
    .hh-popup__dialog,
    .hh-popup__submit {
        transition: none;
    }

    .hh-popup__spinner {
        animation-duration: 2s;
    }
}
