.toggle-button {
    position: relative;
    top: 50%;
    width: 74px;
    height: auto;
    margin: 0px auto 0 auto;
    overflow: hidden;
}

.toggle-button,
.toggle-button .layer {
    border-radius: 100px;
}

.toggle-button {
    border-radius: 20px;
    border: 1px solid #EAF7FB;
    background: #EAF7FB;
}

.toggle-button .checkbox {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    height: 20px;
}

.toggle-button .knobs {
    z-index: 2;
}

.toggle-button .layer {
    width: 100%;
    background-color: #ebf7fc;
    transition: 0.3s ease all;
    z-index: 1;
}

.toggle-button .knobs:before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 10px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    padding: 9px 4px;
    background-color: #828282;
    border-radius: 50%;
    transition: 0.3s ease all, left 0.3s cubic-bezier(0.18, 0.89, 0.35, 1.15);
}

.toggle-button .checkbox:active+.knobs:before {
    width: 46px;
    border-radius: 100px;
}

.toggle-button .checkbox:checked:active+.knobs:before {
    margin-left: -26px;
}

.toggle-button .checkbox:checked+.knobs:before {
    content: "";
    left: 42px;
    background-color: #f44336;
}

.toggle-button .checkbox:checked~.layer {
    background-color: #fcebeb;
}
