.switch {
    position: relative;
    display: inline-block;
    width: 2.5em;
    height: 1em;
    margin-left: 1em;
    margin-top: -.6em;
    box-sizing: border-box;
    z-index: 50;
    border-radius: 34px;
  }
  
  .switch input { 
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    box-sizing: border-box;
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.75) inset;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: .85em;
    width: .85em;
    left: .02em;
    bottom: 0.1em;
    background-color: rgb(243, 243, 243);
    box-shadow: 0px 0px 3px 0px rgba(0,0,0,0.75) inset;
    -webkit-transition: .4s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: #5f5f5f;
  }
  
  
  input:checked + .slider:before {
    -webkit-transform: translateX(2em);
    -ms-transform: translateX(2em);
    transform: translateX(1.57em);
  }
  
  /* Rounded sliders */
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }