/* Desktop push sidebar: fixed under the navbar (DOM lives next to its toggle for a11y #3).
   top/height refined in JS from the header bottom; keep dark bg so any 1px seam isn't white. */
#pushSidebarContainer {
    position: fixed;
    top: 56px; /* fallback; JS sets exact header bottom - 1px */
    left: 0;
    z-index: 990;
    width: 220px;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.3s ease;
    background-color: #212529;
    /* Close any subpixel gap under the dark navbar */
    box-shadow: 0 -2px 0 0 #212529;
}
#pushSidebarContainer.collapsed {
    width: 0;
}
#pushSidebar {
    opacity: 1;
    transition: opacity 0.3s ease;
    min-height: 100%;
}
#pushSidebarContainer.collapsed #pushSidebar {
    opacity: 0;
}

/* Reserve space for the fixed sidebar so main content is not covered */
@media (min-width: 1025px) {
    .app-layout {
        padding-left: 220px;
        box-sizing: border-box;
        transition: padding-left 0.3s ease;
    }
    .app-layout.sidebar-collapsed {
        padding-left: 0;
    }
}

.sidebar-toggle {
    display: none;
    padding: .25rem 0.75rem .25rem 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: .25rem;
}
.sidebar-icon {
    transition: transform 0.3s ease;
}
.spin-img-pos {
    transform: rotate(180deg);
}
.spin-img-neg {
    transform: rotate(-180deg);
}
.offcanvas {
    width: 100%; /* Default overlay sidebar width for mobile */
}

@media (min-width: 700px) { /* Tablet and desktop screens */
    .offcanvas {
        width: 15rem;
    }
}
/* Display the push sidebar button for viewports 1025px and larger */
@media (min-width: 1025px) {
    #pushSidebarButton {
        display: block;
    }
    .offcanvas {
        display: none;
    }
}

/* Display the overlay sidebar button for viewports smaller than 1025px */
@media (max-width: 1024px) {
    #overlaySidebarButton {
        display: block;
    }
    #pushSidebarContainer {
        display: none;
    }
    .app-layout {
        padding-left: 0;
    }
}

.search-button {
    padding: .25rem 0.75rem .25rem 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: .25rem;
}

.scroll-no-bar {
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-no-bar::-webkit-scrollbar {
    display: none;
}
