/* Sidebar Navigation Styles */

/* === Navigation Menu === */
.sidebar-nav {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

html.dark-mode .sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav li {
  margin: 0.35rem 0;
  transition: all 0.2s ease;
}

/* === Navigation Items === */
.nav-item {
  display: flex;
  align-items: center;
  padding: 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  min-height: 48px;
}

/* Collapsed state - center the icon */
.sidebar:not(:hover) .nav-item {
  padding: 0.85rem 1rem;
  justify-content: flex-start;
  gap: 0;
}

/* Expanded state - align items to the left */
.sidebar:hover .nav-item {
  padding: 0.85rem 1rem;
  justify-content: flex-start;
  gap: 1rem;
}

/* Active indicator bar */
.nav-item::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  opacity: 0;
  transform: scaleY(0);
  transition: all 0.3s ease;
  border-radius: 0 4px 4px 0;
  transform-origin: center;
}

.nav-item:hover {
  background: rgba(139, 195, 74, 0.12);
  color: #1a252f;
}

.sidebar:hover .nav-item:hover {
  transform: translateX(4px);
}

.nav-item:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

/* Active state */
.sidebar-nav li.active .nav-item {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.15), rgba(94, 129, 34, 0.1));
  color: #8bc34a;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(139, 195, 74, 0.15);
}

.sidebar-nav li.active .nav-item::before {
  opacity: 1;
  transform: scaleY(1);
}

/* Dark mode */
html.dark-mode .nav-item {
  color: #d0d0d0;
}

html.dark-mode .nav-item:hover {
  background: rgba(139, 195, 74, 0.15);
  color: #ecf0f1;
}

html.dark-mode .sidebar-nav li.active .nav-item {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.25), rgba(94, 129, 34, 0.15));
  color: #8ec134;
}

/* === Navigation Icons === */
.nav-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.sidebar:hover .nav-icon {
  width: 28px;
  height: 28px;
  font-size: 1.35rem;
}

.nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.sidebar-nav li.active .nav-item .nav-icon {
  transform: scale(1.05);
}

/* === Navigation Labels === */
.nav-label {
  font-size: 0.95rem;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-width 0.3s ease 0.2s;
  pointer-events: none;
}

.sidebar:hover .nav-label {
  opacity: 1;
  max-width: 200px;
  pointer-events: auto;
  transition: opacity 0.3s ease 0.1s, max-width 0.3s ease;
}
