/**
 * EMCO Locations Map styles
 *
 * @package EMCO_Theme_Customization
 * @since 1.5.0
 */

.emco-locations-map {
    width: 100%;
    min-height: 320px;
    overflow: hidden;
    z-index: 0; /* keep tiles below Divi sticky headers/menus */
}

/* The divIcon wrapper Leaflet adds a white box by default — strip it. */
.emco-map-marker {
    background: transparent;
    border: 0;
}

.emco-map-marker svg {
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* "Show all locations" control button.
   It lives inside the zoom control's .leaflet-bar, so it already inherits the
   exact size/borders of the +/- buttons. We only center & size the icon. */
.emco-locations-map .emco-reset-control {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #142C4A;
    cursor: pointer;
}

.emco-locations-map .emco-reset-control svg {
    width: 16px;
    height: 16px;
}

.emco-locations-map .emco-reset-control:hover,
.emco-locations-map .emco-reset-control:focus {
    background: #142C4A;
    color: #fff;
}

/* Square popup corners to match the map. Leaflet rounds these by default. */
.emco-locations-map .leaflet-popup-content-wrapper,
.emco-locations-map .leaflet-popup-tip {
    border-radius: 0;
}

/* Popup content */
.emco-map-popup {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    line-height: 1.4;
}

.emco-map-popup__name {
    font-size: 15px;
    color: #142C4A;
}

.emco-map-popup a {
    color: #1a1a1a;
    text-decoration: none;
}

.emco-map-popup a:hover,
.emco-map-popup a:focus {
    text-decoration: underline;
}

.emco-map-popup__phone,
.emco-map-popup__email {
    font-weight: 600;
}

/* "Get directions" button-style link to Google Maps */
.emco-map-popup__directions {
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 12px;
    background: #142C4A;
    color: #fff !important; /* override the generic popup link color */
    font-weight: 600;
    border-radius: 0;
}

.emco-map-popup__directions:hover,
.emco-map-popup__directions:focus {
    background: #0d1d33;
    text-decoration: none !important;
}
