/* ============================================================
   BARFmenu Maps - PRE-JOEP CSS
   ============================================================ */

#bm-store-locator {
    min-height: 500px;
    border: 3px solid #358e15;
    padding: 20px;
    box-sizing: border-box;
}


/* ============================================================
   FILTERBLOK
   ============================================================ */

.bm-store-filters {
    margin: 0 0 18px;
    padding: 16px;

    background: #f5f7f4;
    border: 1px solid #dfe5dc;
    border-radius: 8px;

    box-sizing: border-box;
}


/* ============================================================
   REGEL 1 + REGEL 2
   ============================================================ */

.bm-store-filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}


/* Zoekgedeelte */
.bm-store-search {
    display: flex;
    align-items: center;
    gap: 8px;

    flex: 1 1 100%;
    width: 100%;
    margin: 0;
}

.bm-store-search-input {
    flex: 1 1 auto;
    min-width: 300px;
    min-height: 42px;

    padding: 9px 12px;

    border: 1px solid #c8d0c5;
    border-radius: 6px;

    background: #ffffff;

    font: inherit;
    color: inherit;

    box-sizing: border-box;
}

.bm-store-search-input:focus {
    outline: 2px solid #358e15;
    outline-offset: 1px;
    border-color: #358e15;
}


/* ============================================================
   ALGEMENE KNOPPEN
   ============================================================ */

.bm-store-filters button {
    min-height: 42px;
    padding: 9px 16px;

    border: 1px solid #358e15;
    border-radius: 6px;

    background: #358e15;
    color: #ffffff;

    font: inherit;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;
    white-space: nowrap;

    box-sizing: border-box;
}

.bm-store-filters button:hover {
    opacity: .92;
}

.bm-store-filters button:disabled {
    opacity: .6;
    cursor: default;
}


/* Wissen bewust secundair */
.bm-store-search-clear {
    background: #ffffff !important;
    color: #358e15 !important;
}


/* ============================================================
   MIJN LOCATIE
   ============================================================ */

.bm-store-my-location {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}


/* Statusmelding onder de bediening */
.bm-store-my-location-status {
    flex: 1 1 100%;

    display: block;

    margin: 0;

    font-size: 13px;
    line-height: 1.4;
}

.bm-store-my-location-status:empty {
    display: none;
}


/* ============================================================
   TWEEDE REGEL
   ============================================================ */

/*
 * Zoekblok neemt hierboven 100% in.
 * Alles wat daarna in dezelfde controls-container staat,
 * komt daardoor automatisch op de volgende flexregel.
 */

.bm-store-filter-now-open {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 42px;
    padding: 8px 12px;

    border: 1px solid #c8d0c5;
    border-radius: 6px;

    background: #ffffff;

    cursor: pointer;
    white-space: nowrap;

    box-sizing: border-box;
}

.bm-store-filter-now-open input,
.bm-store-filter-options input {
    accent-color: #358e15;
}


/* ============================================================
   DROPDOWNFILTERS
   ============================================================ */

.bm-store-filter {
    position: relative;
    flex: 0 0 auto;
}

.bm-store-filter > summary {
    position: relative;

    min-width: 130px;
    min-height: 42px;

    display: flex;
    align-items: center;

    padding: 8px 34px 8px 12px;

    border: 1px solid #c8d0c5;
    border-radius: 6px;

    background: #ffffff;

    cursor: pointer;

    font-weight: 600;
    white-space: nowrap;

    box-sizing: border-box;

    list-style: none;
    user-select: none;
}

.bm-store-filter > summary::-webkit-details-marker {
    display: none;
}

.bm-store-filter > summary::after {
    content: "▾";

    position: absolute;
    right: 12px;

    font-size: 12px;
}

.bm-store-filter[open] > summary {
    border-color: #358e15;

    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}


/* ============================================================
   DROPDOWN INHOUD
   ============================================================ */

.bm-store-filter-options {
    position: absolute;
    z-index: 1000;

    top: 100%;
    left: 0;

    min-width: 240px;
    max-width: 340px;
    max-height: 320px;

    overflow-y: auto;

    padding: 8px;

    border: 1px solid #358e15;
    border-top: 0;
    border-radius: 0 0 6px 6px;

    background: #ffffff;

    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);

    box-sizing: border-box;
}

.bm-store-filter-options label {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 8px 9px;

    border-radius: 5px;

    cursor: pointer;

    box-sizing: border-box;
}

.bm-store-filter-options label:hover {
    background: #f1f6ef;
}


/* Duidelijk geselecteerde waarde */
.bm-store-filter-options label:has(input:checked) {
    background: #e7f3e3;
    color: #256b10;
    font-weight: 600;
}

.bm-store-filter-options input:checked + span {
    color: #256b10;
    font-weight: 600;
}


/* ============================================================
   ACTIEVE FILTERPREVIEW
   ============================================================ */

/*
 * De preview krijgt een volledige eigen regel.
 */

.bm-store-active-filters {
    flex: 1 1 100%;
    width: 100%;

    margin-top: 4px;

    box-sizing: border-box;
}


/* "Uw filters:" eigen regel */
.bm-store-active-filters-label {
    display: block;

    width: 100%;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}


/* Chips beginnen op nieuwe regel */
.bm-store-active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 7px;

    width: 100%;
}


/* Filterchip */
.bm-store-active-filter-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;

    min-height: 34px !important;

    padding: 6px 10px !important;

    border: 1px solid #358e15 !important;
    border-radius: 6px !important;

    background: #358e15 !important;
    color: #ffffff !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    white-space: nowrap;
}

.bm-store-active-filter-chip:hover {
    opacity: .9;
}


/* ============================================================
   RESULTAATAANTAL
   ============================================================ */

.bm-store-filter-count {
    flex: 1 1 100%;
    width: 100%;

    margin-top: 2px;

    font-size: 14px;
    font-weight: 600;
}


/* ============================================================
   OPENINGSTATUS
   Alleen "Geopend" groen
   ============================================================ */

.bm-opening-open {
    color: #358e15;
    font-weight: 700;
}


/* Voorkomt dat complete Openingstijden-regel groen wordt */
.bm-result-card details > summary {
    color: inherit;
}


/* ============================================================
   GOOGLE MARKER POPUP
   ============================================================ */

#bm-store-locator .gm-style-iw-chr {
    position: absolute;
    top: 0;
    right: 0;
    height: auto;
}

#bm-store-locator .gm-style-iw-d {
    padding-top: 0 !important;
}

#bm-store-locator .gm-style-iw-c {
    padding-top: 12px !important;
}


/* ============================================================
   POPUP CTA'S
   Route plannen + Bekijk locatie naast elkaar
   ============================================================ */

.bm-marker-popup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 10px;

    margin-top: 12px;
    padding-right: 4px;
    padding-bottom: 2px;
}

.bm-marker-popup-action-row {
    display: inline-flex;
    margin: 0;
}

.bm-marker-popup-action-row + .bm-marker-popup-action-row {
    margin-left: 10px;
}

.bm-marker-popup-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 34px;

    padding: 7px 12px;

    border: 1px solid #358e15;
    border-radius: 6px;

    background: #358e15;
    color: #ffffff !important;

    font-weight: 600;
    line-height: 1.2;

    text-decoration: none !important;
    white-space: nowrap;

    box-sizing: border-box;
}

.bm-marker-popup-action:hover {
    opacity: .9;
    text-decoration: none !important;
}


/* ============================================================
   RESULTAATKAARTEN
   ============================================================ */

#bm-store-results {
    margin-top: 20px;
}

.bm-result-card {
    /*
     * Houdt de kaart vrij van de sticky Lightspeed-header
     * wanneer Bekijk locatie scrollIntoView() gebruikt.
     */
    scroll-margin-top: 150px;

    transition:
        box-shadow .15s ease,
        border-color .15s ease;
}

.bm-result-card:hover {
    border-color: #b9c7b4 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .07);
}


/* ============================================================
   TABLET / KLEIN DESKTOP
   ============================================================ */

@media (max-width: 1000px) {

    .bm-store-search {
        flex-wrap: wrap;
    }

    .bm-store-search-input {
        flex: 1 1 100%;
        width: 100%;
    }
}


/* ============================================================
   MOBIEL
   ============================================================ */

@media (max-width: 767px) {

    #bm-store-locator {
        min-height: 420px;
        padding: 10px;
    }

    .bm-store-filters {
        padding: 12px;
    }

    .bm-store-filter-controls {
        align-items: stretch;
    }

    .bm-store-search {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .bm-store-search-input {
        width: 100%;
        min-width: 0;
    }

    .bm-store-search button,
    .bm-store-my-location,
    .bm-store-my-location-button,
    .bm-store-filter-now-open,
    .bm-store-filter {
        width: 100%;
    }

    .bm-store-my-location-button {
        display: block;
    }

    .bm-store-filter > summary {
        width: 100%;
    }

    .bm-store-filter-options {
        position: static;

        min-width: 0;
        max-width: none;
        width: 100%;

        border-top: 1px solid #358e15;
        border-radius: 6px;

        box-shadow: none;
    }

    .bm-store-active-filter-chips {
        align-items: flex-start;
    }

    .bm-result-card {
        scroll-margin-top: 120px;
    }
}


/* ============================================================
   PRE-JOEP - DEFINITIEVE ROW + SPACING CORRECTIE
   ============================================================ */


/* Hoofdcontainer: echte rijen onder elkaar */
.bm-store-filter-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}


/* ============================================================
   REGEL 1
   Zoekveld | Zoeken | Gebruik mijn locatie | Wissen
   ============================================================ */

.bm-store-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;

    width: 100%;
    gap: 12px;

    margin: 0 0 16px 0;
}


/* Search bevat alleen zoekveld + Zoeken */
.bm-store-filter-actions .bm-store-search {
    display: flex;
    align-items: center;

    flex: 1 1 auto;
    width: auto;

    gap: 12px;
    margin: 0;
}


/* Zoekveld krijgt alle beschikbare ruimte */
.bm-store-filter-actions .bm-store-search-input {
    flex: 1 1 auto;

    width: auto;
    min-width: 300px;
}


/* Mijn locatie blijft normale knop */
.bm-store-filter-actions .bm-store-my-location {
    flex: 0 0 auto;
}


/* Wissen blijft helemaal rechts */
.bm-store-filter-actions .bm-store-search-clear {
    flex: 0 0 auto;
}


/* ============================================================
   REGEL 2
   Nu geopend | Locatietype | Keten | Services | Land
   ============================================================ */

.bm-store-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    width: 100%;

    gap: 12px;

    margin: 0;
}


/* Dropdowns iets ruimer */
.bm-store-filter-row .bm-store-filter > summary {
    min-width: 140px;
}


/* ============================================================
   UW FILTERS
   ============================================================ */

.bm-store-active-filters {
    margin-top: 20px;
}


/* Uw filters: eigen regel */
.bm-store-active-filters-label {
    display: block;

    width: 100%;

    margin: 0 0 9px 0;

    font-weight: 600;
}


/*
 * De huidige JS zet de chips rechtstreeks in
 * .bm-store-active-filters.
 *
 * Daarom gebruiken we hier gap via de buttons zelf.
 */
.bm-store-active-filters .bm-store-filter-chip {
    margin: 0 8px 8px 0 !important;
}


/* Resultaataantal iets los van chips */
.bm-store-filter-count {
    margin-top: 4px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1000px) {

    .bm-store-filter-actions {
        flex-wrap: wrap;
    }

    .bm-store-filter-actions .bm-store-search {
        flex: 1 1 100%;
    }

}


/* ============================================================
   MOBIEL
   ============================================================ */

@media (max-width: 767px) {

    .bm-store-filter-actions {
        flex-direction: column;
        align-items: stretch;

        gap: 10px;

        margin-bottom: 16px;
    }

    .bm-store-filter-actions .bm-store-search {
        width: 100%;
        flex-direction: column;
        align-items: stretch;

        gap: 10px;
    }

    .bm-store-filter-actions .bm-store-search-input {
        width: 100%;
        min-width: 0;
    }

    .bm-store-filter-actions .bm-store-my-location,
    .bm-store-filter-actions .bm-store-my-location-button,
    .bm-store-filter-actions .bm-store-search-clear {
        width: 100%;
    }

    .bm-store-filter-row {
        flex-direction: column;
        align-items: stretch;

        gap: 10px;
    }

    .bm-store-filter-row .bm-store-filter-now-open,
    .bm-store-filter-row .bm-store-filter,
    .bm-store-filter-row .bm-store-filter > summary {
        width: 100%;
    }

    .bm-store-active-filters {
        margin-top: 18px;
    }

    .bm-marker-popup-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .bm-marker-popup-action-row + .bm-marker-popup-action-row {
        margin-left: 0;
        margin-top: 8px;
    }
}


/* ============================================================
   POPUP - EXTRA ADEMRUIMTE
   ============================================================ */

#bm-store-locator .gm-style-iw-d {
    padding: 0 10px 10px 0 !important;
}

#bm-store-locator .gm-style-iw-c {
    padding: 14px 12px 12px 14px !important;
}


/* ============================================================
   JOEP LOCATOR
   ============================================================ */

.bm-joep-page {
    color: #555;
    line-height: 1.6;
}


/* ============================================================
   INTRO
   ============================================================ */

.bm-joep-intro {
    padding: 30px 32px;
    margin-bottom: 24px;
    background: #f2f2f2;
    border-radius: 7px;
}

.bm-joep-intro h2 {
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 28px;
    color: #358e15;
}

.bm-joep-intro p {
    margin: 0 0 12px;
}

.bm-joep-intro p:last-of-type {
    margin-bottom: 0;
}


/* ============================================================
   INTRO QUICKLINKS
   FAQ links / Disclaimer rechts
   ============================================================ */

.bm-joep-quicklinks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-top: 18px;

    font-size: 14px;
    line-height: 1.4;
}

.bm-joep-quicklinks a {
    color: #f39200;
    font-weight: 600;
    text-decoration: none;
}

.bm-joep-quicklinks a:hover {
    text-decoration: underline;
}


/* ============================================================
   MAPS
   ============================================================ */

.bm-joep-map {
    margin-bottom: 32px;
}

.bm-joep-map > h2 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 32px;
    color: #333;
}


/* ============================================================
   FAQ

   Alleen Joep Locator pagina-layout.
   De FAQ-component zelf wordt volledig door Lightspeed gestyled.
   ============================================================ */

.bm-joep-faq {
    margin-top: 24px;
    margin-bottom: 32px;

    /*
     * Houdt de FAQ-titel vrij van de sticky Lightspeed-header
     * wanneer via de quicklink naar #joep-faq wordt gesprongen.
     */
    scroll-margin-top: 150px;
}

.bm-joep-faq > h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 32px;
    color: #333;
}

.bm-joep-faq > p {
    margin: 0 0 16px;
}

#bm-locator-faq {
    margin: 0;
}
/* ============================================================
   TERUG NAAR BOVEN
   ============================================================ */

.bm-joep-back-top {
    margin: 16px 0 0;
    text-align: right;
    font-size: 14px;
}

.bm-joep-back-top a {
    color: #f39200;
    font-weight: 600;
    text-decoration: none;
}

.bm-joep-back-top a:hover {
    text-decoration: underline;
}

#joep-top {
    scroll-margin-top: 150px;
}

/* ============================================================
   DISCLAIMER MODAL
   ============================================================ */

/*
 * hidden moet altijd winnen van de normale flex-display
 * van de modal.
 */
.bm-joep-disclaimer-modal[hidden] {
    display: none !important;
}


/*
 * Volledig scherm overlay.
 * Fixed betekent dat de modal boven de HUIDIGE viewport verschijnt,
 * ongeacht waar de modal-HTML in de pagina staat.
 */
.bm-joep-disclaimer-modal {
    position: fixed;
    z-index: 99999;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, .45);

    box-sizing: border-box;
}


/*
 * Het witte dialoogvenster.
 */
.bm-joep-disclaimer-dialog {
    position: relative;

    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    padding: 30px 32px;

    border-radius: 10px;

    background: #ffffff;

    box-shadow: 0 16px 45px rgba(0, 0, 0, .22);

    box-sizing: border-box;
}


/*
 * Titel.
 * Rechts ruimte vrijhouden voor de sluitknop.
 */
.bm-joep-disclaimer-dialog h2 {
    margin: 0 48px 18px 0;

    font-size: 24px;
    line-height: 32px;

    color: #358e15;
}


/*
 * Sluitknop rechtsboven.
 */
.bm-joep-disclaimer-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f2f2f2;
    color: #333;

    font: inherit;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    box-sizing: border-box;
}

.bm-joep-disclaimer-close:hover {
    background: #e8e8e8;
}

.bm-joep-disclaimer-close:focus {
    outline: 2px solid #358e15;
    outline-offset: 2px;
}


/*
 * Disclaimertekst.
 */
.bm-joep-disclaimer-content {
    padding: 0;
}

.bm-joep-disclaimer-content p {
    margin: 0 0 12px;
}

.bm-joep-disclaimer-content p:last-child {
    margin-bottom: 0;
}


/*
 * Achterliggende pagina niet laten scrollen
 * zolang de modal openstaat.
 */
body.bm-joep-modal-open {
    overflow: hidden;
}


/* ============================================================
   MOBIEL
   ============================================================ */

@media (max-width: 767px) {

    .bm-joep-intro {
        padding: 22px 20px;
    }


    /*
     * Op smalle schermen quicklinks onder elkaar.
     */
    .bm-joep-quicklinks {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }


    /*
     * Mobiele sticky header is kleiner.
     */
    .bm-joep-faq {
        scroll-margin-top: 120px;
    }

  #joep-top {
    scroll-margin-top: 120px;
}


    /*
     * Modal houdt rondom ruimte tot de schermrand.
     */
    .bm-joep-disclaimer-modal {
        padding: 16px;
    }

    .bm-joep-disclaimer-dialog {
        max-height: calc(100vh - 32px);
        padding: 24px 20px;
    }

    .bm-joep-disclaimer-dialog h2 {
        margin-right: 42px;

        font-size: 21px;
        line-height: 28px;
    }

    .bm-joep-disclaimer-close {
        top: 14px;
        right: 14px;

        width: 36px;
        height: 36px;

        font-size: 25px;
    }
}

/* ============================================================
   JOEP LOCATOR - MOBIEL ZOEKRADIUS VOLLE BREEDTE
   ============================================================ */

@media (max-width: 767px) {

    .bm-store-search-radius {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }

}

/* ============================================================
   JOEP LOCATOR - FAQ TITEL + TERUG NAAR BOVEN
   ============================================================ */

/*
 * De bestaande HTML-volgorde blijft intact:
 * h2 -> FAQ -> terug-naar-boven.
 *
 * CSS Grid plaatst de teruglink visueel rechts naast de FAQ-titel,
 * zonder Lightspeed FAQ-markup of pagina-HTML te wijzigen.
 */
.bm-joep-faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
}

.bm-joep-faq > h2 {
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 8px;
}

.bm-joep-faq > .bm-joep-back-top {
    grid-column: 2;
    grid-row: 1;
    align-self: center;

    margin: 0 0 8px;
    text-align: right;
    white-space: nowrap;
}

.bm-joep-faq > #bm-locator-faq {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
}

@media (max-width: 767px) {

    .bm-joep-faq {
        column-gap: 12px;
    }

    .bm-joep-faq > .bm-joep-back-top {
        font-size: 13px;
    }

}
/* ============================================================
   MAPS MOBIEL UX - RESULTAAT / POPUP / ANCHORS
   ============================================================ */

/*
 * Desktop houdt de bestaande éénregelige openingstatus.
 * De JS levert status + vervolg nu als twee semantische spans.
 */
.bm-opening-followup::before {
    content: " · ";
}




@media (max-width: 767px) {

    /*
     * Resultaatkaarten en FAQ nooit smaller laten worden door een
     * bovenliggende flex/grid-minimum.
     */
    #bm-store-results,
    .bm-result-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }


    /*
     * Mobiel: na Geopend/Gesloten de tijdmelding op een eigen regel.
     * De desktop-scheiding " · " vervalt daar bewust.
     */
    .bm-opening-followup {
        display: block;
        margin-top: 2px;
    }

    .bm-opening-followup::before {
        content: "";
    }


    /*
     * Google InfoWindow mag op mobiel nooit breder worden dan de viewport.
     * Horizontaal schuiven in popupkaarten wordt hiermee voorkomen.
     */
    #bm-store-locator .gm-style-iw-c {
        max-width: calc(100vw - 32px) !important;
        box-sizing: border-box !important;
    }

    #bm-store-locator .gm-style-iw-d {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    #bm-store-locator .bm-marker-popup {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-wrap: anywhere;
        word-break: normal;
        box-sizing: border-box;
    }

    #bm-store-locator .bm-marker-popup *,
    #bm-store-locator .bm-marker-popup img {
        max-width: 100%;
        box-sizing: border-box;
    }

    #bm-store-locator .bm-marker-popup img {
        height: auto;
    }

    #bm-store-locator .bm-marker-popup-actions,
    #bm-store-locator .bm-marker-popup-action-row,
    #bm-store-locator .bm-marker-popup-action {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #bm-store-locator .bm-marker-popup-action {
        white-space: normal;
        text-align: center;
    }


    /*
     * Meer ruimte voor de mobiele sticky Lightspeed-header.
     * Geldt voor resultaatkaart én Joep-pagina-anchors.
     */
    .bm-result-card,
    .bm-joep-faq,
    #joep-top {
        scroll-margin-top: 180px !important;
    }
}
