/**
 * Storypath brand styles for Fluent Forms forms.
 *
 * Loaded only while the Fluent Forms plugin is active. Every value comes from
 * theme.json presets or the theme's custom properties, so forms follow the
 * brand set under Appearance > Storypath Settings. Logical properties keep
 * the file direction-neutral, so it works in right-to-left languages as is.
 *
 * Selectors match the plugin's own (checked against Fluent Forms 6.2.17)
 * and add no IDs or !important, so a site's own CSS can still override them.
 *
 * Fluent Forms also writes per-form styles from its form styler, with the
 * form's ID in the selector. Those win where both set the same property. To let
 * the brand style show, leave the form's styles unset there.
 */

.frm-fluent-form .ff-el-form-control {
	border: 1px solid var(--wp--preset--color--text-muted);
	border-radius: var(--wp--preset--border-radius--brand);
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--body);
	font-size: inherit;
	padding-block: 0.5em;
	padding-inline: 0.75em;
	box-sizing: border-box;
	max-inline-size: 100%;
}

.frm-fluent-form .ff-el-input--label label {
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
}

.frm-fluent-form .ff-btn-submit {
	background-color: var(--wp--preset--color--primary);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: var(--wp--preset--border-radius--brand);
	color: var(--wp--preset--color--on-primary);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	padding-block: var(--wp--preset--spacing--30);
	padding-inline: var(--wp--preset--spacing--50);
	inline-size: auto;
	block-size: auto;
	line-height: 1.2;
}

.frm-fluent-form .ff-btn-submit:is(:hover, :focus) {
	background-color: var(--wp--custom--storypath--button-hover-bg);
	border-color: var(--wp--custom--storypath--button-hover-bg);
	color: var(--wp--custom--storypath--button-hover-text);
}

.frm-fluent-form .ff-el-is-error .text-danger {
	color: var(--wp--preset--color--error);
}

.ff-message-success {
	border-inline-start: 4px solid var(--wp--preset--color--success);
	color: var(--wp--preset--color--text);
	padding-inline-start: var(--wp--preset--spacing--30);
}
