/* ==========================================================================
   Contact Form 7, wearing the theme's form styling

   CF7 nests each control inside its own <label> and wraps it in a
   .wpcf7-form-control-wrap span, so the theme's .field rules — which assume
   the label and the input are siblings — need a little help to line up. The
   input styling itself is inherited: .field input/select/textarea are
   descendant selectors, so they already reach CF7's controls.
   ========================================================================== */

/* Label and control stack, the way the hand-written form does. */
.wpcf7 .field > label {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.wpcf7 .wpcf7-form-control-wrap {
	display: block;
}

/* CF7 marks required fields itself; the asterisk in the label is ours. */
.wpcf7 .field label .req {
	color: #c0392b;
}

/* The submit button. CF7 renders an <input>, so it carries no arrow icon —
   it still needs the full-width block treatment the theme's button has. */
.wpcf7 input.wpcf7-submit {
	width: 100%;
	margin-top: 28px;
	justify-content: center;
}

/* The spinner sits beside the button while a message is in flight. */
.wpcf7 .wpcf7-spinner {
	display: block;
	margin: 12px auto 0;
}

/* Validation messages under a field. */
.wpcf7 .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: .82rem;
	font-weight: 500;
	color: #c0392b;
}

.wpcf7 .field input.wpcf7-not-valid,
.wpcf7 .field select.wpcf7-not-valid,
.wpcf7 .field textarea.wpcf7-not-valid {
	border-color: #c0392b;
	background: #fdf6f5;
}

/* The response banner, matching .form-notice. */
.wpcf7 form .wpcf7-response-output {
	margin: 22px 0 0;
	padding: 14px 18px;
	border: 1.5px solid var(--line);
	border-radius: 12px;
	font-size: .92rem;
	line-height: 1.5;
	color: var(--ink);
	background: var(--cream);
}

.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--green-400);
	background: rgba(125, 145, 102, .12);
	color: var(--green-700);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
	border-color: #e2b8b2;
	background: #fdf6f5;
	color: #97331f;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
	border-color: #e2b8b2;
	background: #fdf6f5;
	color: #97331f;
}

/* The small print under the button. */
.wpcf7 .form-foot {
	font-size: .82rem;
	color: var(--muted);
	text-align: center;
	margin: 16px 0 0;
}

@media (max-width: 700px) {
	.wpcf7 .form-grid {
		grid-template-columns: 1fr;
	}
}
