.toggle-button {
  position: relative;
  display: inline-block;     
  width: 44px;
  height: 26px;
  vertical-align: middle;    
  margin-top: -1px;
}
.toggle-button.toggle-small {
  width: 30px;
  height: 18px;
}

.toggle-button input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 34px;
}

.toggle:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}
.toggle-small .toggle:before {
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
}

input:checked + .toggle {
  background-color: #08b;
}

input:checked + .toggle:before {
  -webkit-transform: translateX(18px);
  -ms-transform: translateX(18px);
  transform: translateX(18px);
}

.toggle-small input:checked + .toggle:before {
  -webkit-transform: translateX(12px);
  -ms-transform: translateX(12px);
  transform: translateX(12px);
}
