/**
 * 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 {
	/* The widget sits on whatever surface the form paints (a yellow GF block, a
	   dark campaign form); that surface sets `color`, so currentColor is the
	   only pairing that is right everywhere. The old --wings-form-text-color
	   chain was the dark-form text, white on a yellow block. */
	--altcha-color-text: 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%;
}
