/**
 * Anonymous Timeline — composer switch.
 *
 * Entirely self-contained: no dependence on theme checkbox classes, no native
 * input visible. A compact pill switch that reads as part of the composer
 * footer rather than a form field.
 */

.vt-anon-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 14px 0 auto; /* sit against the Cancel/Publish group */
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	line-height: 1;
}

.vt-anon-toggle input {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	pointer-events: none;
}

/* the pill */
.vt-anon-toggle .vt-anon-switch {
	flex: 0 0 auto;
	width: 30px;
	height: 18px;
	border-radius: 9px;
	background: rgba(0, 0, 0, 0.18);
	position: relative;
	transition: background-color 0.15s ease;
}

.vt-anon-toggle .vt-anon-switch::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}

.vt-anon-toggle.is-on .vt-anon-switch {
	background: currentColor;
}

.vt-anon-toggle.is-on .vt-anon-switch::after {
	transform: translateX(12px);
}

.vt-anon-toggle input:focus-visible ~ .vt-anon-switch {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* the label */
.vt-anon-toggle .vt-anon-label {
	font-size: 13px;
	font-weight: 500;
	opacity: 0.7;
	white-space: nowrap;
}

.vt-anon-toggle:hover .vt-anon-label,
.vt-anon-toggle.is-on .vt-anon-label {
	opacity: 1;
}

/* forced mode: informational, not interactive */
.vt-anon-toggle.is-forced {
	cursor: default;
}

.vt-anon-toggle.is-forced .vt-anon-switch {
	opacity: 0.75;
}

@media (max-width: 640px) {
	.vt-anon-toggle .vt-anon-label {
		max-width: 110px;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}
