/* Adapted from https://www.w3schools.com/howto/howto_css_switch.asp */

/* The switch - the box around the slider */
.toggle {
  position: relative;
  display: inline-block;
  width: 2em;
}

/* Hide default HTML checkbox */
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #272822;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 2em;
}

.slider:before {
  position: absolute;
  content: "";
  height: 0.5em;
  width: 0.5em;
  left: 4px;
  bottom: 6px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%; 
}

input:checked + .slider {
  background-color: #6c71c4;
}

input:checked + .slider:before {
  -webkit-transform: translateX(1em);
  -ms-transform: translateX(1em);
  transform: translateX(1em);
}