.sam-service-map-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    font-family: inherit;
    /* Ensure the wrapper can contain absolute elements over the map */
}

/* Overlay Style for Controls */
.sam-map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    /* Higher than Leaflet map z-index */
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Let clicks pass through transparent areas */
}

/* Make inputs clickable again */
.sam-map-controls>* {
    pointer-events: auto;
}

/* Custom Search Box Styling */
.sam-search-box-wrapper {
    background: rgba(255, 255, 255, 0.9);
    padding: 0;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    width: 250px;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
}

.sam-search-input-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    /* Put icon on left if needed or just use order */
}

.sam-search-input-container input {
    width: 100%;
    border: none;
    outline: none;
    padding: 10px 10px 10px 35px;
    /* Space for icon */
    font-size: 14px;
    color: #555;
    background: transparent;
    cursor: pointer;
    /* Simulate dropdown feel */
}

.sam-search-icon {
    position: absolute;
    left: 10px;
    font-size: 10px;
    color: #666;
    pointer-events: none;
}

/* Custom Marker Styles (Black Pin) */
.sam-custom-marker {
    background: transparent;
    border: none;
}

.sam-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #000;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

.sam-pin::after {
    content: '';
    width: 10px;
    height: 10px;
    margin: 10px 0 0 10px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
}


/* Hide Category filters initially or style as a dropdown if needed. 
   For now, we will style them as a floating white card below the search box if present. */
.sam-category-filters {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 320px;
}

.sam-filter-label {
    font-weight: bold;
    color: #333;
}

.sam-filter-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

#sam-google-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
    /* Leaflet needs this sometimes contextually */
}

/* Info Window Styles */
/* Info Window (Material Card Style) */
.leaflet-popup-content-wrapper {
    background: #fff;
    border-radius: 8px;
    /* Slightly more rounded */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    /* Softer shadow */
    padding: 0;
    /* Remove default padding */
}

.leaflet-popup-content {
    margin: 0;
    /* Reset margin */
    padding: 16px;
    /* Inner padding */
    width: 260px !important;
    /* Fixed width like Google cards */
}

.leaflet-popup-tip {
    background: #fff;
}

.sam-infowindow h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 500;
    /* Google uses Roboto 500/Roboto Medium usually, inherit sans-serif */
    color: #202124;
    line-height: 1.2;
}

.sam-infowindow p {
    font-size: 14px;
    color: #555;
    /* Slightly lighter than title */
    margin-bottom: 16px;
    line-height: 1.5;
}

/* CTA Button */
.sam-infowindow a.sam-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    background: #1a73e8;
    /* Google Blue */
    color: #fff;
    text-decoration: none;
    border-radius: 36px;
    /* Pill shape */
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    width: 100%;
    /* Full width button in popup */
    box-sizing: border-box;
}

.sam-infowindow a.sam-btn:hover {
    background: #1557b0;
}

/* Tooltips */
.leaflet-tooltip.sam-tooltip {
    background-color: #fff;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #3c4043;
    white-space: nowrap;
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
    display: none;
    /* Hide default leaflet arrows for cleaner look */
}

/* Responsive */
@media (max-width: 768px) {
    .sam-map-controls {
        left: 10px;
        right: 10px;
        min-width: 0;
    }

    .sam-search-box {
        min-width: 0;
        width: 100%;
    }
}