.switch {
    position: relative;
    display: inline-block;
    bottom: -1px;
    width: 55px;
    height: 20px;
    z-index: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color1);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 0px;
    bottom: 0px;
    background-color: var(--color4);
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--color3);
}

input:checked+.slider:before {
    transform: translateX(35px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}