.togglebox {
  width: 40px;
  height: 20px;
  margin-right: .5em;
  position: relative;
  display: inline-block;
  vertical-align: sub;
}

.togglebox__track {
  width: 90%;
  height: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background: #AAAAAA;
  border-radius: 10px;
  box-shadow: inset 0px 1px 3px 0 rgba(0, 0, 0, .5);

  transition: all .25s;
  cursor: pointer;
}

.togglebox__thumb {
  width: 50%;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;

  background: white;
  border-radius: 50%;
  box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, .75);

  transition: all .25s;
  cursor: pointer;
}

.togglebox__thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;

  background: #AAAAAA;
  border-radius: 50%;
  opacity: 0;

  transition: all .25s;
  pointer-events: none;
}

.togglebox__thumb:hover::before {
  transform: scale(2);
  opacity: .25;
}

input:checked + .togglebox .togglebox__track {
  background: #9ccbf3;
}

input:checked + .togglebox .togglebox__thumb {
  transform: translateX(100%);
  background: #2D8DD2;
  box-shadow: -1px 1px 3px 0 rgba(0, 0, 0, .75);
}

input:checked + .togglebox .togglebox__thumb::before {
  background: inherit;
}

input:disabled + .togglebox {
  opacity: .5;
  pointer-events: none;
}


