/**
 * Storypath brand styles for FluentCRM sign-up forms (SP-DOC-016, INT-08).
 *
 * FluentCRM's sign-up forms are made in Fluent Forms, so these rules style
 * Fluent Forms forms. They load only while both FluentCRM and Fluent Forms
 * are 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 reads its own colour properties, so setting them here also
 * brands the parts not styled below.
 *
 * Fluent Forms' form styler and block style settings write per-form CSS.
 * Those win where both set the same property. To let the brand style show,
 * leave them at their defaults.
 */

.fluentform {
	--fluentform-primary: var(--wp--preset--color--primary);
	--fluentform-danger: var(--wp--preset--color--error);
	--fluentform-secondary: var(--wp--preset--color--text-muted);
	--fluentform-border-radius: var(--wp--preset--border-radius--brand);
}

.fluentform .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%;
}

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

.fluentform .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;
}

.fluentform .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);
}

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

.fluentform .ff-el-is-error .text-danger,
.ff-errors-in-stack .error {
	color: var(--wp--preset--color--error);
}
