/* Grafica per i moduli Contact Form 7 creati da
   plugin/eptamed-cf7-forms — stessi token colore del tema (navy/beige/
   terracotta). Non tocca il markup di CF7, solo le sue classi reali:
   .wpcf7-form, .wpcf7-form-control, .wpcf7-acceptance, .wpcf7-submit. */

.wpcf7:has(.eptcf7-row) {
	background: var(--c-beige, #F3ECE2);
	border-radius: 20px;
	padding: 40px 36px;
	max-width: 640px;
	margin: 0 auto;
	font-family: var(--font-body), -apple-system, BlinkMacSystemFont, sans-serif;
}

.wpcf7:has(.eptcf7-row) h1,
.wpcf7:has(.eptcf7-row) h2,
.wpcf7:has(.eptcf7-row) h3 {
	margin: 0 0 24px;
	color: var(--c-primary-dark, #0E2E4B);
	font-size: 1.3rem;
	font-weight: 800;
	text-align: center;
}

.wpcf7:has(.eptcf7-row) .wpcf7-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wpcf7:has(.eptcf7-row) .wpcf7-form p {
	margin: 0;
}

.eptcf7-row {
	display: flex;
	gap: 14px;
}

.eptcf7-row .wpcf7-form-control-wrap {
	flex: 1;
	display: block;
}

.wpcf7:has(.eptcf7-row) .wpcf7-form-control:not(.wpcf7-acceptance):not(.wpcf7-submit) {
	width: 100%;
	box-sizing: border-box;
	border: none;
	border-radius: 12px;
	padding: 16px 18px;
	font-size: .95rem;
	font-family: inherit;
	background: #fff;
	color: var(--c-primary-dark, #0E2E4B);
}

.wpcf7:has(.eptcf7-row) textarea.wpcf7-form-control {
	min-height: 110px;
	resize: vertical;
}

.wpcf7:has(.eptcf7-row) .wpcf7-form-control::placeholder {
	color: #8a97a3;
}

.wpcf7:has(.eptcf7-row) .wpcf7-form-control:focus {
	outline: 2px solid var(--c-accent, #BC5A29);
	outline-offset: 1px;
}

.eptcf7-consent {
	font-size: .85rem;
}

.wpcf7:has(.eptcf7-row) .wpcf7-list-item {
	margin: 0;
}

.wpcf7:has(.eptcf7-row) .wpcf7-acceptance label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--c-primary-dark, #0E2E4B);
	cursor: pointer;
}

.wpcf7:has(.eptcf7-row) .wpcf7-acceptance input {
	margin-top: 3px;
	flex-shrink: 0;
}

.wpcf7:has(.eptcf7-row) .wpcf7-acceptance a {
	color: var(--c-accent, #BC5A29);
}

.wpcf7:has(.eptcf7-row) input.wpcf7-submit {
	align-self: center;
	margin-top: 6px;
	background: var(--c-primary-dark, #0E2E4B) !important;
	color: #fff !important;
	border: none;
	border-radius: 100px;
	padding: 14px 44px;
	font-size: .95rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: background 150ms;
}

.wpcf7:has(.eptcf7-row) input.wpcf7-submit:hover {
	background: var(--c-accent, #BC5A29) !important;
}

.wpcf7:has(.eptcf7-row) .wpcf7-spinner {
	margin: 8px auto 0;
	display: block;
}

.wpcf7:has(.eptcf7-row) .wpcf7-response-output {
	margin: 16px 0 0 !important;
	padding: 14px 16px !important;
	border-radius: 12px !important;
	border: none !important;
	font-size: .9rem;
	text-align: center;
}

.wpcf7:has(.eptcf7-row) form.sent .wpcf7-response-output {
	background: #E4F3EC;
	color: #1E7A4C;
}

.wpcf7:has(.eptcf7-row) form.failed .wpcf7-response-output,
.wpcf7:has(.eptcf7-row) form.aborted .wpcf7-response-output,
.wpcf7:has(.eptcf7-row) form.spam .wpcf7-response-output {
	background: #FBE7E4;
	color: #A0341F;
}

.wpcf7:has(.eptcf7-row) .wpcf7-not-valid-tip {
	color: var(--c-accent, #BC5A29);
	font-size: .8rem;
	margin-top: 4px;
	display: block;
}

@media (max-width: 600px) {
	.wpcf7:has(.eptcf7-row) {
		padding: 28px 22px;
	}
	.eptcf7-row {
		flex-direction: column;
		gap: 14px;
	}
}

/* CF7 mette i due campi di una riga dentro un solo <p> e li separa con <br>. */
.eptcf7-row > p {
	display: flex;
	gap: 14px;
	width: 100%;
	margin: 0;
}
.eptcf7-row br,
.wpcf7:has(.eptcf7-row) .wpcf7-form br {
	display: none;
}
@media (max-width: 600px) {
	.eptcf7-row > p {
		flex-direction: column;
	}
}

/* Il pulsante Invia sta dentro un <p>: centro il paragrafo, non solo l'input. */
.wpcf7:has(.eptcf7-row) .wpcf7-form p:has(.wpcf7-submit) {
	text-align: center;
}
.wpcf7:has(.eptcf7-row) .wpcf7-spinner {
	display: none;
}
.wpcf7:has(.eptcf7-row) form.submitting .wpcf7-spinner {
	display: block;
}
