/**
 * D-Marche – component states theme.json can't express.
 * All values come from theme.json tokens (--wp--preset--* / --wp--custom--*).
 */

/* ---------- Buttons: secondary hover + disabled ---------- */
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline-boxed .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent-5);
	border-color: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--base);
}

.wp-element-button:disabled,
.wp-element-button[aria-disabled="true"],
.wp-block-button__link[aria-disabled="true"] {
	background-color: var(--wp--custom--gray--disabled);
	border-color: var(--wp--custom--gray--disabled);
	color: var(--wp--custom--gray--600);
	cursor: not-allowed;
}

.wp-block-button.is-style-outline .wp-block-button__link[aria-disabled="true"],
.wp-block-button.is-style-outline-boxed .wp-block-button__link[aria-disabled="true"] {
	background-color: transparent;
	border-color: var(--wp--custom--gray--400);
	color: var(--wp--custom--gray--400);
}

/* ---------- Form fields (Text Field / Text Area) ---------- */
:where(
	input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
	input[type="password"], input[type="search"], input[type="number"], input[type="date"],
	select, textarea
) {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--field--border);
	border-radius: var(--wp--custom--field--radius);
	color: var(--wp--custom--field--text);
	font-family: var(--wp--preset--font-family--jost);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
	padding: var(--wp--custom--field--padding-block) var(--wp--custom--field--padding-inline);
}

:where(input, select, textarea):focus-visible {
	border-color: var(--wp--custom--field--border-focus);
	outline: 2px solid var(--wp--custom--field--border-focus);
	outline-offset: 0;
}

:where(input, select, textarea)[aria-invalid="true"] {
	border-color: var(--wp--custom--field--border-invalid);
	color: var(--wp--custom--field--border-invalid);
}

:where(input, select, textarea):disabled {
	background-color: var(--wp--custom--gray--50);
	color: var(--wp--custom--gray--500);
	cursor: not-allowed;
}

::placeholder {
	color: var(--wp--custom--gray--500);
	opacity: 1;
}

/* Checkbox / radio accent */
input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--wp--preset--color--accent-2);
	height: 20px;
	width: 20px;
}

/* ---------- Gravity Forms (Orbital theme) ---------- */
.gform-theme--orbital {
	--gf-color-primary: var(--wp--preset--color--accent-5);
	--gf-color-primary-rgb: 239, 71, 111;
	--gf-color-primary-contrast: var(--wp--preset--color--base);
	--gf-color-in-ctrl-primary: var(--wp--preset--color--accent-2);
	--gf-ctrl-border-color: var(--wp--custom--field--border);
	--gf-ctrl-border-color-focus: var(--wp--custom--field--border-focus);
	--gf-ctrl-border-color-error: var(--wp--custom--field--border-invalid);
	--gf-color-danger: var(--wp--custom--status--red-500);
	--gf-radius: var(--wp--custom--field--radius);
	--gf-font-family-base: var(--wp--preset--font-family--jost);
	--gf-ctrl-font-size: var(--wp--preset--font-size--medium);
	--gf-ctrl-btn-radius: 999px;
}
