.zf-wrap {
	--zf-accent: var(--e-global-color-accent, var(--wp--preset--color--primary, #2563eb));
	--zf-accent-text: #ffffff;
	--zf-border: rgba(128, 128, 128, 0.5);
	--zf-error: #b91c1c;
	--zf-ok-bg: #ecfdf5;
	--zf-ok-text: #065f46;
	--zf-error-bg: #fef2f2;
	max-width: 640px;
}

.zf-form label {
	display: block;
	font-weight: 600;
}

.zf-form p {
	margin: 0 0 1.1em;
}

.zf-control-wrap {
	display: block;
	margin-top: 0.35em;
	font-weight: 400;
}

.zf-form .zf-control {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0.65em 0.8em;
	border: 1px solid var(--zf-border);
	border-radius: 6px;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: 1.4;
}

.zf-form textarea.zf-control {
	min-height: 7em;
	height: auto;
	resize: vertical;
}

.zf-form select.zf-control option {
	background: #fff;
	color: #111;
}

.zf-form .zf-control:focus {
	outline: 2px solid var(--zf-accent);
	outline-offset: 1px;
	border-color: var(--zf-accent);
}

.zf-form .zf-invalid .zf-control {
	border-color: var(--zf-error);
}

.zf-error {
	display: block;
	margin-top: 0.3em;
	color: var(--zf-error);
	font-size: 0.875em;
	font-weight: 400;
}

.zf-error:empty {
	display: none;
}

.zf-choices {
	display: block;
}

.zf-choice,
.zf-acceptance {
	display: block;
	margin: 0.25em 0;
	font-weight: 400;
}

.zf-choice input,
.zf-acceptance input {
	margin-right: 0.5em;
}

:where(.zf-submit) {
	padding: 0.7em 1.6em;
	border: 0;
	border-radius: 6px;
	background: var(--zf-accent);
	color: var(--zf-accent-text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

:where(.zf-submit:hover, .zf-submit:focus) {
	filter: brightness(0.92);
}

.zf-submit {
	cursor: pointer;
}

.zf-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.zf-spinner {
	display: none;
	width: 1em;
	height: 1em;
	margin-left: 0.6em;
	vertical-align: middle;
	border: 2px solid var(--zf-border);
	border-top-color: var(--zf-accent);
	border-radius: 50%;
	animation: zf-spin 0.7s linear infinite;
}

.zf-submitting .zf-spinner {
	display: inline-block;
}

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

.zf-response:empty {
	display: none;
}

.zf-response {
	margin-top: 1em;
	padding: 0.8em 1em;
	border-radius: 6px;
}

.zf-response--ok {
	background: var(--zf-ok-bg);
	color: var(--zf-ok-text);
	border: 1px solid #6ee7b7;
}

.zf-response--error {
	background: var(--zf-error-bg);
	color: var(--zf-error);
	border: 1px solid #fca5a5;
}

/* Conditional fields. */
.zf-form [hidden] {
	display: none !important;
}

/* File input. */
.zf-form .zf-file {
	padding: 0.5em;
}

/* Cloudflare Turnstile + credit. */
.zf-turnstile {
	margin: 0 0 1em;
}

.zf-credit {
	margin: 1em 0 0;
	font-size: 0.8em;
	opacity: 0.75;
}

/* Honeypot: hidden from people, visible to bots. */
.zf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.zf-spinner {
		animation: none;
	}
}
