/**
 * Bind the vendored ALTCHA widget to the Dreamkit form surface.
 *
 * The vendored stylesheet paints the widget with `color: currentColor`, so it
 * only looks right as long as some ancestor happens to set the text colour of
 * the surface the form sits on. On a dark form surface where the theme sets
 * colour per element (labels, inputs) instead of on a container, the widget
 * falls back to the body text colour and lands dark-on-dark.
 *
 * So we bind it to the same surface tokens the rest of the form uses, in the
 * order the theme resolves them, and only then fall back to inheriting.
 */

.wings-altcha {
	--altcha-color-text: var(
		--wings-form-text-color,
		var(
			--wings-forms-text-color,
			var( --wings-campaign-sidebar-form-text-color, currentColor )
		)
	);
	--altcha-color-base: transparent;
	--altcha-color-border: var( --wings-form-border-color, #a0a0a0 );

	color: var( --altcha-color-text );
	margin-block: 1rem 0.75rem;
}

/* The vendored 260px cap looks cramped inside a full-width form footer. */
.wings-altcha .altcha {
	max-width: 100%;
}
