/* WS Form skin: WS Form prints its variables on :where([data-wsf-style-id]), so these win without
   touching the form's style settings in the DB. Its own defaults point at Bricks' --red/--darkred. */
.wsf-form {
	--wsf-form-font-size: var(--wp--preset--font-size--small);
	--wsf-form-font-size-small: var(--wp--preset--font-size--small);
	--wsf-field-font-size: var(--wp--preset--font-size--body);
	--wsf-field-border-radius: 0;
	--wsf-field-radio-size: 24px;
	--wsf-field-button-font-size: var(--wp--preset--font-size--body);
	--wsf-field-button-font-weight: 700;
	--wsf-field-button-text-transform: uppercase;
	--wsf-field-button-letter-spacing: 0.5px;
	--wsf-field-button-primary-color-background: var(--wp--preset--color--red);
	--wsf-field-button-primary-border-color: var(--wp--preset--color--red);
	--wsf-field-button-primary-color-background-hover: var(--wp--preset--color--darkred);
	--wsf-field-button-primary-border-color-hover: var(--wp--preset--color--darkred);
	--wsf-field-button-primary-color-background-focus: var(--wp--preset--color--darkred);
	--wsf-field-button-primary-border-color-focus: var(--wp--preset--color--darkred);
}

.wsf-form :is(input, textarea, button):focus-visible {
	/* WS Form zeroes the outline on :focus at (0,4,1). */
	outline: 2px solid var(--wp--preset--color--black) !important;
	outline-offset: 2px;
}

/* The success message replaces the form as its sibling, outside main.css's content-column cap. */
:is(.wp-block-group, .site-content, .site-content > article) > [data-wsf-message] {
	max-width: calc(var(--prose-cap) + 2 * var(--prose-inset));
	padding-inline: var(--prose-inset);
	margin-inline: auto;
}
[data-wsf-message] .wsf-alert {
	border-radius: 0;
}

:is(.site-content, .site-content > article) > :is(.wsf-form, [data-wsf-message]):last-child {
	margin-bottom: var(--wp--preset--spacing--content);
}

/* Privacy notice above the submit button (inc/integrations/ws-form.php): links as in the content. */
.wsf-form [data-text-editor] a:any-link {
	color: inherit;
}
.wsf-form [data-text-editor] p:first-child {
	margin-top: 0;
}
