/**
 * Hash-pop-ups: geïsoleerd van theme/Beaver Builder.
 * Hoge specificiteit + resets waar nodig.
 */

body .loile-hash-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.45);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

body .loile-hash-popup-overlay * {
    box-sizing: border-box;
}

body .loile-hash-popup {
    position: relative;
    width: 100%;
    max-width: min(92vw, 720px);
    margin: 0;
    padding-top: clamp(28px, 4vw, 40px);
    padding-right: clamp(22px, 4vw, 36px);
    padding-bottom: clamp(18px, 2.8vw, 26px);
    padding-left: clamp(22px, 4vw, 36px);
    border: none;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #0f172a;
    text-align: left;
    transform: none !important;
    transition: none !important;
}

body .loile-hash-popup__title {
    margin: 0 0 10px;
    padding: 0 44px 0 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.2;
    color: #0f172a;
    text-transform: none;
    letter-spacing: normal;
}

body .loile-hash-popup__body {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #0f172a;
}

body .loile-hash-popup__body a {
    color: #0369a1;
    text-decoration: underline;
}

body .loile-hash-popup__body a:hover {
    color: #0c4a6e;
}

body .loile-hash-popup__body p {
    margin: 0 0 0.75em;
}

body .loile-hash-popup__body p:last-child {
    margin-bottom: 0;
}

/* Geen <button>: BB overschrijft knoppen; span + role=button — kruisje zelfde donker als tekst */
body .loile-hash-popup-overlay .loile-hash-popup__close {
    position: absolute;
    top: clamp(14px, 2.5vw, 22px);
    right: clamp(10px, 2vw, 16px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px !important;
    height: 40px;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 4px;
    background: transparent !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    color: #0f172a !important;
    cursor: pointer;
    transform: none !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    outline: none;
    opacity: 1;
}

body .loile-hash-popup-overlay .loile-hash-popup__close:hover,
body .loile-hash-popup-overlay .loile-hash-popup__close:focus {
    background: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

body .loile-hash-popup-overlay .loile-hash-popup__close:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0f172a !important;
}

/* -------------------------------------------------------------------------
   Formidable Forms in hash-pop-up: aligneren met site (donkere tekst, neutrale UI)
   Zie: https://formidableforms.com/knowledgebase/css-examples/
   Alles beperkt tot .loile-hash-popup__body zodat andere formulieren ongewijzigd blijven.
   ------------------------------------------------------------------------- */

body .loile-hash-popup .loile-hash-popup__body .frm_forms,
body .loile-hash-popup .loile-hash-popup__body .frm_show_form,
body .loile-hash-popup .loile-hash-popup__body [id^="frm_form_"] {
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
    margin-bottom: -14px !important;
    padding-bottom: 0 !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style,
body .loile-hash-popup .loile-hash-popup__body .frm_style_formidable-style,
body .loile-hash-popup .loile-hash-popup__body [class*="frm_style_"] {
    font-family: inherit !important;
}

body .loile-hash-popup .loile-hash-popup__body [id^="frm_form_"] > .with_frm_style,
body .loile-hash-popup .loile-hash-popup__body .frm_forms > .with_frm_style {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style .frm_form_field,
body .loile-hash-popup .loile-hash-popup__body .frm_form_field.form-field {
    margin-bottom: 16px !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style label.frm_primary_label,
body .loile-hash-popup .loile-hash-popup__body .frm_primary_label {
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin-bottom: 7px !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style .frm_description,
body .loile-hash-popup .loile-hash-popup__body .frm_description {
    font-size: 14px !important;
    color: #475569 !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="text"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="email"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="tel"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="url"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="number"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="password"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="search"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style select,
body .loile-hash-popup .loile-hash-popup__body .with_frm_style textarea {
    font-family: inherit !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
    color: #0f172a !important;
    background-color: #fff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style textarea {
    min-height: 112px !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style input:focus,
body .loile-hash-popup .loile-hash-popup__body .with_frm_style select:focus,
body .loile-hash-popup .loile-hash-popup__body .with_frm_style textarea:focus {
    border-color: #0f172a !important;
    outline: none !important;
    box-shadow: 0 0 0 1px #0f172a !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="checkbox"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="radio"] {
    width: auto !important;
    accent-color: #0f172a;
}

/* Primaire knop: zelfde als header CTA .text-container (loile-header) */
body .loile-hash-popup .loile-hash-popup__body .with_frm_style button[type="submit"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="submit"],
body .loile-hash-popup .loile-hash-popup__body .with_frm_style .frm_button_submit {
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: #fff !important;
    background-color: #2563eb !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 15px !important;
    min-height: 36px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    width: auto !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

body .loile-hash-popup .loile-hash-popup__body .with_frm_style button[type="submit"]:hover,
body .loile-hash-popup .loile-hash-popup__body .with_frm_style input[type="submit"]:hover,
body .loile-hash-popup .loile-hash-popup__body .with_frm_style .frm_button_submit:hover {
    background-color: #1d1d1d !important;
    color: #fff !important;
}

body .loile-hash-popup .loile-hash-popup__body .frm_error,
body .loile-hash-popup .loile-hash-popup__body .frm_blank_field label,
body .loile-hash-popup .loile-hash-popup__body .frm_error_style {
    color: #b91c1c !important;
    font-size: 14px !important;
}

body .loile-hash-popup .loile-hash-popup__body .frm_message,
body .loile-hash-popup .loile-hash-popup__body .frm_success_style {
    font-size: 16px !important;
    color: #0f172a !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 12px 16px !important;
}

body .loile-hash-popup .loile-hash-popup__body .frm_fields_container,
body .loile-hash-popup .loile-hash-popup__body .frm_fields {
    padding: 0 !important;
    margin-bottom: 0 !important;
}

body .loile-hash-popup .loile-hash-popup__body [id^="frm_form_"] > form,
body .loile-hash-popup .loile-hash-popup__body .frm_forms form {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body .loile-hash-popup .loile-hash-popup__body .frm_submit,
body .loile-hash-popup .loile-hash-popup__body .frm_submit.frm_flex {
    margin-top: 9px !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Laatste veld iets dichter op de knop */
body .loile-hash-popup .loile-hash-popup__body .frm_fields > .frm_form_field:has(+ .frm_submit) {
    margin-bottom: 8px !important;
}

/* Lege wpautop-paragrafen onder het formulier wegnemen */
body .loile-hash-popup .loile-hash-popup__body p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

body .loile-hash-popup .loile-hash-popup__body > *:last-child {
    margin-bottom: 0 !important;
}

body .loile-hash-popup .loile-hash-popup__body .frm_section_heading h3 {
    font-family: inherit !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Ruimte tussen alinea en formulier (shortcode direct na tekst) */
body .loile-hash-popup .loile-hash-popup__body p + .frm_forms,
body .loile-hash-popup .loile-hash-popup__body p + .frm_show_form,
body .loile-hash-popup .loile-hash-popup__body p + [id^="frm_form_"] {
    margin-top: 1.5em !important;
    clear: both !important;
}
