/* Migliorini Forms — allineato al design del sito (Poppins/Roboto, blu #3368c6). */

.mgf-wrap {
	--mgf-primary: #3368c6;
	--mgf-primary-dark: #2a55a4;
	--mgf-heading: #20292f;
	--mgf-text: #4a4f54;
	--mgf-border: #d7dee8;
	--mgf-bg-soft: #f6f9fd;
	--mgf-error: #b32d2e;
	--mgf-ok: #0a7c42;
	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	color: var(--mgf-text);
	max-width: 640px;
}

.mgf-title {
	font-family: Poppins, Roboto, sans-serif;
	color: var(--mgf-heading);
	font-size: 1.35rem;
	margin: 0 0 .8rem;
}

/* Il campo esca deve essere invisibile ma NON display:none:
   alcuni bot ignorano i campi nascosti in quel modo. */
.mgf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mgf-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}
.mgf-row .mgf-field {
	flex: 1 1 220px;
	min-width: 0;
}

.mgf-field {
	margin-bottom: 1.15rem;
}

.mgf-field > label {
	display: block;
	font-weight: 600;
	font-size: .95rem;
	color: var(--mgf-heading);
	margin-bottom: .35rem;
	line-height: 1.35;
}

.mgf-req { color: var(--mgf-primary); }

.mgf-field input[type="text"],
.mgf-field input[type="tel"],
.mgf-field input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	padding: .72rem .9rem;
	font: inherit;
	font-size: 1rem;
	color: var(--mgf-heading);
	background: #fff;
	border: 1px solid var(--mgf-border);
	border-radius: 10px;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}

.mgf-field input:focus {
	outline: none;
	border-color: var(--mgf-primary);
	box-shadow: 0 0 0 3px rgba(51, 104, 198, .16);
}

.mgf-field input[aria-invalid="true"] {
	border-color: var(--mgf-error);
	background: #fdf6f6;
}

.mgf-help {
	display: block;
	font-size: .86rem;
	color: var(--mgf-text);
	opacity: .85;
	margin-top: .35rem;
}

.mgf-error {
	display: block;
	color: var(--mgf-error);
	font-size: .86rem;
	font-weight: 500;
	margin-top: .35rem;
}

/* Consensi */
.mgf-consent {
	background: var(--mgf-bg-soft);
	border: 1px solid var(--mgf-border);
	border-radius: 10px;
	padding: .85rem 1rem;
}

.mgf-check {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-weight: 500;
	font-size: .95rem;
	color: var(--mgf-heading);
	cursor: pointer;
	line-height: 1.45;
}

.mgf-check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: .1rem 0 0;
	accent-color: var(--mgf-primary);
	cursor: pointer;
}

.mgf-check a {
	color: var(--mgf-primary);
	text-decoration: underline;
}

.mgf-consent-text {
	margin: .55rem 0 0;
	font-size: .84rem;
	line-height: 1.5;
	opacity: .9;
}

/* Bottone */
.mgf-submit {
	display: inline-block;
	width: 100%;
	padding: .9rem 1.6rem;
	font-family: Poppins, Roboto, sans-serif;
	font-size: 1.02rem;
	font-weight: 600;
	color: #fff;
	background: var(--mgf-primary);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background .15s, transform .05s;
}

.mgf-submit:hover { background: var(--mgf-primary-dark); }
.mgf-submit:active { transform: translateY(1px); }
.mgf-submit:focus-visible {
	outline: 3px solid rgba(51, 104, 198, .4);
	outline-offset: 2px;
}
.mgf-submit[disabled] { opacity: .65; cursor: wait; }

/* Esiti */
.mgf-success {
	background: #eef8f2;
	border: 1px solid #b7e0c8;
	border-left: 4px solid var(--mgf-ok);
	border-radius: 10px;
	padding: 1.1rem 1.25rem;
	color: #14532d;
}
.mgf-success strong {
	font-family: Poppins, Roboto, sans-serif;
	font-size: 1.1rem;
	display: block;
	margin-bottom: .3rem;
}
.mgf-success p { margin: 0; }

.mgf-alert {
	background: #fdf3f3;
	border: 1px solid #f0c2c2;
	border-left: 4px solid var(--mgf-error);
	border-radius: 10px;
	padding: .85rem 1rem;
	color: #7f1d1d;
	margin-bottom: 1rem;
}

.mgf-feedback:not(:empty) {
	margin-top: 1rem;
	padding: .85rem 1rem;
	border-radius: 10px;
	font-size: .95rem;
}
.mgf-feedback.is-ok {
	background: #eef8f2;
	border: 1px solid #b7e0c8;
	color: #14532d;
}
.mgf-feedback.is-ko {
	background: #fdf3f3;
	border: 1px solid #f0c2c2;
	color: #7f1d1d;
}

@media (max-width: 560px) {
	.mgf-row { gap: 0; }
	.mgf-row .mgf-field { flex: 1 1 100%; }
}
