/* Stili Generali (Mobile e Base) */
.form-field input:not([type="radio"]):not([type="checkbox"]),
.form-field textarea,
.form-field select {
    width: 100%; 
    box-sizing: border-box; 
    color: black;
}

.modern-style {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-columns: auto;
    justify-items: stretch;
    gap: 1rem;
}

/* Stili Desktop (da 769px in su) */
@media (min-width: 769px) {
    .modern-style {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Due colonne fisse */
        /* Fondamentale: permette di riempire i buchi se sposti i campi */
        grid-auto-flow: row dense; 
        gap: 1.5rem;
    }

    /* FORZATURA CORSIA SINISTRA */
    .col-left {
        grid-column: 1; /* Forza SEMPRE a stare nella prima colonna */
        justify-self: end;
        width: 80%;
    }

    /* FORZATURA CORSIA DESTRA */
    .col-right {
        grid-column: 2; /* Forza SEMPRE a stare nella seconda colonna */
        justify-self: start;
        width: 80%;
    }

    /* ELEMENTI A TUTTA LARGHEZZA (Textarea, Privacy, Submit) */
    .grid-full-width,
    .grid-privacy-end
	{
        grid-column: 1 / -1 !important; /* Occupa entrambe le colonne */
        display: flex;
        flex-direction: column;
    }
	.grid-full-width{
        width: 100%;
        justify-self: center;
        align-items: center;
	}
	.grid-privacy-end{
        width: 80%;
		margin: 0 auto;
		align-items: flex-start;
		text-align: left;
	}
	/* Submit: Centrato e più piccolo */
	.grid-submit-end {
		grid-column: 1 / -1; /* Occupa sempre tutta la riga */
		text-align: center;
		margin-top: 1rem;
	}

	.grid-submit-end input[type="submit"] {
		/* Riduciamo la larghezza: invece dell'80%, usiamo un valore fisso o una % minore */
		width: auto !important; 
		min-width: 150px; /* Larghezza minima per non farlo troppo minuscolo */
		max-width: 250px; /* Impedisce che diventi troppo grande su schermi wide */

		/* Miglioriamo l'estetica */
		padding: 12px 30px; 
		border-radius: 5px;
		cursor: pointer;
		transition: background-color 0.3s ease;
	}
    /* Textarea e Submit: larghezza coerente con gli altri campi per estetica */
    .grid-full-width textarea,
    .grid-submit-end input[type="submit"] {
        width: 80%;
    }

    .grid-full-width textarea {
        min-height: 150px;
    }
}
