/* === Slide-off-screen collapsible sidebar (sits on top of AdminLTE) === */

/* Smooth slide animation */
.main-sidebar {
    transition: margin-left 0.3s ease-in-out;
}

.content-wrapper,
.main-header,
.main-footer {
    transition: margin-left 0.3s ease-in-out;
}

/* === Toggle button inside the sidebar (top-right corner) === */
.sidebar-toggle-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 1px;
}

/* === Floating "show sidebar" button — visible only when sidebar is hidden === */
.sidebar-show-btn {
    position: fixed;
    top: 0.75rem;
    left: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    color: #333;
    cursor: pointer;
    z-index: 1051;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.15s ease;
}

.sidebar-show-btn:hover {
    background: #f5f5f5;
}

.sidebar-show-btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 1px;
}

/* === Hidden state === */
html.sidebar-hidden .main-sidebar {
    margin-left: -250px;
}

html.sidebar-hidden .content-wrapper,
html.sidebar-hidden .main-header,
html.sidebar-hidden .main-footer {
    margin-left: 0 !important;
}

html.sidebar-hidden .sidebar-show-btn {
    display: inline-flex;
}
/* Make room for the show-sidebar button in the header */
html.sidebar-hidden .main-header {
    padding-left: 3.25rem;
}
