/**
 * Form controls: checkbox, radio, switch, text field. Native inputs stay in the
 * accessibility tree; the visible box follows their state.
 */
.fsc-check,
.fsc-radio,
.fsc-switch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 2rem;
	cursor: pointer;
}

.fsc-check__input,
.fsc-radio__input,
.fsc-switch__input,
.fsc-size-option__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.fsc-check__box {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 1.125rem;
	height: 1.125rem;
	border: 1px solid var(--fs-line-field);
	background: var(--fs-ground);
	color: transparent;
}

.fsc-check__input:checked + .fsc-check__box {
	border-color: var(--fs-ink);
	background: var(--fs-ink);
	color: var(--fs-inverse-text);
}

.fsc-check__input:focus-visible + .fsc-check__box,
.fsc-radio__input:focus-visible ~ .fsc-radio__mark,
.fsc-switch__input:focus-visible + .fsc-switch__track,
.fsc-size-option__input:focus-visible + .fsc-size-option__box {
	outline: var(--fs-focus);
	outline-offset: 2px;
}

.fsc-check__label {
	flex: 1;
	font-size: var(--fs-text-small);
}

/* Radio (sort sheet rows). */
.fsc-radio {
	justify-content: space-between;
	min-height: 3.25rem;
	padding: 0 var(--fs-space-4);
	border-top: 1px solid var(--fs-line-soft);
	font-size: var(--fs-text-body);
}

.fsc-radio__mark {
	width: 1.125rem;
	height: 1.125rem;
	border: 1px solid var(--fs-line-field);
}

.fsc-radio__input:checked ~ .fsc-radio__label {
	font-weight: 800;
}

.fsc-radio__input:checked ~ .fsc-radio__mark {
	border: 5px solid var(--fs-ink);
}

/* Switch. */
.fsc-switch__track {
	position: relative;
	flex: none;
	width: 2.375rem;
	height: 1.375rem;
	background: var(--fs-ground-3);
	transition: background-color var(--fs-t-hover);
}

.fsc-switch__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 1.125rem;
	height: 1.125rem;
	background: var(--fs-ground);
	transition: transform var(--fs-t-hover);
}

.fsc-switch__input:checked + .fsc-switch__track {
	background: var(--fs-ink);
}

.fsc-switch__input:checked + .fsc-switch__track::after {
	transform: translateX(1rem);
}

.fsc-switch__label {
	flex: 1;
	font-size: var(--fs-text-small);
}

.fsc-switch__input:checked ~ .fsc-switch__label {
	font-weight: 600;
}

/* Size chip. */
.fsc-size-option {
	position: relative;
	cursor: pointer;
}

.fsc-size-option__box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--fs-tap);
	height: var(--fs-tap);
	padding: 0 var(--fs-space-2);
	border: 1px solid var(--fs-line-field);
	font-size: var(--fs-text-meta);
	font-weight: 600;
}

.fsc-size-option__input:checked + .fsc-size-option__box {
	border-color: var(--fs-ink);
	background: var(--fs-ink);
	color: var(--fs-inverse-text);
}

/* Text field. */
.fsc-field {
	display: flex;
	flex-direction: column;
	gap: var(--fs-space-1);
	min-width: 0;
}

.fsc-field__label {
	color: var(--fs-ink-2);
	font-size: var(--fs-text-caption);
	font-weight: 600;
}

.fsc-field__input {
	width: 100%;
	height: 2.5rem;
	padding: 0 0.625rem;
	border: 1px solid var(--fs-line-field);
	background: var(--fs-ground-2);
	font-size: var(--fs-text-meta);
}

.fsc-field__input:focus-visible {
	outline: var(--fs-focus);
	outline-offset: 2px;
}

/* Quantity stepper (product page, cart lines). */
.fsc-qty {
	display: inline-flex;
	border: 1px solid var(--fs-line-field);
}

.fsc-qty__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	border: 0;
	background: transparent;
}

.fsc-qty__input {
	width: 3rem;
	height: 3.5rem;
	border: 0;
	border-right: 1px solid var(--fs-line-soft);
	border-left: 1px solid var(--fs-line-soft);
	background: transparent;
	font-weight: 800;
	text-align: center;
	appearance: textfield;
}

.fsc-qty__input::-webkit-inner-spin-button,
.fsc-qty__input::-webkit-outer-spin-button {
	margin: 0;
	appearance: none;
}

