.legend-component {
    position: absolute;
    display: grid;
    bottom: 5rem;
    right: 5rem;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 0.8rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 15rem;
}

.legend-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: #2B2B2B;
    margin-bottom: 1.5rem;
    text-align: center;
}

.legend-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend-color {
    min-width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-label {
    font-size: 1.3rem;
    color: #2B2B2B;
    font-weight: 500;
}

/* Responsive styles */
@media only screen and (max-width: 1024px) {
    .legend-component {
        bottom: 4rem;
        left: 1.5rem;
        right: auto;
    }
}

@media only screen and (max-width: 886px) {
    .legend-component {
        bottom: 2.5rem;
        left: 1rem;
        transition: all ease 0.2s;
    }

    .legend-component:hover {
        transform: scale(1.1);
    }
}

@media only screen and (max-width: 414px) {
    .legend-component {
        bottom: 0.5rem;
        left: 0.5rem;
    }
    
    .legend-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .legend-label {
        font-size: 1.2rem;
    }
    
    .legend-color {
        min-width: 1.6rem;
        height: 1.6rem;
    }
} 