sh-progress-indicator-step {
	--sh-progress-indicator-color: var(--sh-color-neutral-0);
	--sh-progress-indicator-fill: var(--sh-color-neutral-100);
	--sh-progress-indicator-invalid-color: var(--sh-color-danger-50);

	/* Connector: solid once the step is done. Set on the host so a consumer can override it. */

	--connector-style: dashed;

	font-weight: 600;
	color: var(--sh-progress-indicator-color);

	/* Marker: a ring while the step is ahead, a filled disc once it is done. */

	&::part(marker) {
		color: var(--sh-progress-indicator-color);
		background-color: var(--sh-progress-indicator-fill);
		border: 2px dashed var(--sh-progress-indicator-color);
	}

	&:state(current)::part(marker) {
		border-style: solid;
		box-shadow: 3px 3px 0 0 var(--sh-progress-indicator-color);
	}

	&:state(complete) {
		--connector-style: solid;
	}

	&:state(complete)::part(marker) {
		color: var(--sh-progress-indicator-fill);
		background-color: var(--sh-progress-indicator-color);
		border-style: solid;
	}

	&::part(connector) {
		color: var(--sh-progress-indicator-color);
	}

	/* Label */

	&::part(label) {
		color: currentColor;
	}

	&:state(current)::part(label) {
		font-weight: 700;
	}

	&[href]::part(label) {
		text-decoration: underline;
		text-decoration-color: color-mix(in oklch, currentColor, transparent 75%);
		text-underline-offset: 0.3ex;
	}

	&[href]::part(label):hover {
		text-decoration-color: currentColor;
	}

	&::part(label):focus-visible {
		outline: var(--sh-focus-outline);
		outline-offset: var(--sh-focus-outline-offset);
	}

	&::part(description) {
		font-weight: 400;
	}

	/* Invalid */

	&:state(invalid)::part(marker) {
		color: var(--sh-progress-indicator-invalid-color);
		background-color: var(--sh-progress-indicator-fill);
		border-color: var(--sh-progress-indicator-invalid-color);
		border-style: solid;
	}
}

/* Forced colors */

@media (forced-colors: active) {
	sh-progress-indicator-step {
		&::part(marker) {
			color: CanvasText;
			background-color: Canvas;
			border-color: CanvasText;
		}

		&:state(complete)::part(marker) {
			color: Canvas;
			background-color: CanvasText;
		}

		&::part(connector) {
			color: CanvasText;
		}
	}
}
