.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  transition: background 0.2s;
  flex-shrink: 0;
}

.switch.on {
  background: #16a34a;
}

.thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.switch.on .thumb {
  transform: translateX(16px);
}

.compact {
  width: 30px;
  height: 18px;
}

.compact .thumb {
  width: 14px;
  height: 14px;
}

.compact.on .thumb {
  transform: translateX(12px);
}

.switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
