/**
 * Leaflet overrides for lesyetis-storelocator.
 *
 * Loaded after leaflet/MarkerCluster vendor CSS to tweak the look
 * without modifying vendor files.
 */

/* --- Attribution flag ---
 * Leaflet ships an SVG flag next to its "Leaflet" credit. Hide it to
 * keep the attribution purely textual.
 */
.leaflet-attribution-flag {
    display: none !important;
}

/* --- Stacking context ---
 * Leaflet ships panes at z-index 200..700 (tile/overlay/marker/popup).
 * Without an explicit z-index on .leaflet-container, those z-indices
 * bleed into the parent stacking context and cover sibling UI such as
 * the search form (.block-stores-map-form, z-index:9). Giving the
 * container z-index:0 traps Leaflet's stacking inside the map area.
 */
.leaflet-container {
    z-index: 0;
}

/* --- Popup --- */
.leaflet-popup-content-wrapper {
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    padding: 4px;
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
}

.leaflet-popup-tip {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* --- Marker cluster (custom icon overrides) --- */
.marker-cluster {
    background: none;
    border: none;
}

.marker-cluster__inner {
    width: 32px;
    height: 40px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster__inner span {
    position: relative;
    top: -4px;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

/* --- Nominatim autocomplete dropdown --- */
.nominatim-autocomplete__dropdown {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
}

.nominatim-autocomplete__item {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.nominatim-autocomplete__item:last-child {
    border-bottom: none;
}

.nominatim-autocomplete__item.is-highlighted,
.nominatim-autocomplete__item:hover {
    background: #f5f5f5;
}
