/* Legend Component Styles */

.legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.control-group-legend {
    margin-left: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s, background-color 0.2s;
    border: 1px solid transparent;
}

.legend-item:hover {
    background: var(--gray-light);
}

.legend-item.active {
    background: var(--white);
    border-color: #ddd;
    box-shadow: var(--shadow-sm);
}

.legend-item:not(.active) {
    opacity: 0.35;
}

.legend-item:not(.active) .legend-color {
    background-color: #ccc !important;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    transition: background-color 0.2s;
}
