#navigation {
    display: flex;
    flex-direction: column;
    padding: 25px;
    gap: 10px;
}

#menu {
    order: 1;
/*         margin-left: auto; */

    white-space: nowrap;

    flex: 0;
/*         padding: 25px; */
}

#menu > ul {
    overflow-y: auto;
    list-style: none;
    padding-left: 0!important;
}

/*     #menu > ul, #menu > div {
    width: fit-content;
    margin-left: auto;
} */

#menu ul {
    overflow-y: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    list-style: none;
    padding-left: 20px;
}

#menu li {
/*         overflow-y: hidden; */
    position: relative;
    display: flex;
    flex-direction: column;
     list-style: none;
    cursor: pointer;
    max-width: 350px;
}

#menu li span {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
}

#menu li .collapsible-label {
    display: flex;
    flex: 1
}

#menu li > ul {
    transition: height 200ms ease;
}

#menu li:not(.expanded) > ul {
    height: 0!important;
/*         transition: height 1000ms ease; */
}

#menu li.expanded > ul {
/*         max-height: 500px; */
}

#menu p {
    display: flex;
}

#menu li.item > a {
    padding-left: 24px;
}

#menu a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    color: var(--text-menu);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    flex: 1;
    padding: 2px 6px;
    font-weight: 400;
}

#menu a:hover {
    border-color: var(--text-menu);
}

#menu a.active {
    background: var(--background-active);
    color: var(--background-secondary);
    font-weight: 700;
}

#menu li ul {
    position: relative;
}

#menu li ul::before {
    content: "";
    display: flex;
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 10px;
    width: 2px;
    background: var(--background-highlight);
}

.active .collapse-button {
    background: none;
    color: var(--background-secondary);
}


.collapse-button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--background-secondary);
    border: 0;
    color: var(--text-menu);
/*         position: absolute; */
/*         top: 2px; */
/*         left: -18px; */
    transform: rotate(-90deg);
    transition: transform 200ms ease;
}

.expanded > .collapse-button,
.expanded > a > .collapse-button {
    transform: rotate(0);
}

.collapse-button svg {
    width: 14px;
}