/* sidebar.css */

.sidebar-indicator {
    position: fixed;
    top: 30%; /* Position at 30% from the top */
    left: 0;
    width: 40px; /* Small width for the icon */
    height: 40px; /* Small height for the icon */
    background-color: rgba(0, 0, 0, 0.7); /* Dark background for the icon */
    border-radius: 0 5px 5px 0; /* Rounded right corners */
    z-index: 990; /* Smaller than main nav */
    transition: all 0.3s ease-in-out; /* Smooth transition for width and position */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff; /* Icon color */
    font-size: 20px; /* Icon size */
    overflow: hidden; /* Hide content when collapsed */
}

.sidebar-indicator.expanded {
    width: 100%; /* Expand to full width */
    height: calc(100% - 60px); /* Adjust height to account for navbar */
    top: 60px; /* Start below the navbar */
    left: 0; /* Move to left when expanded */
    border-radius: 0; /* No border-radius when expanded */
    background-color: rgba(0, 0, 0, 0.9); /* Darker background when expanded */
    z-index: 9998; /* Higher z-index when expanded */
}

.sidebar-icon {
    display: block; /* Show icon when collapsed */
}

.sidebar-indicator.expanded .sidebar-icon {
    display: none; /* Hide icon when expanded */
}

.sidebar-menu-container {
    display: none; /* Hidden by default */
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* Enable scrolling for long menus */
    color: #fff;
    position: relative; /* Needed for absolute positioning of close button */
}

.sidebar-indicator.expanded .sidebar-menu-container {
    display: block; /* Show when expanded */
}

/* Styles for the expanded menu */
.sidebar-menu-container .nav-pills .nav-link {
    color: #fff;
    margin-bottom: 10px;
    text-align: left;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.sidebar-menu-container .nav-pills .nav-link.active,
.sidebar-menu-container .nav-pills .nav-link:hover {
    background-color: #007bff; /* Bootstrap primary blue */
    color: #fff;
}

/*.nav-pills .nav-link.completed + .nav-link:not(.completed) {*/
/*    background-color: #FFD700; !* Gold *!*/
/*}*/

/* The "In Progress" Liquid Glass Card */
/*.nav-pills .nav-link.completed + .nav-link:not(.completed) {*/
/*    position: relative;*/
/*    background: rgba(255, 215, 0, 0.1) !important; !* Soft Gold Tint *!*/
/*    backdrop-filter: blur(10px) saturate(120%) !important;*/
/*    -webkit-backdrop-filter: blur(10px) saturate(120%);*/

/*    !* Golden Edge Highlight *!*/
/*    border: 1px solid rgba(255, 215, 0, 0.4) !important;*/
/*    border-left: 6px solid #FFD700 !important;*/

/*    border-radius: 12px;*/
/*    color: #856404 !important; !* Darker gold for text readability *!*/
/*    font-weight: 500;*/

/*    !* Subtle pulsing glow to show it's the current step *!*/
/*    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);*/
/*    transition: all 0.3s ease-in-out;*/
/*}*/

/*!* Hover effect to make it feel responsive *!*/
/*.nav-pills .nav-link.completed + .nav-link:not(.completed):hover {*/
/*    background: rgba(255, 215, 0, 0.2) !important;*/
/*    transform: translateY(-1px);*/
/*    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);*/
/*}*/

/*!* The "Glass Sheen" overlay *!*/
/*.nav-pills .nav-link.completed + .nav-link:not(.completed)::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 50%;*/
/*    background: linear-gradient(*/
/*            to bottom,*/
/*            rgba(255, 255, 255, 0.2) 0%,*/
/*            rgba(255, 255, 255, 0) 100%*/
/*    );*/
/*    pointer-events: none;*/
/*}*/
:root {
    --active-glass: #9a8415; /* iOS Blue */
    --active-glow: rgba(238, 218, 6, 0.4);
}

/* Use a high-specificity selector or !important to override the nav-pills defaults */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    position: relative !important;
    background: rgba(0, 122, 255, 0.2) !important;
    backdrop-filter: blur(15px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(200%);

    /* The "Liquid" Border */
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-left: 6px solid var(--active-glass) !important;

    color: var(--active-glass) !important;
    font-weight: 700 !important;

    /* Outer "Liquid" Bloom */
    box-shadow: 0 0 20px var(--active-glow),
    inset 0 0 10px rgba(255, 255, 255, 0.2) !important;
}

/* Glossy highlight for the Active state */
.nav-pills .nav-link.active::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 8px;
    right: 8px;
    height: 40%;
    background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.3) 10%,
            rgba(255, 255, 255, 0) 100%
    );
    border-radius: 10px 10px 0 0;
    pointer-events: none;
}

.sidebar-close-btn {
    position: absolute;
    top: 10px; /* Adjust as needed */
    right: 5%; /* Position from the right */
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000; /* Ensure it's above other content in the menu */
    background: none;
    border: none;
    padding: 0;
}

/* New class for main content when sidebar is active and collapsed */
@media (max-width: 767.98px) {
    .main-content-with-sidebar {
        margin-left: 40px; /* Make space for the collapsed sidebar */
    }
}

/* Media query to hide the sidebar on larger screens and show the original tabs */
@media (min-width: 768px) {
    .sidebar-indicator {
        display: none; /* Hide sidebar on screens >= sm */
    }
    .main-content-with-sidebar {
        margin-left: 0; /* Remove margin on larger screens */
    }
}

/* Sticky-sidebar-on-desktop behavior removed: the sidebar is now closed
   by default and opens as a fixed overlay at every screen width (see
   docs/css/admin-sidebar-collapse.md), so there's no in-flow content to
   keep sticky anymore. */