/* Region Selector Styles */
.region-selector-container {
    margin-bottom: 2rem;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.region-card {
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
    text-align: center;
    min-height: 60px;
}

.region-card:hover {
    background: #e9ecef;
    border-color: #00b4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.region-card.selected {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: 600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.region-card.selected::before {
    content: "✓";
    margin-right: 0.5rem;
    font-weight: bold;
    color: #28a745;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Removed region-list styles as they are no longer needed */

.city-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: white;
}

.city-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.city-item:last-child {
    border-bottom: none;
}

.city-name {
    font-weight: 600;
    color: #212529;
    font-size: 1rem;
}

.city-province {
    font-size: 0.875rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .italy-map-container {
        height: 300px;
    }
    
    .region-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .city-item {
        padding: 0.5rem 0.75rem;
    }
    
    .city-name {
        font-size: 0.9rem;
    }
    
    .city-province {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Loading states */
.region-selector-container.loading .italy-svg {
    opacity: 0.6;
    pointer-events: none;
}

.region-selector-container.loading::after {
    content: "Caricamento...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* Animation for region selection */
.region-path {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Custom scrollbar for lists */
.region-list::-webkit-scrollbar,
.city-list::-webkit-scrollbar {
    width: 6px;
}

.region-list::-webkit-scrollbar-track,
.city-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.region-list::-webkit-scrollbar-thumb,
.city-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.region-list::-webkit-scrollbar-thumb:hover,
.city-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
