.switch-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.switch-row__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.switch-row__label-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);

  line-height: 1;
}

.switch-row__hint {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.35;

  margin-top: 4px;
}

.switch-row--hero .switch-row__label {
  font-weight: var(--weight-semibold);
}

.switch {
  width: 32px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  position: relative;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-out);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-out);
}

.switch--sm {
  width: 26px;
  height: 14px;
}
.switch--sm::after {
  width: 10px;
  height: 10px;
}

.switch-row:has(.switch-row__input:checked) .switch {
  background: var(--accent-primary);
}
.switch-row:has(.switch-row__input:checked) .switch::after {
  transform: translateX(14px);
}
.switch-row:has(.switch-row__input:checked) .switch--sm::after {
  transform: translateX(12px);
}

.switch-row__input:focus-visible ~ .switch {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
