/* Main Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 220px;
  background-color: #f5f5f5;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
  margin:0;
  li{
    list-style:none;
  }
}
.sidebar-header{
  display: none;
}
@media (max-width: 768px) {
  .sidebar {
    background-color:transparent;
    box-shadow: none;
    height: 60px;
    width:60px; /* Reduce width to just accommodate the hamburger */
  }
  .sidebar-content {
    transform: translateX(-100%);
  }
  .sidebar-title {
    font-size: 0;
  }
  .sidebar-header {
    display: block;
    padding:12px 16px;
  }
  .sidebar.sidebar-open {
    height: 100vh;
    background-color: #f5f5f5;

    width: 280px; /* Expand width when open */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    .hamburger-toggle {
      background-color:transparent;
      box-shadow: none;
      padding:0;
    }
    .sidebar-title {
      font-size: 1.1rem;
      font-weight: 500;
      margin: 0;
      color: #333;
    }
    .sidebar-header {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid #e0e0e0;
      height: 56px;
      background: #f8f8f8;
    }
    .sidebar-content {
      background-color: #f5f5f5;
      transform: translateX(0);
    }
  }
  .hamburger-menu {
    display: flex;
    justify-content: flex-start;
  }
  .hamburger-toggle {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap:5px;
    border: none;
    cursor: pointer;
    padding:10px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1001; /* Ensure hamburger stays above other elements */
    margin-right: 10px; /* Add some space to the right */
  }

  .hamburger-toggle span {
    display: block;
    height: 2px;
    width: 18px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger-toggle.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .hamburger-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

.menu-title {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-left 0.3s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: inherit;
  .initials-avatar{
    margin:0;
  }
}

.nav-item:has(.lock){
  opacity: 0.6;
  cursor: not-allowed;
  a{
    cursor: not-allowed;
  }
  a:hover{
    color: inherit;
  }
}

.menu-title:hover, .menu-title:focus{
  outline:none;
}

.nav-item.active{
  .menu-title{
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 3px solid #1976d2;
  }
}

.nav-item:hover:not(.disabled) {
  background-color: #e0e0e0;
}

.sidebar-content {
  margin:0;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.secondary-item {
  padding: 12px 20px 12px 60px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 36px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.secondary-item:hover {
  background-color: #e0e0e0;
  text-decoration: none;
}

.secondary-item.active {
  background-color: #e3f2fd;
  color: #1976d2;
  border-left: 3px solid #1976d2;
}

.secondary-item .material-symbols-outlined {
  font-size: 20px;
  margin-right: 12px;
  margin-left: -24px;
}

/* Secondary Navigation */
.secondary-nav {
  margin:0;
  display: none;
  background-color: #ffffff;
}

.secondary-nav.active {
  display: block;
}
