/* smartWpForms - the generic states of every theme form (form.smwp-form). A form's look belongs to its <id>.css. */

/* the honeypot: ordinary markup, kept out of view here; forms.js adds aria-hidden / tabindex / autocomplete */
.smwp-form .form-extra {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.smwp-form [hidden] {
	display: none !important;
}

@media (scripting: enabled) {
	.smwp-form:not([data-form-ready]) [data-show-if] {
		display: none;
	}
}

/* runtime field messages and the live region: a subtle entrance */
.smwp-form .form-error {
	opacity: 0;
	transform: translateY(-2px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.smwp-form .form-error.is-shown {
	opacity: 1;
	transform: none;
}

.smwp-form .form-status {
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.smwp-form .form-status:empty {
	display: none;
}

.smwp-form .form-status.is-shown {
	opacity: 1;
	transform: none;
}

/* accepted: the fields and the button give way to the confirmation. A body holding its own live region
   ([data-form-status], class smwp-form--slot) keeps its content: only the submit control goes, its own CSS hides more */
.smwp-form.is-sent:not(.smwp-form--slot) .form-body,
.smwp-form.is-sent .form-actions,
.smwp-form.is-sent [type="submit"],
.smwp-form.is-sent [type="image"],
.smwp-form.is-sent button:not([type]) {
	display: none;
}

/* one request at a time: block pointer interaction while the request is pending */
.smwp-form.is-submitting {
	pointer-events: none;
}

.smwp-form.is-submitting [type="submit"] {
	cursor: progress;
	opacity: 0.7;
}

.smwp-form-diagnostic {
	margin: 1em 0;
	padding: 0.75em 1em;
	border-left: 4px solid #d63638;
	background: #fff8f8;
	color: #1d2327;
	font: 13px/1.5 sans-serif;
}

@media (prefers-reduced-motion: reduce) {
	.smwp-form .form-error,
	.smwp-form .form-status {
		transition: none;
		transform: none;
	}
}
