/* Custom CSS for LMS Application */

/* Fixed Sidebar styling for screens width >= 768px */
@media (min-width: 768px) {
  #accordionSidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1030;
    height: 100vh;
    overflow-y: auto;
  }

  /* Custom scrollbar for fixed sidebar */
  #accordionSidebar::-webkit-scrollbar {
    width: 5px;
  }
  #accordionSidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
  }
  #accordionSidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  
  #content-wrapper {
    transition: margin-left 0.15s ease-in-out, width 0.15s ease-in-out;
  }

  /* When sidebar is in default/expanded state */
  #accordionSidebar:not(.toggled) {
    width: 14rem !important;
  }
  #accordionSidebar:not(.toggled) + #content-wrapper {
    margin-left: 14rem;
    width: calc(100% - 14rem);
  }

  /* When sidebar is collapsed/toggled */
  #accordionSidebar.toggled {
    width: 6.5rem !important;
  }
  #accordionSidebar.toggled + #content-wrapper {
    margin-left: 6.5rem;
    width: calc(100% - 6.5rem);
  }
}

/* Fixed Footer styling for admin/guru/siswa dashboard views */
footer.sticky-footer {
  position: fixed !important;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 999;
  padding: 1rem 0 !important;
  height: 60px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  background-color: #ffffff;
}

@media (min-width: 768px) {
  #accordionSidebar:not(.toggled) + #content-wrapper footer.sticky-footer {
    left: 14rem;
    transition: left 0.15s ease-in-out;
  }
  #accordionSidebar.toggled + #content-wrapper footer.sticky-footer {
    left: 6.5rem;
    transition: left 0.15s ease-in-out;
  }
}

#content {
  padding-bottom: 75px; /* Prevent layout overlap with fixed footer */
}
