/* =============================================================
   Elementor Map Pro — Frontend Styles
   ============================================================= */

/* ─ Map Container ────────────────────────────────────────── */
.emp-map-wrapper {
    position: relative;
    width: 100%;
}

.emp-map-container {
    width: 100%;
    height: 550px;
    z-index: 1;
    background: #f1f3f5;
}

/* Override Leaflet z-index to not bleed over sticky headers */
.leaflet-pane,
.leaflet-top,
.leaflet-bottom {
    z-index: 1;
}
.leaflet-control {
    z-index: 2;
}

/* ─ Custom SVG Marker ────────────────────────────────────── */
.emp-svg-marker {
    background: none;
    border: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.emp-svg-marker svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
    transition: filter 0.2s ease, transform 0.2s ease;
}

/* Active / clicked marker */
.emp-active-marker svg,
.emp-hover-marker svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)) brightness(1.2);
    transform: scale(1.25);
}

.emp-active-marker {
    z-index: 999 !important;
}

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

.leaflet-popup-content {
    margin: 0;
    min-width: 160px;
}

.emp-popup {
    padding: 12px 16px;
    font-family: inherit;
    line-height: 1.5;
}

.emp-popup strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1D2330;
    margin-bottom: 4px;
}

.emp-popup p {
    font-size: 12px;
    color: #555;
    margin: 0 0 8px;
}

.emp-popup-link {
    display: inline-block;
    font-size: 12px;
    color: #1D2330;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #1D2330;
    transition: opacity 0.2s;
}

.emp-popup-link:hover {
    opacity: 0.7;
}

.leaflet-popup-tip {
    box-shadow: none;
}

/* ─ Active Card (Loop Grid Item) ────────────────────────── */
.emp-active-card {
    outline: 2px solid #1D2330 !important;
    box-shadow: 0 0 0 4px rgba(29,35,48,0.12) !important;
    transition: outline 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 2;
}

/* ─ Zoom Controls ──────────────────────────────────────────── */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom a {
    background: #fff !important;
    color: #1D2330 !important;
    border: none !important;
    font-size: 16px !important;
    line-height: 26px !important;
    width: 28px !important;
    height: 28px !important;
    transition: background 0.2s;
}

.leaflet-control-zoom a:hover {
    background: #f5f6fa !important;
    color: #1D2330 !important;
}

/* ─ Attribution ───────────────────────────────────────────── */
.leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255,255,255,0.8) !important;
}

/* ─ Cluster overrides ───────────────────────────────────────── */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(29,35,48,0.15) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(29,35,48,0.85) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
}

/* ─ Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .emp-map-container {
        height: 320px;
    }
    .emp-popup {
        min-width: 120px;
    }
}