/* Contenitore principale */
.simulatore-form {
    max-width: 800px; /* Leggermente più compatto */
    margin: 32px auto;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05); /* Ombra leggera per un look moderno */
}

/* Titolo principale */
.simulatore-form h2 {
    text-align: center;
    color: #1a1a1a; /* Nero morbido per contrasto massimo */
    margin-bottom: 32px;
    font-size: 1.75rem; /* Dimensione equilibrata */
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* SEZIONI (fieldset) */
fieldset {
    border: none; /* Rimuovo il bordo per un look pulito */
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 10px;
    background: #f8fafc; /* Sfondo chiaro e moderno */
    position: relative;
    transition: transform 0.2s ease;
}
fieldset:hover {
    transform: translateY(-1px); /* Micro-interazione leggera */
}

/* Legenda */
legend {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 1.1rem; /* Dimensione leggibile ma non invadente */
    padding: 0 8px;
    background: #f8fafc; /* Sfondo coordinato */
    border-radius: 6px;
    display: inline-block;
    margin: 0 0 12px 8px; /* Allineamento interno */
    line-height: 1.3;
}

/* Sottotitoli */
h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 16px 0 8px;
    color: #2d3748; /* Grigio scuro per contrasto */
}

/* Testo descrittivo */
p {
    font-size: 0.9rem;
    color: #4a5568; /* Grigio medio per leggibilità */
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Spazi tra i gruppi */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 0.9rem;
}

/* Input e select */
input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0; /* Bordo chiaro */
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus {
    border-color: #3b82f6; /* Blu moderno e accessibile */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); /* Focus leggero */
    outline: none;
}

/* Stato di errore */
input.error, select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Checkbox */
input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    accent-color: #3b82f6;
    transform: scale(1.1);
}

/* Punteggi */
span[id^="punteggio-"] {
    font-weight: 500;
    color: #3b82f6;
    font-size: 0.95rem;
}

/* Totale */
.total {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #eff6ff; /* Sfondo blu chiaro */
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-top: 32px;
    border: 1px solid #dbeafe;
}

/* Pulsanti */
button {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}
button:active {
    transform: translateY(0);
}
button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .simulatore-form {
        padding: 20px;
        margin: 16px;
        border-radius: 10px;
    }
    fieldset {
        padding: 16px;
        margin-bottom: 16px;
    }
    legend {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    .simulatore-form h2 {
        font-size: 1.5rem;
    }
    input, select {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .total {
        font-size: 1.1rem;
        padding: 12px;
    }
}