/* Publieke formulieren: moskee aanvullen, nieuwe moskee, gebedsruimte aanmelden (nov 2026).
   Alleen geladen in die vier views, onderaan de pagina zodat het na publiek-vlak.css komt.
   Zelfde stijl als de site (wit, vlak, groen #005b41); doel: beter tikken en lezen op mobiel. */

:root {
    --pf-groen: #005b41;
    --pf-groen-licht: #eef6f2;
    --pf-rand: #dbe2de;
}

/* ---------- 1. Ja/Nee-vragen en taalkeuze: hele vak tikbaar ---------- */
#wizardForm .form-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 0 16px 0 42px;
    border: 1px solid var(--pf-rand);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

#wizardForm .form-check .form-check-input {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 0;
    float: none;
    cursor: pointer;
}

#wizardForm .form-check .form-check-label {
    cursor: pointer;
    padding: 10px 0;
    color: #323232;
}

/* label over het hele vak, zodat een tik naast het rondje ook telt */
#wizardForm .form-check .form-check-label::after {
    content: "";
    position: absolute;
    inset: 0;
}

#wizardForm .form-check:has(.form-check-input:checked) {
    border-color: var(--pf-groen);
    background: var(--pf-groen-licht);
}

#wizardForm .form-check .form-check-input:checked {
    background-color: var(--pf-groen);
    border-color: var(--pf-groen);
}

/* rijen met keuzes: nette tussenruimte, ook als ze naar een nieuwe regel gaan */
#wizardForm .d-flex:has(> .form-check) {
    flex-wrap: wrap;
    gap: 8px !important;
}

/* ---------- 2. Foto's (moskee aanvullen): hele vakje is de knop ---------- */
.wizard .upload-thumb > button.position-absolute,
.wizard .rounded-circle.border > button.position-absolute {
    inset: 0;
    width: 100%;
    height: 100%;
    border: 1px dashed #9fbfb2 !important;
    border-radius: inherit;
    background: #fff !important;
    color: var(--pf-groen) !important;
    font-size: 30px;
    line-height: 1;
    box-shadow: none !important;
}

.wizard .rounded-circle.border > button.position-absolute {
    font-size: 15px;
    font-weight: 600;
}

.wizard .upload-thumb > button.position-absolute:hover,
.wizard .rounded-circle.border > button.position-absolute:hover {
    background: var(--pf-groen-licht) !important;
    color: var(--pf-groen) !important;
}

/* het vakje zelf geen eigen rand meer: de stippelrand van de knop is de rand */
.wizard .upload-thumb.border,
.wizard .rounded-circle.border:has(> button.position-absolute) {
    border: 0 !important;
}

/* staat er al een foto: knop wordt een klein rondje rechtsonder om te vervangen */
.wizard .upload-thumb > img:not(.d-none) ~ button.position-absolute,
.wizard .rounded-circle.border > img:not(.d-none) ~ button.position-absolute {
    inset: auto 6px 6px auto;
    width: 32px;
    height: 32px;
    border: 1px solid var(--pf-rand) !important;
    border-style: solid !important;
    border-radius: 50%;
    background: #fff !important;
    font-size: 18px;
    padding: 0;
}

.wizard .rounded-circle.border > img:not(.d-none) ~ button.position-absolute {
    inset: auto 50% 6px auto;
    transform: translateX(50%);
    width: auto;
    padding: 0 10px;
    border-radius: 16px;
    font-size: 13px;
}

/* ---------- 3. Uploadknoppen (nieuwe moskee, gebedsruimte) ---------- */
#btnAddMultiple,
#btnAddThumbnail {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 16px;
}

/* ---------- 4. Mobiel ---------- */
@media (max-width: 767.98px) {
    /* "Je vult informatie aan voor": compacter, zodat het formulier hoger begint */
    .aanvul-moskee {
        padding: 10px 12px;
        gap: 12px;
        margin-bottom: 14px;
    }

    .aanvul-moskee img {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
    }

    .aanvul-moskee-naam {
        font-size: 1.05rem;
    }

    /* knoppen onderaan een stap: groot en makkelijk te raken */
    .wizard .card-footer {
        padding: 14px 16px !important;
    }

    .wizard .card-footer .btn,
    .wizard .card-footer button {
        width: 100%;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        border-radius: 10px;
    }

    /* eerste stap heeft geen Terug: Volgende dan over de hele breedte */
    .wizard .card-footer .col-6:not(:has(*)) {
        display: none;
    }

    .wizard .card-footer .col-6:not(:has(*)) + .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* fotovakjes: drie op een rij */
    .wizard .upload-thumb {
        width: calc((100% - 16px) / 3) !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    /* uploadknoppen en verstuurknop gebedsruimte over de hele breedte */
    #btnAddMultiple,
    #btnAddThumbnail,
    .mosque-submit-button {
        width: 100%;
        justify-content: center;
    }

    .mosque-submit-button {
        min-height: 52px;
    }

    /* startpagina moskee: Terug en Moskee aanvullen naast elkaar zonder dat de tekst breekt */
    .mosque-form-content .d-flex.gap-2 > button[type="submit"],
    .mosqueContainer .d-flex.gap-2 > button[type="submit"] {
        flex: 1 1 auto;
        padding: 0 16px !important;
        min-height: 52px;
        white-space: nowrap;
    }
}

/* ---------- 5. Moskee zoeken (startpagina): huisstijl in de keuzelijst ---------- */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--pf-groen) !important;
    color: #fff !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    min-height: 44px;
    font-size: 16px;
    border: 1px solid var(--pf-rand);
    border-radius: 8px;
    padding: 0 12px;
}

.select2-dropdown {
    border-color: var(--pf-rand) !important;
    border-radius: 10px !important;
    overflow: hidden;
}

/* ---------- 6. Tijdens versturen ---------- */
form[data-bezig] button[type="submit"],
form[data-bezig] button:not([type]) {
    opacity: .7;
    cursor: wait;
}

/* ---------- 7. Gelijke ruimte tussen velden (gebedsruimte, startpagina moskee) ---------- */
.row.g-3:has(> .mosque-field-group) {
    --bs-gutter-y: 0;
}

@media (max-width: 767.98px) {
    .mosque-field-group {
        margin-bottom: 22px;
    }
}

/* ---------- 8. Stappenbalk zoals het app-design: huidige stap = pil met nummer + naam,
              afgerond = vinkje, volgende = klein nummer (namen via publiek-formulieren.js) ---------- */
#div-wizard.step-indicator {
    visibility: visible !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 18px !important;
    padding: 0;
}

#div-wizard.step-indicator::before {
    display: none;
}

#div-wizard .step {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    text-align: left;
}

#div-wizard .step:last-child {
    flex: 0 0 auto;
}

#div-wizard .step:not(:last-child)::after {
    content: "";
    flex: 1 1 auto;
    min-width: 8px;
    height: 2px;
    margin: 0 6px;
    border-radius: 2px;
    background: #d3e9df;
}

#div-wizard .step.complete::after {
    background: var(--pf-groen);
}

#div-wizard .step .circle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    width: auto;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    border-radius: 999px;
    background: #e4f3ec !important;
    color: var(--pf-groen);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}

#div-wizard .step .stap-nr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

#div-wizard .step .stap-naam {
    display: none;
    white-space: nowrap;
}

#div-wizard .step.active .circle {
    height: 44px;
    padding: 4px 16px 4px 4px;
    background: var(--pf-groen) !important;
    color: #fff;
}

#div-wizard .step.active .stap-nr {
    background: #fff;
    color: var(--pf-groen);
}

#div-wizard .step.active .stap-naam {
    display: inline;
}

#div-wizard .step.complete .circle {
    background: var(--pf-groen) !important;
    color: #fff;
}

#div-wizard .step.complete .stap-nr {
    font-size: 0;
}

#div-wizard .step.complete .stap-nr::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
}

/* ---------- 9. Groene koppen: icoon links, staand op de onderrand (niet zwevend) ---------- */
.mosque-header-section {
    display: flex;
    align-items: center;
    min-height: 60px;
    padding: 14px 18px 14px 74px !important;
    text-align: left !important;
    background-position: 18px bottom !important;
    background-size: 42px auto !important;
}

.mosque-header-section .mosque-header-description {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

/* gebedsruimte: het icoon is een img (had een vaste verschuiving) */
.mosque-header-section:has(.mosque-icon-wrapper) {
    padding: 0 18px !important;
    background-image: none !important;
}

.mosque-header-section .mosque-icon-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    width: 100%;
    margin: 0;
    min-height: 60px;
}

.mosque-header-section .mosque-svg-icon {
    position: static !important;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: block;
}

.mosque-header-section .mosque-icon-wrapper .mosque-header-description {
    align-self: center;
    padding: 14px 0;
}

/* faciliteiten-kop: zelfde opbouw */
.facility-header {
    min-height: 60px;
    padding: 0 18px !important;
    gap: 14px;
}

.facility-header img {
    align-self: flex-end;
    width: 42px;
    height: auto;
    display: block;
}

/* ---------- 10. Mobiel: volle breedte gebruiken ---------- */
@media (max-width: 767.98px) {
    /* minder lagen kader: buitenmarges klein, binnenkaders weg */
    #wizardForm > [class*="col-"],
    .row.mx-0 > .col-md-9 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .wizard {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .wizard .card-body {
        padding: 16px 14px !important;
    }

    /* faciliteiten: geen kaartje per vraag, maar een lijst met lijnen ertussen */
    .wizard .facility-box,
    .wizard .lang-box {
        border: 0 !important;
        border-radius: 0;
        padding: 16px 0 !important;
        border-bottom: 1px solid #e8ece9 !important;
        height: auto;
    }

    .wizard .facility-card .card-body > .row {
        --bs-gutter-y: 0;
    }

    .wizard .facility-card .card-body .row > [class*="col-"]:last-child .facility-box,
    .wizard .facility-card .card-body .row > [class*="col-"]:last-child .lang-box {
        border-bottom: 0 !important;
    }

    /* keuzes verdelen de breedte: Ja | Nee elk de helft, talen twee per rij */
    #wizardForm .d-flex:has(> .form-check) > .form-check {
        flex: 1 1 0;
        min-width: max-content;
    }

    .wizard .lang-box .row.flex-column {
        flex-direction: row !important;
        flex-wrap: wrap;
        margin: 0 -4px;
    }

    .wizard .lang-box .row.flex-column > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 4px;
        margin-bottom: 8px !important;
    }

    .wizard .lang-box .form-check {
        display: flex;
        width: 100%;
    }

    /* stappenbalk: compacter zodat hij op 360 px past */
    #div-wizard .step .circle,
    #div-wizard .step .stap-nr {
        height: 32px;
    }

    #div-wizard .step .stap-nr {
        width: 32px;
    }

    #div-wizard .step.active .circle {
        height: 40px;
        padding-right: 14px;
    }

    #div-wizard .step:not(:last-child)::after {
        margin: 0 4px;
    }

    .mosque-header-section {
        padding-left: 66px !important;
        background-position: 14px bottom !important;
        background-size: 38px auto !important;
    }
}

/* ---------- 11. Mobiel: gebedsruimte en startpagina moskee ook volle breedte ---------- */
@media (max-width: 767.98px) {
    .mosqueContainer {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .mosqueContainer > .row {
        margin-left: 0;
        margin-right: 0;
    }

    .mosqueContainer > .row > .mosque-main-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .mosque-form-content {
        padding: 20px 16px 22px !important;
    }
}

/* ---------- 12. Startpagina moskee: relatiekeuze als tikbare vakken (zelfde als Ja/Nee) ---------- */
.mosque-radio-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mosque-radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin: 0;
    padding: 0 16px 0 13px;
    border: 1px solid var(--pf-rand);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.mosque-radio-item:has(.mosque-radio-visual.selected) {
    border-color: var(--pf-groen);
    background: var(--pf-groen-licht);
}

/* ---------- 13. Knoppenbalk onderaan een stap: wit, geen grijs vlak ---------- */
.wizard .card-footer {
    background: #fff !important;
    border-top: 1px solid #e8ece9 !important;
}

.wizard .card-footer .btn-light,
.wizard .card-footer .btn-back {
    background: #fff !important;
    border: 1px solid #c9d3cf !important;
    color: #1c2420 !important;
}

.wizard .card-footer .btn-light:hover,
.wizard .card-footer .btn-back:hover {
    border-color: #005b41 !important;
    color: #005b41 !important;
}

/* ---------- 14. Keuzes met drie opties (parkeerdruk) op een regel, even breed ---------- */
@media (max-width: 767.98px) {
    #wizardForm .d-flex:has(> .form-check:nth-child(3)) > .form-check {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 36px;
        padding-right: 8px;
    }

    #wizardForm .d-flex:has(> .form-check:nth-child(3)) > .form-check .form-check-input {
        left: 10px;
    }

    #wizardForm .d-flex:has(> .form-check:nth-child(3)) {
        flex-wrap: nowrap;
    }
}

/* ---------- 15. Labels steviger (niet grijs en dun) ---------- */
#wizardForm .form-label,
.mosque-field-label {
    color: #1c2420 !important;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}

#wizardForm small.text-muted,
#wizardForm p.text-muted {
    color: #5f6b66 !important;
    font-size: 14px;
}

/* ---------- 16. Uploadvakken: wit met stippelrand in plaats van zware groene knop ---------- */
#btnAddMultiple,
#btnAddThumbnail {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 64px;
    margin-top: 8px !important;
    border: 1px dashed #9fbfb2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #005b41 !important;
    font-size: 16px;
    font-weight: 500;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease;
}

#btnAddMultiple:hover,
#btnAddThumbnail:hover {
    background: #eef6f2 !important;
    border-color: #005b41 !important;
}

#btnAddMultiple:active,
#btnAddThumbnail:active {
    transform: scale(.99);
}

/* ---------- 17. Nieuwe moskee: kaart "Jouw gegevens" ---------- */
.nm-jij .card-body {
    padding: 16px 14px !important;
}

@media (min-width: 768px) {
    .nm-jij .card-body {
        padding: 24px !important;
    }
}

/* ---------- 18. Startpagina moskee: nieuwe moskee aanmelden ---------- */
.nm-zoek-hulp {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 44px;
    align-items: center;
    margin-top: 4px;
    font-size: 15px;
    color: #5f6b66 !important;
    text-decoration: none !important;
}

.nm-zoek-hulp span {
    color: #005b41;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mosque-bottom-section {
    padding: 0 0 16px !important;
    gap: 16px !important;
}

.nm-aanmelden {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid #dbe2de;
    border-radius: 16px;
    background: #fff;
    color: #1c2420 !important;
    text-align: left;
    text-decoration: none !important;
    transition: border-color .15s ease, background-color .15s ease, transform .12s ease;
}

.nm-aanmelden:hover {
    border-color: #005b41;
    background: #f5faf7;
}

.nm-aanmelden:active {
    transform: scale(.99);
}

.nm-plus {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f3ee;
    color: #005b41;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nm-tekst {
    flex: 1;
    min-width: 0;
}

.nm-tekst b {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.nm-tekst small {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    color: #005b41;
    font-weight: 500;
}

.nm-pijl {
    flex: none;
    color: #6f7a75;
    font-size: 14px;
}

.mosque-bottom-text {
    font-size: 14px;
    color: #6f7a75;
    line-height: 1.5;
    margin: 0;
}
