/* Forms: signup (email and/or WhatsApp) and Contact Form 7. Loaded on every page. */

/* ---------- Signup: email and/or WhatsApp (CF7 + cjuiceit-data-connector) ----------
   Same layout as the old newsletter form: one column on mobile, two on desktop. */
.mspr-signup {
	display: grid;
	grid-template-columns: 1fr;
	grid-gap: 1rem;
	max-width: 88vw;
	margin: 0 auto;
}

.mspr-signup p {
	margin: 0;
}

.mspr-signup .intestazione {
	text-align: center;
}

.mspr-signup .intestazione h3 {
	text-align: center;
}

.mspr-signup .canali {
	margin: 0;
	padding: 0;
	border: 0;
}

.mspr-signup .canali legend {
	margin-bottom: 0.5rem;
}

.mspr-signup .canali .wpcf7-list-item {
	display: block;
	margin: 0 0 0.25rem;
}

.mspr-signup .privacyterms {
	font-size: 0.8rem;
}

.mspr-signup .conferma [type="submit"] {
	width: 100%;
}

/* The two-column grid of CF7 forms in page content does not apply here. */
.entry-content form.wpcf7-form:has(.mspr-signup) {
	display: block;
}

@media (min-width: 900px) {
	.mspr-signup {
		max-width: 33vw;
		grid-template-columns: 1fr 1fr;
	}

	.mspr-signup .intestazione,
	.mspr-signup .canali,
	.mspr-signup .privacyterms,
	.mspr-signup .conferma,
	.mspr-signup .wpcf7-response-output {
		grid-column: 1 / span 2;
	}
}

/* ---------- Contact Form 7, in page content: two columns on desktop ---------- */
@media (min-width: 900px) {
	.entry-content form.wpcf7-form {
		display: grid;
		grid-template: 1fr / 1fr 1fr;
		grid-gap: 1rem 2rem;
	}

	/* Message, privacy and submit rows span both columns. */
	.entry-content form.wpcf7-form > p:nth-child(6),
	.entry-content form.wpcf7-form > p:nth-child(7),
	.entry-content form.wpcf7-form > p:nth-child(8) {
		grid-column-start: span 2;
	}
}
