// Sidebar navigation menu
// ----------------------------------------------------------------------------

.sidebar-menu,
.sidebar-menu ul {
    padding-left: 0;
}

.sidebar-menu .header {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 20px;
    padding: 7px 5px 7px 0;
    text-transform: uppercase;
}

.sidebar-menu li {
    list-style: none;
}

.sidebar-menu a {
    color: var(--text-color-dark);
    display: block;
    line-height: 20px;
    padding: 4px 5px 10px 0;
}

.sidebar-menu .fa {
    color: var(--text-color-dark);
    filter: opacity(50%);
    font-size: 17px;
    margin-right: 4px;
    width: 20px;
}

.sidebar-menu li:not(.submenu-active).active {
    border-radius: var(--border-radius);
    font-weight: 500;
}

.sidebar-menu li:not(.submenu-active).active a,
.sidebar-menu li:not(.submenu-active).active .fa {
    color: var(--color-primary);
    filter: opacity(100%);
}

.sidebar-menu .menu-open .treeview-icon {
    transform: rotate(90deg);
}

.treeview {
    position: relative;
}

.treeview-menu {
    display: none;
    margin-bottom: 12px;
    margin-top: -4px;
}

.sidebar-menu .active .treeview-menu {
    display: block;
}

.treeview-menu a {
    color: var(--text-color);
    font-size: var(--font-size-sm);
    line-height: 20px;
    padding: 3px 5px 3px 28px;
}

.treeview-menu a .fa {
    color: var(--text-color);
    filter: opacity(50%);
    font-size: var(--font-size-base);
    margin-right: 4px;
    width: 16px;
}

.treeview .treeview-icon {
    position: absolute;
    top: 6px;
    right: 1px;
    transition: transform 0.25s ease;
    width: auto;
}

.treeview.menu-open .treeview-icon {
    transform: rotate(90deg);
}

body.easyadmin-sidebar-width-compact .main-sidebar {
    overflow: visible;

    @media(min-width: 992px) {
        width: 24px;
    }
}

@media(min-width: 992px) {
    body.easyadmin-sidebar-width-compact .sidebar-menu a {
        padding: 7px 5px 7px 0;
    }

    body.easyadmin-sidebar-width-compact .sidebar-menu li span,
    body.easyadmin-sidebar-width-compact .sidebar-menu li .treeview-icon {
        display: none;
    }
    body.easyadmin-sidebar-width-compact .sidebar-menu li {
        position: relative;
    }
    body.easyadmin-sidebar-width-compact .sidebar-menu li:hover {
        background: var(--body-bg);
        border-radius: var(--border-radius);
        width: var(--sidebar-width);
        z-index: $zindex-modal-backdrop;
    }

    .easyadmin-sidebar-width-compact .sidebar-menu li.header {
        height: 0;
        overflow: hidden;
        padding: 0;
        width: 0;
    }

    body.easyadmin-sidebar-width-compact .sidebar-menu .treeview-menu li:hover {
        width: unset;
    }
    body.easyadmin-sidebar-width-compact .sidebar-menu li:hover span {
        display: inline-block;
        left: 32px;
        position: absolute;
        top: 7px;
    }

    body.easyadmin-sidebar-width-compact .sidebar-menu li:hover .treeview-menu a {
        padding: 3px 5px 3px 11px;
    }
    body.easyadmin-sidebar-width-compact .sidebar-menu li:hover .treeview-menu span {
        position: static;
    }
    body.easyadmin-sidebar-width-compact .sidebar-menu li .fa {
        font-size: 21px;
        width: 24px;
    }
    body.easyadmin-sidebar-width-compact .sidebar-menu .treeview-menu li .fa {
        font-size: var(--font-size-base);
        width: 16px;
    }

    .easyadmin-sidebar-width-compact .sidebar-menu > li > .treeview-menu {
        padding-top: 5px;
        padding-bottom: 5px;
        border-bottom-right-radius: 4px;
    }
    .easyadmin-sidebar-width-compact .sidebar-menu > li > a > span,
    .easyadmin-sidebar-width-compact .sidebar-menu > li > .treeview-menu {
        display: none !important;
    }

    .easyadmin-sidebar-width-compact .sidebar-menu > li:hover > a > span,
    .easyadmin-sidebar-width-compact .sidebar-menu > li:hover > .treeview-menu {
        background: var(--body-bg);
        display: block !important;
        position: absolute;
        left: 32px;
        width: calc(var(--sidebar-width) - 32px);
    }
    .easyadmin-sidebar-width-compact .sidebar-menu > li:hover > .treeview-menu {
        top: 32px;
        margin-left: 0;
    }
}
