.toggle {
  position: relative;
  display: inline-block;
  width: 90px;
  padding: 4px;
  border-radius: 30px;
}
.toggle:before, .toggle:after {
  content: '';
  display: table;
}
.toggle:after {
  clear: both;
}
.toggle-bg {
  position: absolute;
  top: 0px;
  left: 2px;
  width: 90%;
  height: 80%;
  background-color: #96c0d2;
  border-radius: 30px;
  border: 4px solid #81C0D5;
  transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid red;
  border-radius: 30px;
  z-index: 2;
  opacity: 0;
  cursor: pointer;
}
.toggle-switch {
  top: -4px;
  left: -2px;
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: 50px;
  background-color: #F5EB42;
  border: 4px solid #E4C74D;
  border-radius: 50%;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-switch-figure {
  position: absolute;
  bottom: -15px;
  left: -51px;
  display: block;
  width: 80px;
  height: 30px;
  border: 8px solid #D4D4D2;
  border-radius: 20px;
  background-color: #fff;
  transform: scale(0.4);
  transition: all 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toggle-switch-figure:after {
  content: '';
  display: block;
  position: relative;
  top: -65px;
  right: -42px;
  width: 15px;
  height: 15px;
  border: 8px solid #D4D4D2;
  border-radius: 100%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotateZ(70deg);
  background-color: #fff;
}
.toggle-switch-figure:before {
  content: '';
  display: block;
  position: relative;
  top: -25px;
  right: -10px;
  width: 30px;
  height: 30px;
  border: 8px solid #D4D4D2;
  border-radius: 100%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotateZ(30deg);
  background-color: #fff;
}
.toggle-switch-figureAlt {
  content: '';
  position: absolute;
  top: 5px;
  left: 2px;
  width: 8px;
  height: 8px;
  background-color: #EFEEDA;
  border-radius: 100%;
  border: 3px solid #DEE1C5;
  box-shadow: 22px -7px 0 -3px #FCFCFC, 47px -7px 0 -3px #FCFCFC, 50px 5px 0 -5px #FCFCFC, 60px 2px 0 -2px #FCFCFC, 35px 2px 0 -3.5px #FCFCFC, 24px 17px 0 -2px #FCFCFC, 48px 14px 0 -3px #FCFCFC;
  transition: all 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(0);
}
.toggle-switch-figureAlt:before {
  content: '';
  position: absolute;
  top: -6px;
  left: 10px;
  width: 7px;
  height: 7px;
  background-color: #EFEEDA;
  border-radius: 100%;
  border: 3px solid #DEE1C5;
}
.toggle-switch-figureAlt:after {
  content: '';
  position: absolute;
  top: 9px;
  left: 7px;
  width: 2px;
  height: 2px;
  background-color: #EFEEDA;
  border-radius: 100%;
  border: 2px solid #DEE1C5;
}
.toggle-input:checked ~ .toggle-switch {
  margin-left: 0;
  border-color: #DEE1C5;
  background-color: #FFFDF2;
}
.toggle-input:checked ~ .toggle-bg {
  background-color: #484848;
  border-color: #3b3d45;
}
.toggle-input:checked ~ .toggle-switch .toggle-switch-figure {
  margin-left: 30px;
  opacity: 0;
  transform: scale(0.1);
}
.toggle-input:checked ~ .toggle-switch .toggle-switch-figureAlt {
  transform: scale(1);
}