.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.toggle-label {
  font-size: 0.9rem;
}

.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  background-color: var(--bg-surface-active);
  border-radius: 999px;
  transition: background-color 150ms ease-out;
  pointer-events: none;
}

.switch-track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 150ms ease-out;
}

.switch input:checked + .switch-track {
  background-color: var(--accent);
}

.switch input:checked + .switch-track::before {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.4;
  cursor: not-allowed;
}
