/* Shared Gravity Forms feedback. Keep messages in the document flow even in
   the fixed-row homepage/About skins and after GF's AJAX theme re-render. */
.gform_wrapper.gform_wrapper .gform_validation_errors,
.gform_wrapper.gform_wrapper .validation_error,
.gform_wrapper.gform_wrapper .gfield_description.validation_message {
	display: block !important;
}

.gform_wrapper.gform_wrapper .mpf-error:not(:empty) {
	display: block;
	color: #c02b0a;
	font-size: 14px;
	line-height: 20px;
	margin-top: 10px;
}

.gform_wrapper.gform_wrapper .mag-turnstile-retry {
	background: transparent;
	color: inherit;
	box-shadow: none;
	border: 0;
}

/* A failed background reload must never erase an accepted submission. */
.gform_confirmation_wrapper.gform_confirmation_wrapper {
	display: block !important;
	padding: 24px;
	border-radius: 24px;
	background: var(--background-color, #fdfdf5);
	color: var(--text-color, #636363);
}

.gform_wrapper .gfield { scroll-margin-block: calc(var(--header-height, 92px) + 24px); }

.gform_wrapper.gform_wrapper .gfield_description.validation_message {
	margin-block: 10px 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #c02b0a;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
}

.gform_wrapper.gform_wrapper .gfield_error :is(input:not([type="hidden"]):not([type="submit"]), textarea, select, .mag-contact-language__trigger) {
	border-color: #c02b0a !important;
}

.gform_wrapper.gform_wrapper .validation_error {
	margin-block: 0 16px;
	color: var(--text-color, #636363);
}

/* Announce the aggregate message without duplicating the field messages in
   the visual layout. Provider/global errors without field errors stay visible. */
.gform_wrapper.gform_wrapper .validation_error--fields,
.gform_wrapper.gform_wrapper .gform_validation_errors:has(.validation_error--fields) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.mag-contact-form .gform_wrapper.gform_validation_error .gform_fields {
	grid-template-rows: repeat(3, minmax(68px, auto)) !important;
}

.mag-contact-form .gform_wrapper.gform_validation_error .gform_footer {
	position: static !important;
	width: 100% !important;
	height: auto !important;
	margin-block-start: 16px !important;
}

.mag-contact-form .gform_wrapper.gform_wrapper .gform_footer :is(input, button)[type="submit"] {
	flex-shrink: 0;
	max-width: 100%;
	transition: background-color .3s ease, color .3s ease;
}

.mag-contact-form .gform_wrapper.gform_wrapper .gfield_consent_label a:hover {
	text-decoration: none;
	opacity: 1;
}

@media (width >= 1200px) {
	.mag-contact-form .gform_wrapper.gform_validation_error form {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, calc(50% - 2px));
		gap: 10px;
	}

	.mag-contact-form .gform_wrapper.gform_validation_error :is(.gform_body, .gform_fields) {
		display: contents !important;
	}

	.mag-contact-form .gform_wrapper.gform_validation_error #field_1_15 {
		display: flex;
		flex-direction: column;
		grid-column: 3;
		margin-left: 6px;
	}

	.mag-contact-form .gform_wrapper.gform_validation_error .ginput_container_textarea {
		flex: 1;
		min-height: 146px;
	}

	.mag-contact-form .gform_wrapper.gform_validation_error textarea {
		position: absolute;
		inset: 0;
		height: 100% !important;
	}

	.mag-contact-form .gform_wrapper.gform_validation_error #field_1_14 {
		grid-column: 1 / 3;
		grid-row: 3;
		margin-top: 14px;
	}

	.mag-contact-form .gform_wrapper.gform_validation_error .gform_footer:has(> .mag-turnstile) {
		grid-column: 3;
		grid-row: 3;
		width: auto !important;
		margin: 14px 0 0 6px !important;
	}
}

@media (min-width: 577px) and (max-width: 1199px) {
	.mag-contact-form .gform_wrapper.gform_validation_error .gform_fields {
		grid-template-rows: repeat(4, minmax(min-content, auto)) !important;
	}
}

@media (max-width: 576px) {
	.mag-contact-form .gform_wrapper.gform_validation_error .gform_fields {
		grid-template-rows: repeat(6, minmax(min-content, auto)) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mag-contact-form .gform_wrapper.gform_wrapper .gform_footer :is(input, button)[type="submit"] { transition: none; }
}
