﻿/* From Uiverse.io by vinodjangid07 */
#checkbox {
    display: none;
}

.toggle {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition-duration: .5s;
}

.bars {
    width: 100%;
    height: 4px;
    background-color: white;
    border-radius: 4px;
}

#bar2 {
    transition-duration: .8s;
}

#bar1, #bar3 {
    width: 70%;
}

#checkbox:checked + .toggle .bars {
    position: absolute;
    transition-duration: .5s;
}

#checkbox:checked + .toggle #bar2 {
    transform: scaleX(0);
    transition-duration: .5s;
}

#checkbox:checked + .toggle #bar1 {
    width: 100%;
    transform: rotate(45deg);
    transition-duration: .5s;
}

#checkbox:checked + .toggle #bar3 {
    width: 100%;
    transform: rotate(-45deg);
    transition-duration: .5s;
}

#checkbox:checked + .toggle {
    transition-duration: .5s;
    transform: rotate(180deg);
}
