.published-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: 3.4rem;
	height: 1.9rem;
	padding: 2px;
	border-radius: 9999px;
	border: 1px solid rgba(231, 229, 228, 0.95);
	background: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	user-select: none;
	box-shadow:
		0 2px 7px rgba(15, 23, 42, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);
	transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 180ms ease;
}

.published-toggle:focus {
	outline: none;
}
.published-toggle:focus-visible {
	box-shadow:
		0 0 0 2px rgba(251, 191, 36, 0.35),
		0 2px 8px rgba(15, 23, 42, 0.1);
}

.published-toggle-track {
	position: absolute;
	inset: 0;
	border-radius: 9999px;
	transition: box-shadow 200ms ease, background-color 200ms ease;
	background: linear-gradient(180deg, rgba(247, 247, 246, 0.95), rgba(239, 237, 235, 0.92));
}

.published-toggle-knob {
	position: relative;
	width: 1.48rem;
	height: 1.48rem;
	border-radius: 9999px;
	background: linear-gradient(180deg, #ffffff, #f8fafc);
	box-shadow:
		0 2px 8px rgba(15, 23, 42, 0.14),
		0 1px 1px rgba(255, 255, 255, 0.85) inset;
	transform: translateX(0);
	transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}

/* ON (published) */
.published-toggle-on {
	border-color: rgba(217, 119, 6, 0.55);
	background: rgba(251, 191, 36, 0.28);
}
.published-toggle-on .published-toggle-track {
	background: linear-gradient(180deg, rgba(217, 119, 6, 0.96), rgba(180, 83, 9, 0.95));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.published-toggle-on .published-toggle-knob {
	transform: translateX(1.5rem);
	box-shadow:
		0 2px 9px rgba(146, 64, 14, 0.32),
		0 1px 1px rgba(255, 255, 255, 0.85) inset;
}

.state-toggle-field {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	cursor: pointer;
}

.state-toggle-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.state-toggle-field .published-toggle {
	pointer-events: none;
}

.state-toggle-input:checked + .published-toggle {
	border-color: rgba(217, 119, 6, 0.55);
	background: rgba(251, 191, 36, 0.28);
}

.state-toggle-input:checked + .published-toggle .published-toggle-track {
	background: linear-gradient(180deg, rgba(217, 119, 6, 0.96), rgba(180, 83, 9, 0.95));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.state-toggle-input:checked + .published-toggle .published-toggle-knob {
	transform: translateX(1.5rem);
	box-shadow:
		0 2px 9px rgba(146, 64, 14, 0.32),
		0 1px 1px rgba(255, 255, 255, 0.85) inset;
}

.state-toggle-input:focus-visible + .published-toggle {
	box-shadow:
		0 0 0 2px rgba(251, 191, 36, 0.35),
		0 2px 8px rgba(15, 23, 42, 0.1);
}

.state-toggle-label {
	font-size: 0.92rem;
	line-height: 1.2;
	color: #44403c;
	transition: color 180ms ease, transform 220ms ease, opacity 180ms ease;
	opacity: 0.92;
}

.state-toggle-input:checked + .published-toggle + .state-toggle-label {
	color: #047857;
	transform: translateY(-0.5px);
	opacity: 1;
}

.state-toggle-input:not(:checked) + .published-toggle + .state-toggle-label {
	color: #6b7280;
}

.state-inline-label {
	display: inline-block;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.15;
	transition: color 180ms ease, opacity 180ms ease, transform 220ms ease;
	opacity: 0.95;
}

.state-inline-label-on {
	color: #047857;
	transform: translateY(-0.5px);
}

.state-inline-label-off {
	color: #6b7280;
}

.state-chip {
	display: inline-flex;
	align-items: center;
	border-radius: 9999px;
	padding: 0.15rem 0.52rem;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0.01em;
	transition: color 180ms ease, background-color 180ms ease, box-shadow 220ms ease;
}

.state-chip-on {
	background: rgba(16, 185, 129, 0.12);
	color: #047857;
	box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}

.state-chip-off {
	background: rgba(120, 113, 108, 0.12);
	color: #57534e;
	box-shadow: inset 0 0 0 1px rgba(120, 113, 108, 0.16);
}
