﻿.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switchLabel {
    position: relative;
    top: 5px;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    -webkit-transition: .4s;
    transition: .4s;
    border: solid 1px #4a4a4a;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background-color: #4a4a4a;
    -webkit-transition: .4s;
    transition: .4s;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Use as follows
    
OFF

<label class="switch">
  <input type="checkbox">
  <span class="slider"></span>
</label>

ON

<label class="switch">
  <input type="checkbox" checked>
  <span class="slider"></span>
</label>

Add ' round' to the class tag on the span to get a round one
*/
