:local(.toggle) {
  position: relative;
  display: inline-block;
  color: var(--color-brand);
  box-sizing: border-box;
  width: 48px;
  height: 24px;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-medium);
  transition: all 0.3s;
}

:local(.toggle.selected) {
  background-color: currentColor;
}

:local(.toggle):after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 99px;
  position: absolute;
  top: 1px;
  left: 1px;
  background-color: white;
  transition: all 0.3s;
  box-shadow: 2px 2px 6px var(--color-shadow);
}

:local(.toggle.selected):after {
  left: 25px;

  background-color: white;
}

:local(.toggle.small) {
  width: 28px;
  height: 17px;
}

:local(.toggle.small):after {
  width: 13px;
  height: 13px;
}

:local(.toggle.small.selected):after {
  left: 12px;
}
