/*
 | Sidebar menu fixes
 |--------------------------------------------------------------------------
 | Backpack renders the sidebar nav with `.overflow-hidden`, which stops the
 | menu scrolling once it grows taller than the viewport. On phones that
 | permanently hides the items at the bottom of the menu, so re-enable
 | vertical scrolling and leave room below the last item.
 */
.sidebar > .sidebar-nav,
.sidebar > .sidebar-nav.overflow-hidden {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar > .sidebar-nav > .nav {
    padding-bottom: 1.5rem;
}

/* The shortcut buttons sit in the flow of the menu, so give them the same
   width on every screen size. */
.sidebar .nav-item .sidebar-shortcut {
    width: 145px;
    color: #fff !important;
}

/*
 | Support shortcuts (Report a Bug / Emergency)
 |--------------------------------------------------------------------------
 | These are menu items like the ones above them, not a floating overlay: a
 | fixed-position pair covered the page content on every screen. The gap marks
 | them as support links rather than another place in the app.
 */
.sidebar .nav-item.sidebar-shortcut-group {
    margin-top: 1.75rem;
}

/* The unread-count bubble sits on the corner of the Report a Bug button, which
   is why the anchor carries .position-relative. */
.sidebar .nav-item .sidebar-shortcut-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
    border-radius: 9px;
}

@media (max-width: 991.98px) {
    .sidebar > .sidebar-nav {
        max-height: 100vh;
    }
}
