/*
 * dbi services · Neve Child Theme
 * assets/css/form-send-wait.css — the waiting state on the Send button and
 * the security-check message (inc/form-send-wait.php). Loaded only on a page
 * whose contact form or comment form carries the Turnstile box.
 *
 * --dbi-check-error is the error frame's colour, the same as on the
 * corporate website's forms; the palette has no error colour of its own.
 */

/* ── The message at the box: one frame, focused and announced ── */
.dbi-check-msg {
	--dbi-check-error: #b3261e;
	display: block;
	flex: 0 0 100%;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 24px;
	padding: 16px;
	background: #fff;
	border: 1px solid var( --dbi-check-error );
	border-radius: 8px;
	text-align: left;
}
.dbi-check-msg:focus {
	outline: 2px solid var( --dbi-check-error );
	outline-offset: 2px;
}
.dbi-check-msg > * {
	display: block;
	margin: 0;
	padding: 0;
	font-family: var( --f-body, inherit );
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	color: var( --dbi-check-error );
}
.comment-form .dbi-check-msg {
	margin: 12px 0 16px;
}

/* The plug-in's notice at the top of the contact form, when the message at the box replaces it. */
.gform_wrapper .dbi-check-moved {
	display: none !important;
}

/* The screen-reader line while the send waits. */
.dbi-check-live {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

/* ── Contact form: Gravity Forms' own spinner, drawn in the legacy markup ──
   Gravity puts span.gform-loader into the button on every send and marks the
   button .gform-has-spinner; the legacy styles give the span no look. The
   text turns transparent and the ring takes its place, so the width holds.
   Scoped to the legacy markup: Gravity's own themes draw the spinner. */
body .gform_wrapper.gform_legacy_markup_wrapper .gform_button.gform-has-spinner {
	position: relative;
	color: transparent;
	-webkit-text-fill-color: transparent;
	cursor: progress;
}
body .gform_wrapper.gform_legacy_markup_wrapper .gform_button.gform-has-spinner .gform-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	box-sizing: border-box;
	border: 2px solid #fff;
	border-right-color: transparent;
	border-radius: 50%;
	animation: dbi-check-spin 800ms linear infinite;
}

/* ── Comment form: a ring beside the button ── */
.comment-form .dbi-check-wait {
	cursor: progress;
}
.dbi-check-spin {
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-left: 12px;
	box-sizing: border-box;
	vertical-align: middle;
	border: 2px solid var( --teal-dark, #007972 );
	border-right-color: transparent;
	border-radius: 50%;
	animation: dbi-check-spin 800ms linear infinite;
}

@keyframes dbi-check-spin {
	to { transform: rotate( 360deg ); }
}

/* Reduced motion: no ring; the button turns to its outline form instead, the text stays. */
@media ( prefers-reduced-motion: reduce ) {
	body .gform_wrapper.gform_legacy_markup_wrapper .gform_button.gform-has-spinner .gform-loader,
	.dbi-check-spin {
		display: none;
	}
	body .gform_wrapper.gform_legacy_markup_wrapper .gform_button.gform-has-spinner,
	body .comment-form .dbi-check-wait,
	body .comment-form .dbi-check-wait:hover {
		background: #fff;
		color: var( --teal-dark, #007972 );
		-webkit-text-fill-color: var( --teal-dark, #007972 );
		border-color: var( --teal-dark, #007972 );
	}
}
