.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 20px;
    cursor: pointer;
}

    .toggle-switch input {
        width: 0;
        height: 0;
        cursor: pointer;
    }

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

    .switch-slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 4px;
        bottom: 3px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
        cursor: pointer;
    }

input:checked + .switch-slider {
    background-color: #2196F3;
}

.toggle-switch input[type=checkbox]::after, .toggle-switch input[type=checkbox]:checked::after {
    position: absolute;
    width: 40px;
    height: 17px;
    font-size: 10px;
    z-index: 10;
    bottom: 0;
}

.toggle-switch input[type=checkbox]:checked::after {
    content: attr(data-on);
    text-align: left;
    padding-left: 6px;
    color: #fff;
}

.toggle-switch input[type=checkbox]::after {
    content: attr(data-off);
    text-align: right;
    padding-right: 5px;
    color: #fff;
}

input:focus + .switch-slider {
    box-shadow: none;
}

input:checked + .switch-slider:before {
    -webkit-transform: translateX(23px);
    -ms-transform: translateX(23px);
    transform: translateX(23px);
}


label.toggle-switch.disabled {
    opacity: 0.5;
    cursor: default;
}

    label.toggle-switch.disabled input, label.toggle-switch.disabled span, label.toggle-switch.disabled .switch-slider:before {
        cursor: default;
    }

/* Rounded switch-sliders */
.switch-slider.round {
    border-radius: 34px;
}

    .switch-slider.round:before {
        border-radius: 50%;
        z-index: 11;
    }
