/* GCTC Category Sort - "Show in-stock first" switch, sits beside the sort dropdown. */
.woocommerce .gctc-instock-toggle {
	float: right;
	margin: 0 1.25em 1em 0;
}
.gctc-instock-form {
	margin: 0;
}
.gctc-instock-label {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	min-height: 2.4em; /* Same line box as the dropdown, so nothing shifts. */
	margin: 0;
	cursor: pointer;
	font-size: inherit;
	line-height: 1.2;
	white-space: nowrap;
	user-select: none;
}
/* Native checkbox stays focusable and announced (role="switch"); the span draws it. */
.gctc-instock-input {
	position: absolute;
	left: 0;
	top: 50%;
	width: 2.4em;
	height: 1.35em;
	margin: -0.675em 0 0;
	opacity: 0;
	cursor: pointer;
}
.gctc-instock-switch {
	position: relative;
	flex: 0 0 auto;
	width: 2.4em;
	height: 1.35em;
	border-radius: 1em;
	background: #c9cfcb;
	transition: background-color 0.15s ease;
}
.gctc-instock-switch::after {
	content: "";
	position: absolute;
	top: 0.15em;
	left: 0.15em;
	width: 1.05em;
	height: 1.05em;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}
.gctc-instock-input:checked + .gctc-instock-switch {
	background: var(--e-global-color-accent, #87bf4c);
}
.gctc-instock-input:checked + .gctc-instock-switch::after {
	transform: translateX(1.05em);
}
.gctc-instock-input:focus-visible + .gctc-instock-switch {
	outline: 2px solid var(--e-global-color-secondary, #2e4036);
	outline-offset: 2px;
}
.gctc-instock-apply {
	margin-left: 0.5em;
}
@media (prefers-reduced-motion: reduce) {
	.gctc-instock-switch,
	.gctc-instock-switch::after {
		transition: none;
	}
}
/* Phones: the dropdown and the switch each get their own line. */
@media (max-width: 767px) {
	.woocommerce .gctc-instock-toggle {
		float: right;
		clear: right;
		margin: 0 0 1em;
	}
}
