/* Importing Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 270px;
  height: 100vh;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.sidebar.collapsed {
  width: 85px;
}

.sidebar .sidebar-header {
  display: flex;
  position: relative;
  padding: 25px 20px;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header .header-logo img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
}

.sidebar-header .sidebar-toggler,
.sidebar-menu-button {
  position: absolute;
  right: 20px;
  height: 35px;
  width: 35px;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: 0.4s ease;
}

.sidebar.collapsed .sidebar-header .sidebar-toggler {
  transform: translate(-4px, 65px);
}

.sidebar-header .sidebar-toggler span,
.sidebar-menu-button span {
  font-size: 1.75rem;
  transition: 0.4s ease;
}

.sidebar.collapsed .sidebar-header .sidebar-toggler span {
  transform: rotate(180deg);
}

.sidebar-header .sidebar-toggler:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.sidebar-nav .nav-list {
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 0 15px;
  flex-direction: column;
  transform: translateY(15px);
  transition: 0.4s ease;
}

.sidebar .sidebar-nav .primary-nav {
  overflow-y: auto;
  scrollbar-width: thin;
  padding-bottom: 20px;
  height: calc(100vh - 227px);
  scrollbar-color: transparent transparent;
}

.sidebar .sidebar-nav .primary-nav:hover {
  scrollbar-color: #EEF2FF transparent;
}

.sidebar.collapsed .sidebar-nav .primary-nav {
  overflow: unset;
  transform: translateY(65px);
}

.sidebar-nav .nav-item .nav-link {
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  gap: 12px;
  white-space: nowrap;
  border-radius: 8px;
  padding: 11px 15px;
  align-items: center;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.3s ease;
}

.sidebar-nav .nav-item:is(:hover, .open)>.nav-link:not(.dropdown-title) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link .nav-label {
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-link :where(.nav-label, .dropdown-icon) {
  opacity: 0;
  pointer-events: none;
}

.sidebar.collapsed .nav-link .dropdown-icon {
  transition: opacity 0.3s 0s ease;
}

.sidebar-nav .secondary-nav {
  position: absolute;
  bottom: 35px;
  width: 100%;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-item {
  position: relative;
}

/* Dropdown Stylings */
.sidebar-nav .dropdown-container .dropdown-icon {
  margin: 0 -4px 0 auto;
  transition: transform 0.4s ease, opacity 0.3s 0.2s ease;
}

.sidebar-nav .dropdown-container.open .dropdown-icon {
  transform: rotate(180deg);
}

.sidebar-nav .dropdown-menu {
  height: 0;
  overflow-y: hidden;
  list-style: none;
  padding-left: 15px;
  transition: height 0.4s ease;
}

.sidebar.collapsed .dropdown-menu {
  position: absolute;
  top: -10px;
  left: 100%;
  opacity: 0;
  height: auto !important;
  padding-right: 10px;
  overflow-y: unset;
  pointer-events: none;
  border-radius: 0 10px 10px 0;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: 0s;
}

.sidebar.collapsed .dropdown-menu:has(.dropdown-link) {
  padding: 7px 10px 7px 24px;
}

.sidebar.sidebar.collapsed .nav-item:hover>.dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(12px);
  transition: all 0.4s ease;
}

.sidebar.sidebar.collapsed .nav-item:hover>.dropdown-menu:has(.dropdown-link) {
  transform: translateY(10px);
}

.dropdown-menu .nav-item .nav-link {
  color: rgba(220, 220, 220, 0.7);
  padding: 9px 15px;
}

.sidebar.collapsed .dropdown-menu .nav-link {
  padding: 7px 15px;
}

.dropdown-menu .nav-item .nav-link.dropdown-title {
  display: none;
  color: #fff;
  padding: 9px 15px;
}

.dropdown-menu:has(.dropdown-link) .nav-item .dropdown-title {
  font-weight: 500;
  padding: 7px 15px;
}

.sidebar.collapsed .dropdown-menu .nav-item .dropdown-title {
  display: block;
}

.sidebar-menu-button {
  display: none;
}

/* Additional dropdown styles from sidebar-dropdown.css */
.dropdown-menu {
    transition: height 0.3s ease;
    overflow: hidden;
    height: 0;
}

.dropdown-container.open .dropdown-menu {
    height: auto;
}

.nav-link.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-container .dropdown-menu {
    display: block;
}

/* Add mobile navbar - will only show on mobile */
.mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  justify-content: space-between; /* Space between hamburger and logo */
}

.mobile-nav-logo {
  margin-top: 15px; 
  height: 110px;
  width: auto;
  object-fit: contain;
}

/* Responsive media query code for small screens */
@media (max-width: 768px) {
  .mobile-navbar {
    display: flex;
    align-items: center;
    padding: 0 15px;
  }

  body {
    padding-top: 60px; /* Space for navbar */
  }

  .sidebar-menu-button {
    position: static; /* Reset position */
    margin: 0;
    display: flex;
  }

  .sidebar {
    top: 60px; /* Start below navbar */
    height: calc(100vh - 60px);
  }

  .sidebar.collapsed {
    width: 270px;
    left: -270px;
    top: 60px;
    height: calc(100vh - 60px);
  }

  /* Ensure content starts below navbar */
  main, .main-content {
    margin-top: 60px;
  }

  .sidebar .sidebar-nav .primary-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 40, 0, 0.3);
  }

  .sidebar-menu-button {
    z-index: 1000;
  }
}