/* Map Container */
#map {
    width: 100%;
    height: 100%;
}

/* Custom Marker Icons */
.custom-marker-icon {
    background: transparent;
    border: none;
}

/* Marker Clusters */
.marker-cluster-small {
    background-color: rgba(59, 130, 246, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(59, 130, 246, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(251, 146, 60, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(251, 146, 60, 0.8);
}

.marker-cluster-large {
    background-color: rgba(239, 68, 68, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(239, 68, 68, 0.8);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster span {
    line-height: 30px;
}

/* Leaflet Popup Custom Styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

.leaflet-popup-tip-container {
    display: none;
}

/* Custom Popup for Nearby Leads */
.custom-popup .leaflet-popup-content-wrapper {
    padding: 0;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    line-height: 1.5;
}

.custom-popup .leaflet-popup-close-button {
    font-size: 18px;
    padding: 4px 8px;
    color: #666;
}

.custom-popup .leaflet-popup-close-button:hover {
    color: #181818;
    background-color: #f3f4f6;
}

/* Zoom Control Styling */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-zoom a {
    color: #1f2937 !important;
    font-weight: bold;
}

.leaflet-control-zoom a:hover {
    background-color: #f3f4f6 !important;
}

/* Nearby Leads Map - Ensure it stays below modals */
#nearby-leads-map {
    position: relative;
    z-index: 1;
}

#nearby-leads-map .leaflet-pane {
    z-index: auto;
}

#nearby-leads-map .leaflet-map-pane {
    z-index: 1;
}

#nearby-leads-map .leaflet-tile-pane {
    z-index: 1;
}

#nearby-leads-map .leaflet-overlay-pane {
    z-index: 2;
}

#nearby-leads-map .leaflet-shadow-pane {
    z-index: 3;
}

#nearby-leads-map .leaflet-marker-pane {
    z-index: 4;
}

#nearby-leads-map .leaflet-tooltip-pane {
    z-index: 5;
}

#nearby-leads-map .leaflet-popup-pane {
    z-index: 6;
}

#nearby-leads-map .leaflet-control {
    z-index: 7;
}
