.toggler {
    /*width: 50px;*/
    /*margin: 40px auto;*/
}
.toggler input {
    display: none;
}
.toggler div {
    display: block;
    position: relative;
    width: 50px;
    height: 25px;
    border: 1px solid #d6d6d6;
    border-radius: 25px;
    background: #e4e8e8;
    cursor: pointer;
}
.toggler div::after {
    display: block;
    border-radius: 100%;
    background-color: #d7062a;
    content: '';
    -webkit-animation-name: toggler-size;
    animation-name: toggler-size;
    -webkit-animation-duration: .15s;
    animation-duration: .15s;
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
    -webkit-animation-direction: forwards;
    animation-direction: forwards;
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
    -webkit-animation-play-state: running;
    animation-play-state: running;
}
.toggler div::after,
.toggler div .toggler-on,
.toggler div .toggler-off {
    position: absolute;
    top: 50%;
    left: 25%;
    width: 15px;
    height: 15px;
    -webkit-transform: translateY(-50%) translateX(-50%);
    transform: translateY(-50%) translateX(-50%);
    -webkit-transition: left .15s ease-in-out, background-color .2s ease-out, width .15s ease-in-out, height .15s ease-in-out, opacity .15s ease-in-out;
    transition: left .15s ease-in-out, background-color .2s ease-out, width .15s ease-in-out, height .15s ease-in-out, opacity .15s ease-in-out;
}
.toggler input:checked + div::after,
.toggler input:checked + div .toggler-on,
.toggler input:checked + div .toggler-off {
    left: 75%;
}
.toggler input:checked + div::after {
    background-color: #50ac5d;
    -webkit-animation-name: toggler-size2;
    animation-name: toggler-size2;
}
.toggler .toggler-on,
.toggler .toggler-off {
    opacity: 1;
    z-index: 2;
}
.toggler input:checked + div .toggler-off,
.toggler input:not(:checked) + div .toggler-on {
    width: 0;
    height: 0;
    opacity: 0;
}
.toggler .path {
    fill: none;
    stroke: #fefefe;
    stroke-width: 7px;
    stroke-linecap: round;
    stroke-miterlimit: 10;
}

@-webkit-keyframes toggler-size {
    0%,
    100% {
        width: 15px;
        height: 15px;
    }
    50% {
        width: 9px;
        height: 9px;
    }
}

@keyframes toggler-size {
    0%,
    100% {
        width: 15px;
        height: 15px;
    }
    50% {
        width: 9px;
        height: 9px;
    }
}
@-webkit-keyframes toggler-size2 {
    0%,
    100% {
        width: 15px;
        height: 15px;
    }
    50% {
        width: 9px;
        height: 9px;
    }
}
@keyframes toggler-size2 {
    0%,
    100% {
        width: 15px;
        height: 15px;
    }
    50% {
        width: 9px;
        height: 9px;
    }
}

.toggler input:disabled + div .toggler-off {
    background-color: #999999;
    border-radius: 100%;
}