/**
 * Community Map Styles
 */

.community-map-container {
    margin: 20px 0;
}

#community-map {
    border: 1px solid #ddd;
    background: #f5f5f5;
}

/* Custom marker styles */
.custom-marker {
    background: transparent;
    border: none;
}

/* Popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

.leaflet-popup-content {
    margin: 12px;
}

.business-popup h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.business-popup p {
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.business-popup a {
    transition: opacity 0.2s;
}

.business-popup a:hover {
    opacity: 0.8;
}

/* Business list styles */
.business-list {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    margin-top: 15px;
}

.business-list h3 {
    margin: 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.business-list .business-count {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: normal;
    margin-left: 8px;
}

#business-list-items {
    max-height: 300px;
    overflow-y: auto;
}

.business-list-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.business-list-item:last-child {
    border-bottom: none;
}

.business-list-item:hover {
    background-color: #f5f5f5;
}

.business-list-item.highlighted {
    background-color: #e8f4fc;
}

.business-list-item h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.business-list-item p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.business-list-item p:last-child {
    margin-bottom: 0;
    font-size: 11px;
    color: #999;
}

/* Search and filter controls */
.community-map-controls {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.community-map-controls input[type="text"],
.community-map-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.community-map-controls input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.community-map-controls input[type="text"]:focus,
.community-map-controls select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Empty state */
.community-map-container .no-businesses {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.community-map-container .no-businesses h3 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Responsive styles */
@media (max-width: 768px) {
    .community-map-controls {
        flex-direction: column;
    }
    
    .community-map-controls input[type="text"],
    .community-map-controls select {
        width: 100%;
        min-width: auto;
    }
    
    #business-list-items {
        max-height: 200px;
    }
    
    .leaflet-popup-content {
        margin: 8px;
    }
    
    .business-popup {
        min-width: 180px;
    }
}

/* Loading state */
.community-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

.community-map-loading::after {
    content: "Loading map...";
    font-size: 14px;
}
