/* --- STILE GENERALE --- */


.Esa {
    font-size: 5em;
    text-align: center;
    color: #993366;
    font-family: 'Courier';
    text-shadow: 2px 2px 4px #999999;
    font-style:italic;
}

.Titolo {
    text-align: center;
    color: #ffffff;
    background-color: #2c3e50;
    text-decoration: solid;
    margin-bottom: 8px;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #eef2f3;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 2em auto;
    background: #ffffff;
    padding: 1em;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 8px;
    margin-top: 2px;
    
}

.nav-menu-container {
    max-width: 1200px;
    padding: 1em;
    margin: 2em auto;
    margin-bottom: 10px;
    margin-top: 2px;
    gap: 10rem;
    text-align: right;
    border-top: 1px solid #993366;
    border-bottom: 5px double #993366;
}

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: relative;   
    font-size:1.5em;
    margin-left:50px;
}


    .nav-link:hover {
        color: #993366;
        text-shadow: 0 2px 2px #993366;
    }

/* --- TIPOGRAFIA --- */
h1 {
    font-size: 4em;
    text-align: center;
    font-family: 'Courier', monospace;
    text-shadow: 2px 2px 4px #999999;
    margin-bottom: 5px;
    margin-top: 2px;
}

h2, h3 {
    text-align: center;
    color: #333;
    margin-bottom: 2px;
    margin-top: 2px;
}

.center {
    text-align: center;
}

/* --- FORM E INPUT --- */
.form-riga {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%; /* Forza ogni riga a essere larga uguale */
    gap: 15px; /* Spazio costante tra le celle */
    margin-bottom: 10px;
    box-sizing: border-box;
}

.form-colonna {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-cella {
    display: flex;
    align-items: center;
    min-width: 0; /* IMPORTANTE: permette al flex di rimpicciolire i testi lunghi */
}
.cella-label {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: right; /* Utile se il testo va su più righe */
    padding-right: 2px; /* Spazio tra label e input */
    /*background-color:#8ca3bd;*/
    background-color: #e4e7eb;
    min-height: 45px;
}

input, select {
    padding: 0.75em;
    font-size: 1em;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
    display: block;
    margin: 2px auto;
    height: 45px;

}

    
input[type="radio"] {
        width: auto !important; /* Toglie il width 100% o 60% */
        height: auto !important; /* Toglie altezze forzate */
        margin: 0 5px 0 10px; /* Spazio bilanciato tra pallino e testo */
        padding: 0; /* Il padding gonfia il pallino in modo strano */
        cursor: pointer;
        transform: scale(1.2); /* Se li vuoi un FILO più grandi dei normali, usa questo */
    }

/* Assicurati che la cella dei radio non li metta uno sopra l'altro */
.cella-radio {
    display: flex;
    flex-direction: row !important; /* Forza l'allineamento orizzontale */
    align-items: center;
    justify-content: flex-start;
    cursor: pointer; /* Fa capire che si può cliccare sul testo per selezionare il pallino */
    padding-right: 15px;
}

label {
    font-weight: bold;
    color: #4e4e55;
    font-size: 1em; /* Leggermente ridotto per pulizia */
    line-height: 1.2;
}

hr {
    border: 0;
    border-top: 1px solid #8d8d8d;
    margin: 20px 0;
}

/* --- PULSANTI --- */
button, .refresh-button {
    display: inline-block;
    padding: 0.75em 20px;
    font-size: 1.2em;
    background: #993366;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
    text-decoration: none;    
}

    button:hover {
        background: #28a745; /* Verde come nel tuo originale */
    }

.refresh-button {
    background-color: #007bff;
    margin-top: 20px;
}

    .refresh-button:hover {
        background-color: #0056b3;
            }
.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px; /* molto sottile */
    background: transparent;
    border: none; /* via il bordo */
    cursor: pointer;
    color: #2c3e50; /* grigio chiaro su sfondo bianco */
    font-size: 0.9rem;
    transition: color 0.2s ease, transform 0.15s ease;
}

    .btn-delete:hover {
        color: #e53935; /* rosso solo in hover */
        transform: scale(1.05); /* micro feedback */
    }

.icon-trash {
    width: 1em;
    height: 1em;
    display: inline-block;
    background-color: #2c3e50;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2m-6 5v6m4-6v6M7 6v14a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2m-6 5v6m4-6v6M7 6v14a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}


/* --- TABELLE --- */
table {
    width: 95%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

    table thead {
        background-color: #e4e7eb;        
        text-align: left;
    }

    table th, table td {
        padding: 3px 4px;
        border-bottom: 1px solid #ddd;
    }

    table tbody tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    table tbody tr:hover {
        background-color: #f1f1f1;
    }

/* --- LINK --- */
a {
    color: #007bff;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/*--- how to*/

.howto-title {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
}

.howto-subtitle {
    color: #2c3e50;
    margin-top: 25px;
    font-size: 1.5em;
    text-align:left;
}

.howto-note {
    background-color: #f9f9f9;
    padding: 15px;    
    font-style: italic;
}

.howto-box {
    width: 75%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #ccc;
    border-left: 5px solid #ccc;
    margin-right: auto;
    margin-left:auto;
}

    



    /* --- RESPONSIVE (MOBILE) --- */
    @media (max-width: 1080px) {
        .form-riga {
            flex-direction: column;
        }

        .container {
            width: 95%; /* Leggero margine per non toccare i bordi */
        }

        input {
            width: 100%;
            height: 80px;
            font-size: 1.8em;
        }

        button {
            height: 80px;
            width: 100%;
            max-width: 400px;
            font-size: 2em;
        }

        h1 {
            font-size: 4em; /* Ridotto da 8em che era estremo */
        }
    }
