.switch {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-12) 0;
}

.switch__label {
  position: relative;
  display: flex;
  gap: var(--space-10);
  align-items: center;
  min-height: var(--control-height);
  font-weight: 500;
  cursor: pointer;
}

.switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch__track {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  background: var(--switch-off);
  border-radius: var(--radius);
  transition: background var(--duration);
}

.switch__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  content: "";
  background: var(--switch-knob);
  border-radius: var(--radius);
  box-shadow: var(--shadow-knob);
  transition: transform var(--duration);
}

.switch__input:checked + .switch__track {
  background: var(--primary);
}

.switch__input:checked + .switch__track::after {
  transform: translateX(18px);
}

.switch__input:focus-visible + .switch__track {
  box-shadow: var(--shadow-focus);
}

.switch__help {
  font-size: var(--font-size-small);
  color: var(--muted);
}
