/* Shared form-control surfaces (inline error, required indicator) — one source for every
   form-associated component instead of thirteen identical per-component rules. */

:is(
	sh-checkbox,
	sh-checkbox-group,
	sh-combobox,
	sh-input-file,
	sh-input-text,
	sh-markdown-editor,
	sh-passcode,
	sh-radio-group,
	sh-rating,
	sh-select,
	sh-slider,
	sh-stepper,
	sh-switch,
	sh-textarea
) {
	&::part(error) {
		font-weight: 600;
		color: var(--sh-color-danger-20);
	}

	&::part(required-indicator-asterisk) {
		color: var(--sh-color-danger-20);
	}

	&::part(required-indicator-text) {
		font-style: italic;
		font-weight: 400;
	}
}

/* Secondary text stays proportional to the inherited control text. Rating compensates for its enlarged stars. */
:is(
	sh-checkbox,
	sh-combobox,
	sh-input-file,
	sh-input-text,
	sh-markdown-editor,
	sh-passcode,
	sh-select,
	sh-slider,
	sh-stepper,
	sh-switch,
	sh-textarea
)::part(error) {
	font-size: calc(0.75em / 0.875);
}
