body {
  margin: 0;
  padding: 0;
  margin-top: 50px;
  //overflow-x: hidden;

}

/* Overlay Sidebar */
.sidebar-overlay {
  overflow-y: auto;
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  width: 250px;
  padding: 1rem;
  background-color: #f8f9fa;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1050;
}

.sidebar-overlay.show {
  transform: translateX(0);
}

.overlay-backdrop {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1049;
  display: none;
}

.overlay-backdrop.show {
  display: block;
}

/* Secondary Sidebar */
.sidebar-secondary {
  overflow-y: auto;
  position: fixed;
  top: 56px;
  bottom: 0;
  left: 0;
  width: 250px;
  padding: 1rem;
  background-color: #e9ecef;
  transition: transform 0.3s ease-in-out;
  z-index: 1020;
}


.sidebar-overlay .nav-link {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sidebar-overlay .nav-link:hover {
  background-color: #f1f1f1;
  border-radius: 4px;
}


.content-wrapper {
  transition: margin-left 0.3s ease-in-out;
  padding: 1rem;
}


#desktopNavbar {
  position: relative;
  top: 0;
  z-index: 1030;
}

.navbar .container-fluid {
  overflow: visible !important;
}

.full-width-dropdown {
  position: absolute;
  top: 100%; /* right below the button */
  left: 0;
  right: 0;
  width: 100vw;
  max-height: 60vh;
  overflow-y: auto;
  background-color: white;
  border-radius: 0;
  z-index: 1050;
  display: none;

  direction: rtl; /* move scrollbar to the left */
}

.full-width-dropdown.show {
  display: block;
}

.full-width-dropdown > .container-fluid {
  direction: ltr; /* keep content direction normal */
}

/* Optional scrollbar style (WebKit) */
.full-width-dropdown::-webkit-scrollbar {
  width: 8px;
}

.full-width-dropdown::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}



/* Collapse secondary on small */
@media (max-width: 991.98px) {
  .sidebar-secondary {
    transform: translateX(-100%);
  }
  .sidebar-secondary.show {
    transform: translateX(0);
  }

body {
    margin-top: 1px; /* Space for both navbars */
  }

  #mobileStickyNavbar {
    position: sticky;
    top: 0;
    z-index: 1020;
  }

}



/* ✅ Only apply margin when secondary sidebar is present */
@media (min-width: 992px) {
  #secondarySidebar ~ .content-wrapper {
    margin-left: 250px;
  }


}


