/*
 * vw-map — the vestigingen map and the address blocks beside it.
 *
 * Loaded only by _LocationMap.cshtml and the contact page, not site-wide.
 *
 * The palette deliberately echoes the old Google map: a white card floating over the tiles,
 * the brand green on the filter heading, and PDOK's "grijs" basemap doing the rest. The pin
 * itself is inline SVG in the JS, so its colours live there and not here.
 */

.vw-map {
    position: relative;
    margin-bottom: 30px;
}

.vw-map__canvas {
    /* Fixed height so the box is reserved before Leaflet runs — a map that grows on load
       pushes the address list down and costs layout shift. */
    height: 480px;
    background: #eef1f4;
}

@media (max-width: 767px) {
    .vw-map__canvas {
        /* Live drops the map entirely below 768 (hidden-xs). It is kept here, shorter:
           "waar is de dichtstbijzijnde locatie" is a question people ask on a phone. */
        height: 320px;
    }
}

/* Leaflet gives a divIcon a white background and a border by default. */
.vw-map__pin {
    background: none;
    border: 0;
}

.vw-map__pin svg {
    display: block;
    /* B17: a legacy `width: 100%` rule would otherwise stretch this. */
    width: 26px;
    height: 39px;
}

/* ---- filter panel ------------------------------------------------------- */

.vw-map__filters {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 500; /* above Leaflet's tile pane (400), below its popups (700) */
    max-width: 15rem;
}

.vw-map__filters__inner {
    background: #fff;
    border: 0;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.vw-map__filters__heading {
    float: none;
    width: auto;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    padding: 0;
    color: #333;
}

.vw-map__filters__row {
    display: flex;
    align-items: center;
    gap: 8px;
    /* 2.5.8: the row is the target, not just the 13px checkbox. */
    min-height: 24px;
}

.vw-map__filters__row label {
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
    cursor: pointer;
}

.vw-map__filters__row input {
    cursor: pointer;
}

@media (max-width: 767px) {
    /* Over a 320px-tall map a floating panel would cover most of it, so below the
       breakpoint it sits under the map as an ordinary block. */
    .vw-map__filters {
        position: static;
        max-width: none;
        margin-top: 12px;
    }

    .vw-map__filters__inner {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ---- popup -------------------------------------------------------------- */

.vw-map .leaflet-popup-content {
    margin: 12px 16px;
    font-size: 14px;
    line-height: 1.45;
}

.vw-map .leaflet-popup-content-wrapper {
    border-radius: 2px;
}

.vw-map .leaflet-popup-content a {
    color: #5a8f37; /* darker than the brand green: see B16 — #82BF5A is 1.9:1 on white */
    text-decoration: underline;
}

/* ---- address blocks ----------------------------------------------------- */

.contact__block__hours__label {
    font-style: italic;
}

.contact__block__heading {
    font-size: 18px;
    margin-bottom: .4em;
}

.contact__block__hours {
    margin-top: 1em;
}

/* A hidden section must not leave its margins behind. */
[data-vw-category][hidden] {
    display: none;
}
