/**
 * @author "Ahmad Hejazee"
 * @see https://www.w3schools.com/howto/howto_css_switch.asp
 * 
 * Example code:
 * @code
 *  <label class="arjang-switch">
 *    <input type="checkbox" id="ahmad">
 *    <span class="arjang-switch-slider"></span>
 *  </label>
 * @endcode
 */
.arjang-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.arjang-switch input { 
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  filter: alpha(opacity=0);
  -moz-opacity: 0;
  -khtml-opacity: 0;
  opacity: 0;
  
  width: 0;
  height: 0;
}

.arjang-switch .arjang-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cccccc;
  
  -moz-transition: .4s;
  -webkit-transition: .4s;
  transition: .4s;
  
  -moz-border-radius: 34px;
  -webkit-border-radius: 34px;
  -o-border-radius: 34px;
  border-radius: 34px;
}

.arjang-switch .arjang-switch-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  right: 4px;
  bottom: 4px;
  background-color: white;
  
  -moz-transition: .4s;
  -webkit-transition: .4s;
  transition: .4s;
  
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  -o-border-radius: 50%;
  border-radius: 50%;
}

.arjang-switch input:checked + .arjang-switch-slider {
  background-color: #449a44;
}

.arjang-switch input:focus + .arjang-switch-slider {
  -moz-box-shadow: 0 0 1px #449a44;
  -webkit-box-shadow: 0 0 1px #449a44;
  -o-box-shadow: 0 0 1px #449a44;
  box-shadow: 0 0 1px #449a44;
}

.arjang-switch input:checked + .arjang-switch-slider:before {
  -moz-transform: translateX(-26px);
  -webkit-transform: translateX(-26px);
  -ms-transform: translateX(-26px);
  transform: translateX(-26px);
}

.arjang-switch input + .arjang-switch-slider::before {
  content: "\f00d";
  font-family: "Font Awesome 5 Free";
  color: #cccccc;
}
.arjang-switch input:checked + .arjang-switch-slider::before {
  content: "\f00c";
  color: #449a44;
}
