/* Map Overlay Components Styling */

.legend {
    position: absolute;
    top: 75px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    z-index: 1000;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
    border-radius: 5px 5px 0 0;
}

.legend-header:hover {
    background: rgba(240, 240, 240, 0.8);
}

.legend h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.legend-toggle {
    font-size: 16px;
    font-weight: bold;
    color: #666;
    line-height: 1;
}

.legend-content {
    padding: 0 10px 10px 10px;
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease-out;
}

.legend-content.collapsed {
    max-height: 0;
    padding: 0 10px;
    overflow: hidden;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-symbol {
    width: 20px;
    height: 16px;
    margin-right: 8px;
    border: 1px solid #333;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
}

.legend-symbol.point {
    border-radius: 50%;
    width: 12px;
    height: 12px;
    margin-right: 10px;
}

.legend-label {
    flex-grow: 1;
    color: #333;
}