.onoffswitch {
    position: relative; width: 111px;
    -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
    /*margin-left: auto !important;*/
    /*margin-right: auto !important;*/
}
.onoffswitch-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.onoffswitch-label {
    display: block; overflow: hidden; cursor: pointer;
    border: 2px solid #FFFFFF; border-radius: 0;
}
.onoffswitch-inner {
    display: block; width: 200%; margin-left: -100%;
    transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner:before, .onoffswitch-inner:after {
    display: block; float: left; width: 50%; height: 47px; padding: 0; line-height: 47px;
    font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
    box-sizing: border-box;
}
.onoffswitch-inner:before {
    content: "ON";
    text-align: left;
    color: #fff !important;
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    padding-left: 25px;
}
.onoffswitch-inner:after {
    content: "OFF";
    text-align: right;
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    padding-right: 19px;
}
.onoffswitch-switch {
    display: block; width: 33px; margin: 7px;
    background: #FFFFFF;
    position: absolute; top: 0; bottom: 0;
    right:64px;
    border: 2px solid #FFFFFF; border-radius: 0;
    transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
    margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
    right: 0;
}
/* Basic styling */
.onoffswitch-checkbox {
    width: 2rem;
    height: 2rem;
    color: dodgerblue;
    vertical-align: middle;
    -webkit-appearance: none;
    background: none;
    border: 0;
    outline: 0;
    flex-grow: 0;
    border-radius: 50%;
    /*background-color: #FFFFFF;*/
    transition: background 300ms;
    cursor: pointer;
}


/* Pseudo element for check styling */
.onoffswitch-checkbox::before {
    content: "";
    color: transparent;
    display: block;
    width: inherit;
    height: inherit;
    border-radius: inherit;
    border: 0;
    background-color: transparent;
    background-size: contain;
    box-shadow: inset 0 0 0 1px #CCD3D8;
}