/* Bigham Agency form skin — `.bigham-form` on an Elementor Pro Form widget
 * (Advanced → CSS Classes). Colours, borders, radius and typography come from the
 * widget's own Style controls (tokens / globals); this file carries only what Pro
 * has no control for, so every form matches the Figma Input Field + Button:
 *   - 44px fields and button (--button-height), Figma field padding
 *   - the submit button's thin Figma arrow (same SVG as the Button widget), nudge on hover
 *   - a two-tone focus ring (crimson outline over a light inner ring), visible on
 *     both paper and dark sections
 * Gaps: set Pro's Columns/Rows Gap in plain units (rem/px). Pro negates the value
 * (`margin: -{{SIZE}}`), which is invalid CSS with a var() token.
 * Enqueued only on pages that render a Form widget (Plugin::maybe_enqueue_form_skin).
 *
 * Allowed exceptions (see references/token-system.md):
 *   - 2px focus-outline width / offset and inner ring (project-wide focus-ring convention).
 *   - 1.25em arrow box (as in button.css) and the arrow as an SVG mask data URI.
 */

.elementor-widget-form.bigham-form .elementor-field-group .elementor-field {
	min-block-size: var(--button-height);
	padding: var(--space-1) var(--space-3);
}

/* Multi-line fields (Figma textarea): the field padding on every side and the
 * body line height, so the Rows setting gives Figma's box (4 rows ≈ 140px). */
.elementor-widget-form.bigham-form .elementor-field-group textarea.elementor-field {
	padding: var(--space-3);
	line-height: var(--line-height-text-main);
}

/* Doubled class to beat Pro's `.elementor-button.elementor-size-*` minimum height. */
.elementor-widget-form.bigham-form .elementor-button {
	min-block-size: var(--button-height);
}

/* Thin arrow after the label: the Figma arrow, coloured by the button text.
 * A flex item of the content wrapper, so it never changes the line height. */
.bigham-form .elementor-button-content-wrapper {
	align-items: center;
	gap: var(--space-2);
}

.bigham-form .elementor-button-content-wrapper::after {
	content: "";
	flex-shrink: 0;
	inline-size: 1.25em;
	block-size: 1.25em;
	margin-block: -0.125em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M4.167 10H15M10 4.167 15.833 10 10 15.833' stroke='black' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M4.167 10H15M10 4.167 15.833 10 10 15.833' stroke='black' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform var(--duration-fast) var(--ease-standard);
}

.bigham-form .elementor-button:hover .elementor-button-content-wrapper::after {
	transform: translateX(calc(var(--space-1) / 2));
}

.bigham-form .elementor-field:focus-visible,
.bigham-form .elementor-button:focus-visible {
	outline: 2px solid var(--theme-accent);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--light-100);
}

@media (prefers-reduced-motion: reduce) {
	.bigham-form .elementor-button-content-wrapper::after {
		transition: none;
	}

	.bigham-form .elementor-button:hover .elementor-button-content-wrapper::after {
		transform: none;
	}
}
