/*
 * Contact Form 7 normalisation.
 *
 * The theme's form styling (.form / .field / .row) is applied by giving CF7's
 * form the same classes. These few rules neutralise the extra elements CF7
 * injects around it, which otherwise add height the original forms did not have.
 *
 * Loaded only when CF7 is active — see inc/enqueue.php.
 */

/*
 * CF7 wraps the form in an extra <div class="wpcf7">. Where the original form
 * was itself a grid or flex child — the contractors page puts it directly in
 * `.contact-grid` — that wrapper became the child instead, and the form stopped
 * stretching the way it used to. `display:contents` removes the wrapper from
 * layout so the form is once again the direct child.
 */
.wpcf7 {
	display: contents;
}

/* CF7's status region is for screen readers; it should occupy no space. */
.wpcf7 .screen-reader-response {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* CF7 wraps every control in a span; the theme's layout expects the control. */
.wpcf7-form .wpcf7-form-control-wrap {
	display: block;
}

/* Keep the response message out of the flow until there is one to show. */
.wpcf7-form .wpcf7-response-output {
	margin: 1rem 0 0;
}

.wpcf7-form.init .wpcf7-response-output,
.wpcf7-form.resetting .wpcf7-response-output {
	display: none;
}

/* The spinner sits beside the submit button rather than below it. */
.wpcf7-form .wpcf7-spinner {
	position: absolute;
	margin: 0 0 0 .75rem;
}

.wpcf7-form .btn {
	position: relative;
}

/* Inline validation messages. */
.wpcf7-form .wpcf7-not-valid-tip {
	font-size: .82rem;
	margin-top: .35rem;
}
