/**
 * OpenStreetMap (MapLibre) op de SKG-site.
 * Styling van de speld en het informatievenster volgt de oude Google Maps-weergave.
 */

.acf-map {
    position: relative;
    z-index: 0;
    background-color: #e9e5de;
    overflow: hidden;
}

/* De marker-blokken zijn alleen data voor het venster, geen zichtbare inhoud. */
.acf-map .marker {
    display: none;
}

.acf-map.maplibregl-map {
    font-family: inherit;
    background-color: #e9e5de;
}

/* ---------- Speld ---------- */

.skg-marker {
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 5;
}

/* Het informatievenster moet altijd boven de spelden liggen. Zonder dit valt
   de popup achter een marker die toevallig in de buurt staat. */
.acf-map .maplibregl-popup {
    z-index: 20;
}

.skg-marker:hover {
    z-index: 10;
}

.skg-marker__pin {
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
    transform-origin: 50% 100%;
    transition: transform 0.15s ease-out;
    animation: skg-speld-drop 0.35s ease-out both;
}

.skg-marker:hover .skg-marker__pin {
    transform: scale(1.08);
}

@keyframes skg-speld-drop {
    from {
        transform: translateY(-18px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: none;
        opacity: 1;
    }
}

/* ---------- Informatievenster (zoals Google's InfoWindow) ---------- */

.skg-infowindow .maplibregl-popup-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 12px 18px;
    font-family: inherit;
    line-height: 1.5;
    min-width: 180px;
    color: #1f2937;
}

.skg-infowindow .maplibregl-popup-content h3 {
    margin: 0 0 8px;
    color: #002f87;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.skg-infowindow .maplibregl-popup-content p {
    margin: 0 0 8px;
}

.skg-infowindow .maplibregl-popup-content a {
    color: #002f87;
    text-decoration: underline;
}

.skg-infowindow .maplibregl-popup-content a:hover {
    color: #ff8300;
}

/* Pijltje onder het venster */
.skg-infowindow .maplibregl-popup-tip {
    border-top-color: #ffffff;
    border-bottom-color: #ffffff;
}

.skg-infowindow .maplibregl-popup-close-button {
    color: #5f6368;
    font-size: 22px;
    line-height: 1;
    padding: 6px 8px 0 0;
    width: 28px;
    height: 28px;
    right: 4px;
    top: 2px;
    background: transparent;
}

.skg-infowindow .maplibregl-popup-close-button:hover {
    color: #202124;
    background: transparent;
}

/* ---------- Naamsvermelding ---------- */

.acf-map .maplibregl-ctrl-attrib {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.4;
    padding: 1px 6px;
    margin: 0 6px 6px 0;
}

.acf-map .maplibregl-ctrl-attrib a {
    color: #002f87;
    text-decoration: none;
}

.acf-map .maplibregl-ctrl-attrib-button {
    background-color: transparent;
}
