
.sidebar-subheading {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    align-items: flex-start !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;

    &:hover {
        background-color: #ecf1f3 !important;
    }
}

.sidebar-subheading--button {
    border-top: 2px solid #cdd3d6 !important;
}

html .sidebar-subheading--button,
html .sidebar-item--level-2-button,
html .sidebar-item--level-3-button {
    font-size: 1.125rem;
    text-transform: capitalize;
    text-align: left;
    padding: 1rem;
    flex: 1 1 auto;
    justify-content: space-between;
    color: #242934;
    letter-spacing: normal;

    div:first-child {
        order: 1;

        svg {
            transform: scale(2);
        }
    }

    [aria-expanded='true'] {
        color: white;
    }

    &:focus-visible {
        background-color: rgba(2, 156, 253, 0.15) !important;
        outline-offset: 2px;
        outline: solid 2px #0085b3;
    }
}

.sidebar-item--highlighted:not(.sidebar-subheading) {
    outline-offset: 2px;
    outline: solid 2px #0085b3;
}

.sidebar-subheading--button[aria-expanded='true'] {
    div:first-child {
        transform: rotateZ(270deg);
    }
}

.sidebar-subheading--button[aria-expanded='false'] {
    div:first-child {
        transform: rotateZ(90deg);
    }
}

.sidebar-item--level-2-button,
.sidebar-item--level-3-button {
    align-items: center !important;

    svg {
        transform: scale(1.8) !important;
    }
}

.sidebar-item--level-2-button[aria-expanded='true'],
.sidebar-item--level-3-button[aria-expanded='true'] {
    > div {
        transform: rotateZ(180deg);
    }
}

.sidebar-item--level-2-button[aria-expanded='false'],
.sidebar-item--level-3-button[aria-expanded='false'] {
    > div {
        transform: rotateZ(90deg);
    }
}

.sidebar-subheading-action {
    display: none !important;
}

.sidebar-item {
    &:hover {
        background-color: #ecf1f3 !important;
    }

    &[data-selected='true'] {
        background-color: transparent !important;
    }

    &[data-selected='true'] a:first-child {
        background-color: #002664;
        color: white !important;
    }

    a:first-child,
    button:first-child {
        font-size: 1rem;
        padding: 1rem;
        font-weight: 700;
        color: #242934;
    }

    button > div > svg:nth-of-type(1) {
        display: none;
    }

    a > div {
        display: none;
    }

    a:first-child {
        padding-left: 2rem;
    }
}

.sidebar-item + .sidebar-subheading {
    margin-top: 1rem !important;
}

.sidebar-item--level-2-button {
    padding-left: 2rem !important;
}

.sidebar-item--level-3-button {
    padding-left: 2rem !important;
}

.sidebar-item--child-of-level-2 a:first-child,
.sidebar-item--child-of-level-2 button {
    padding-left: 3rem !important;
}

.sidebar-item--child-of-level-3 a:first-child,
.sidebar-item--child-of-level-3 > button {
    padding-left: 4rem !important;
}

.sidebar-item a:nth-child(2):last-child,
.sidebar-item--child-of-level-2 a:nth-child(2):last-child {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%)
}

.sidebar-version {
    display: flex;
    gap: 1em;
}

.sidebar-version button {
    font-size: 1rem;
    font-weight: 700;
    color: #242934;
    padding: 0.5em 0.75em;
    border: 1px solid #242934;
    background-color: white;
    border-radius: 4px
}

.sidebar-version button.selected {
    background-color: #002664;
    color: white;
}
