.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 26px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .6s;
  background-color: #9E9CAA;
}


.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  background-color: white;
  -webkit-transition: .6s;
  transition: .6s;
  z-index: 10;
}

.slider::after {
  position: absolute;
  content: "on";
  left: 29px;
  font-size: 13px;
  text-transform: lowercase;
  -webkit-transition: .6s;
  transition: .6s;
  z-index: 1;
  margin-bottom: 3%;
  color: white;
}

input#laser1 + .slider {
  background-color:rgb(153, 48, 247);
}
input#laser2 + .slider {
    background-color:rgb(69,64,90);
}
input#laser3 + .slider {
    background-color:rgb(195, 60, 84);
}
input#laser1:checked + .slider {
    background-color:#ccc;
}
input#laser2:checked + .slider {
    background-color:#ccc;
}
input#laser3:checked + .slider {
    background-color:#ccc;
}
input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(34px);
}

input:checked + .slider:after {
  content: "off";
  left: 11px;
}

.slider.round {
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider.round:before {
  border-radius: 50%;
}
