/* Reset di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
}

.container {
    width: 95%;
    max-width: 600px;
    margin: 20px auto 20px; /* Margine superiore ridotto */
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    border: rgb(136, 135, 135) 1px solid;
}

.form-title {
    font-size: 14px;
    font-weight:bold;
    text-align: center;
    padding: 8px;
}

.label-group {
    display: flex;
    justify-content: space-evenly;  /* Distanza perfettamente uniforme */
    margin-top: 10px;
}

label {
    display: block;
    margin-top: 8px; /* Ridotto da 10px a 8px */
    margin-left: 3px;
    font-size: 12px;
}

.item {
    width: 50%;
    font-size: 12px;
    text-align: left;
    margin-left: 3px;
}

input, select, button {
    width: 100%; /* Uniformiamo la larghezza al 100% */
    padding: 8px;
    margin-top: 5px;
    background: #fafafa;
    border: 1px solid #9a9a9a;
    border-radius: 5px;
    box-sizing: border-box; /* Assicura che padding e border siano inclusi nella larghezza */
}

#center {text-align: center;}

input[type="checkbox"] {background: #e0e0e0;border: 1px #9a9a9a;height: 25px;width: 25px;}

input[type="text"]:read-only {background: #e0e0e0;cursor: no-drop;}

:required {border:1px solid #f93257;}

select option:first-child:disabled {background-color: white;}

button {
    background: #333;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
}

button:hover {
    background: #555;
}

.button-secondary {
    background: #777; /* Colore diverso per il bottone "Torna Indietro" */
}

.button-secondary:hover {
    background: #999;
}

/* Stile per i pulsanti affiancati */

.button-group {
    display: flex;
    gap: 10px; /* Spazio tra i pulsanti */
}

.button-group button {
    flex: 1; /* I pulsanti occupano lo stesso spazio */
}

/* Stile per il modal */
.modal {
    display: none; /* Non flex, usiamo transform per centrare */
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* Sposta il modal esattamente al centro */
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Evita scrolling della pagina */
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    height: 350px; /* Altezza predefinita */
    overflow-y: hidden;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); /* Centro perfetto */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.modal-content.large-modal {
    height: 350px; /* Altezza maggiore per la modifica */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* contiene il form */

.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 88vh;
    margin: 0;
    padding: 5px;
    border-radius: 8px;
    }
.centro {  /* form centrato */
    padding: 10px;
    width: 98vw;
    max-width: 500px;
    height: 60vh;
    border: solid 2px rgb(73, 72, 72);
    border-radius: 4px;
    background-color: #f4f4f4;
    }
