.switch {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  width: 48px;
  height: 28px;
  background-clip: padding-box;
  background-color: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 28px;
  cursor: pointer;
  animation: all 0.2s ease-in-out;
}
.switch *,
.switch *::before,
.switch *::after {
  box-sizing: inherit;
}
.switch::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  z-index: 1;
  transition: all 0.2s ease-in-out;
}
.switch.active {
  background-color: #007bff;
  border-color: rgb(76.5, 162.6, 255);
  justify-content: flex-end;
}
