#usa-interactive-map-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
}

#usa-map-wrapper {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
}

#usa-map {
    flex: 1;
}

#usa-map svg {
    display: block;
    width: 100%;
    height: auto;
}

#small-states-legend {
    width: 250px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
}

#small-states-legend h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.legend-item {
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.legend-item:hover {
    background: #e9ecef;
    border-left-color: #0073aa;
    transform: translateX(5px);
}

.legend-item .state-code {
    font-weight: bold;
    color: #0073aa;
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
}

.legend-item .state-name {
    color: #666;
    font-size: 12px;
    line-height: 1.3;
    margin: 2px 0 0 0;
}

.state {
    stroke: #fff;
    stroke-width: 1.5;
    cursor: pointer;
    transition: all 0.3s;
}

.state-label {
    font-size: 10px;
    font-weight: bold;
    pointer-events: none;
    text-anchor: middle;
}

.usa-map-tooltip {
    position: absolute;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10000;
    max-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    #usa-map-wrapper {
        flex-direction: column;
    }
    
    /* Hide the map on mobile */
    #usa-map {
        display: none;
    }
    
    /* Show legend full width on mobile */
    #small-states-legend {
        width: 100%;
    }
    
    #small-states-legend h3 {
        font-size: 18px;
        text-align: center;
    }
    
    /* Make legend items larger for easier tapping */
    .legend-item {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .legend-item .state-code {
        font-size: 16px;
    }
    
    .legend-item .state-name {
        font-size: 14px;
    }
}
