/* === Reset and Base Styles === */

/* === Sidebar Layout === */
.sidebar-section {
  max-width: 100%;
  padding-top: 0;
}

.fnt_header__sidebar {
  background: #1b1b1b !important;
  position: fixed;
  height: 93vh;
  overflow: auto;
  transition: all .2s ease-in-out;
  scrollbar-width: thin;
  position: -webkit-sticky;
  position: sticky;
  top: 5.6rem;
}

/* === Navigation Elements === */
.fnt_header__sidebar .fnt_header__sidebar__nav {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.fnt_header__sidebar .fnt_header__sidebar__nav a {
  position: relative;
  color: #86a1ae !important;
  font-size: .875rem;
  padding: .625rem 1.5rem;
  display: block;
  cursor: pointer;
  white-space: nowrap;
  text-wrap: pretty;
}

/* === Icons and Links === */
.fnt_header__sidebar .fnt_header__sidebar__nav li a i {
  margin-right: 8px;
  color: #86A1AE;
}

a:not(.btn) {
  text-decoration: none;
}

.fnt_panelist {
  display: flex;
  align-items: center;
  flex-direction: row;
}

/* === Active States === */
.fnt_header__sidebar__nav li.active a, 
li.active a .fnt_panelist {
  color: #fff;
  background-color: #818181 !important;
}

li.active a .fnt_panelist i {
  color: #ffffff;
}

/* === Header States === */
.header.close, 
.header.open {
  display: flex;
  align-items: center;
  opacity: 1;
}

/* === Header Divider Styles === */
.fnt_header__divider {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #2a2b2b;
  padding-inline: 1rem;
  padding-block: 0.5rem;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid #000;
}

.fnt_header__divider::after {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto; 
  display: flex; 
  align-items: center;
  justify-content: center;
  font-size: 1.25rem; 
  line-height: 1; 
  color: #ffffff; 
  font-weight: bold;
  transition: transform .2s ease-in-out;
  content: "+";  /* Default collapsed state */
}

/* When expanded class is added (section is open) */
.fnt_header__divider.expanded::after {
  content: "-";
}

/* MODIFIED RULE: Exclude .header__divider from the .active:after selector */
:not(.fnt_header__divider).active:after, 
.tab-pane-web.active {
  content: none !important;
  background: none !important;
}

.fnt_header__divider.active,
.fnt_header__divider:hover {
  background-color: #555 !important;
  color: #ffffff !important;
}

.fnt_header__sidebar__nav .accordion-body {
  padding-inline: 0;
}

/* === Collapsible Sections === */
.sidecollap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  overflow: hidden;
}

.sidecollap.show {
  grid-template-rows: 1fr;
}

.sidecollap > div {
  min-height: 0;
}

/* === Additional Custom Styles === */
#sidebar-section {
  margin-left: 0 !important;
  height: 93vh !important;
  top: 4.5rem !important;
  transition: transform 0.3s ease-in-out;
}

.student-sidebar {
  position: static;
  left: 0;
  background: #fff;
  z-index: 100;
}

/* === Media Queries === */
@media (min-width: 991px) {
  .sidebar-section.collapse.fnt_navbar-collapse {
      display: block !important;
  }
}

@media (max-width: 991px) {
  .fnt_header__sidebar {
      margin-left: -1px;
      min-width: 240px;
      z-index: 999;
      position: fixed;
  }
  
  /* Hidden state for mobile */
  #sidebar-section:not(.show) {
      transform: translateX(-100%);
  }
  
  /* Visible state for mobile */
  #sidebar-section.show {
      transform: translateX(0);
  }
  
  /* Add overlay when sidebar is open */
  body.sidebar-open::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 998;
      animation: fadeIn 0.3s;
  }
}

@media screen and (max-width: 768px) {
  #sidebar-section {
      top: 4.2rem !important;
      padding-bottom: 2rem;
  }
}

@media screen and (max-width: 576px) {
  .sidebar-section {
      width: 64%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}