.form-switch {
  display: inline-block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;  
}

.form-switch i {
  position: relative;
  display: inline-block;
  background-color: #e6e6e6;
  vertical-align: text-bottom;
  transition: all 0.3s linear;
}

.form-switch input:not(:checked) + i::before {
 background-color: #fff;
 }

.form-switch i::before {
  content: "";
  position: absolute;
  left: 0;
  
  transform: translate3d(2px, 2px, 0) scale3d(1, 1, 1);
  transition: all 0.25s linear;
}

.form-switch i::after {
  content: "";
  position: absolute;
  left: 0;
  background-color: #fff;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.24);
  transform: translate3d(2px, 2px, 0);
  transition: all 0.2s ease-in-out;
}

.form-switch:active i::after {
  transform: translate3d(2px, 2px, 0);
}

.form-switch input { display: none; }
