/* Current Location Button Styling */
.control-btn.current-location {
    background: linear-gradient(135deg, #4ECDC4 0%, #45b7d1 100%);
    border-color: #4ECDC4;
}

.control-btn.current-location:hover:not(:disabled) {
    background: linear-gradient(135deg, #45b7d1 0%, #3da8b8 100%);
    transform: translateY(-2px);
}

/* Search Input with Icon */
.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper input {
    padding-left: 35px;
}

.search-input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: none; /* Hidden by default */
}

.search-dropdown.show {
    display: block; /* Show when has results */
}

.search-dropdown-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(78, 205, 196, 0.15);
    border-left: 4px solid #4ECDC4;
    padding-left: 10px;
}

.search-result-icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.search-result-content {
    flex: 1;
}

.search-result-main {
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
}

.search-result-sub {
    color: #888;
    font-size: 11px;
}

.search-result-type {
    background: rgba(78, 205, 196, 0.2);
    color: #4ECDC4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 6px;
}

.search-dropdown-item.no-results {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 12px;
    cursor: default;
    display: block;
}

/* Scrollbar */
.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 3px;
}
.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Recent Searches */
#recentSearches {
    margin-top: 10px;
}

.recent-searches-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
}

.recent-search-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 11px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-search-item:hover {
    background: rgba(78, 205, 196, 0.1);
    color: #4ECDC4;
}

.recent-search-icon {
    opacity: 0.6;
    font-size: 12px;
}

/* Loading spinner for geolocation */
.location-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #2a2a2a;
    border-top: 2px solid #4ECDC4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Map marker enhancements */
.custom-marker {
    border-radius: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.custom-marker:hover {
    transform: scale(1.1);
}

/* Location success/error messages */
.location-required {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff8888;
    padding: 10px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 8px;
    font-weight: 600;
    text-align: center;
}

.location-success {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid #4ECDC4;
    color: #4ECDC4;
    padding: 10px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 8px;
    font-weight: 600;
}

/* Map controls positioning */
.map-controls {
    position: absolute;
    top: 50px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.map-control-btn {
    background: rgba(26, 26, 26, 0.95);
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.map-control-btn:hover {
    background: rgba(40, 40, 40, 0.95);
    border-color: #555555;
}

.map-control-btn.active {
    background: rgba(60, 60, 60, 0.95);
    border-color: #666666;
}

/* Popup styling enhancements */
.leaflet-popup-content-wrapper {
    background: #1a1a1a;
    color: #e0e0e0;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.leaflet-popup-content {
    margin: 12px;
    min-width: 200px;
}

.leaflet-popup-content h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.leaflet-popup-content p {
    margin: 4px 0;
    font-size: 12px;
}

.leaflet-popup-tip {
    background: #1a1a1a;
}

/* Circle drawing indicator */
.circle-drawing-active {
    cursor: crosshair !important;
}

.circle-center-marker {
    background: #4ECDC4;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Geolocation marker */
.current-location-marker {
    background: #4ECDC4;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(78, 205, 196, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0);
    }
}