.label-switch {
  display: inline-block;
  vertical-align: middle;
  width: 52px;
  border-radius: 16px;
  box-sizing: border-box;
  height: 32px;
  position: relative;
  cursor: pointer;
  -ms-flex-item-align: center;
  -webkit-align-self: center;
  align-self: center;
}
.label-switch .checkbox {
  width: 52px;
  border-radius: 16px;
  box-sizing: border-box;
  height: 32px;
  background: #e5e5e5;
  z-index: 0;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  appearance: none;
  border: none;
  cursor: pointer;
  position: relative;
  -webkit-transition-duration: 300ms;
  transition-duration: 300ms;
}
.label-switch .checkbox:before {
  content: ' ';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 48px;
  border-radius: 16px;
  box-sizing: border-box;
  height: 28px;
  background: #fff;
  z-index: 1;
  -webkit-transition-duration: 300ms;
  transition-duration: 300ms;
  -webkit-transform: scale(1);
  transform: scale(1);
}
.label-switch .checkbox:after {
  content: ' ';
  height: 28px;
  width: 28px;
  border-radius: 28px;
  background: #fff;
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  -webkit-transform: translateX(0px);
  transform: translateX(0px);
  -webkit-transition-duration: 300ms;
  transition-duration: 300ms;
}
.label-switch input[type="checkbox"] {
  display: none;
}
.label-switch input[type="checkbox"]:checked + .checkbox {
  background: #4cd964;
}
.label-switch input[type="checkbox"]:checked + .checkbox:before {
  -webkit-transform: scale(0);
  transform: scale(0);
}
.label-switch input[type="checkbox"]:checked + .checkbox:after {
  -webkit-transform: translateX(20px);
  transform: translateX(20px);
}
html.android .label-switch input[type="checkbox"] + .checkbox {
  -webkit-transition-duration: 0;
  transition-duration: 0;
}
html.android .label-switch input[type="checkbox"] + .checkbox:after,
html.android .label-switch input[type="checkbox"] + .checkbox:before {
  -webkit-transition-duration: 0;
  transition-duration: 0;
}
