.wiki-nav-active {
  background-color: #00abff !important;
}
.wiki-nav-active:hover {
  background-color: rgba(25, 118, 210, 0.2) !important;
}
.v-application .v-navigation-drawer.v-navigation-drawer--fixed {
  background-color: #fff !important;
  border-right: 2px solid #e6e6e6 !important;
}
.v-application .v-list.primary {
  background-color: #fff !important;
}
.v-list .v-list-item .v-list-item__avatar .theme--dark.v-icon {
  color: #000 !important;
}
.v-list .v-list-item .v-list-item__title {
  color: #000 !important;
}
.v-list .v-divider {
  background-color: #e6e6e6 !important;
}


/* Main Navigation Container */
.custom-wiki-nav {
  position: fixed;
  left: 0;
  top: 200px;
  bottom: 0;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb;
  z-index: 10;
}

/* Navigation Header */
.custom-wiki-nav-header {
  padding: 16px 16px 12px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f6f6f6 !important;
  position: fixed;
  z-index: 11;
  left: 0;
  right: 0;
}

.custom-wiki-nav-header h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #111827 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-wiki-nav-header .nav-subtitle {
  display: none;
}

/* Navigation Content */
.custom-wiki-nav-content {
  padding: 4px 0;
  margin-top: 42px;
}

.custom-wiki-nav-list {
  list-style: none;
  margin: 0;
  padding: 0 !important;
}

.custom-wiki-nav-item {
  margin: 0;
  padding: 0;
}

/* Main Navigation Links */
.custom-wiki-nav-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #111827 !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.custom-wiki-nav-link:hover {
  background: #f3f4f6 !important;
  color: #000000 !important;
}

/* Virtual Folder Header - Non-clickable, expandable only */
.virtual-folder-header {
  cursor: pointer !important;
  user-select: none;
}

.virtual-folder-header:hover {
  background: #f9fafb !important;
  color: #374151 !important;
}

/* Make virtual folders visually distinct */
.custom-wiki-nav-item.virtual-folder > .virtual-folder-header {
  font-style: italic;
  opacity: 0.9;
}

.custom-wiki-nav-item.virtual-folder > .virtual-folder-header .nav-label {
  position: relative;
}

/* Optional: Add folder icon indicator for virtual folders */
.custom-wiki-nav-item.virtual-folder > .virtual-folder-header .nav-label::before {
  content: "📁";
  margin-right: 8px;
  font-style: normal;
}

/* Virtual folder expand icon */
.virtual-folder-header .nav-expand-icon {
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  transition: transform 0.25s ease;
  margin-left: auto;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.virtual-folder-header .nav-expand-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #374151;
}

/* Rotate virtual folder chevron when expanded */
.virtual-folder-header .nav-expand-icon.expanded {
  transform: rotate(90deg);
}

/* Active wiki item - more prominent */
.custom-wiki-nav-item.active > .custom-wiki-nav-link {
  background: #eff6ff !important;
  color: #1e40af !important;
  border-left-color: #2563eb;
  font-weight: 600;
}

.custom-wiki-nav-link .nav-icon {
  display: none;
}

.custom-wiki-nav-link .nav-label {
  flex: 1;
}

/* Expand icon for items with children */
.custom-wiki-nav-link .nav-expand-icon {
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
  transition: transform 0.25s ease;
  margin-left: auto;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.custom-wiki-nav-link .nav-expand-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #374151;
}

/* Rotate chevron when expanded */
.custom-wiki-nav-link .nav-expand-icon.expanded {
  transform: rotate(90deg);
}

/* Sub-navigation */
.custom-wiki-nav-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 5px !important;
  background: transparent !important;
  border-left: 2px solid #e5e7eb;
  margin-left: 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

/* When parent is expanded, allow content to be visible */
li.expanded > .custom-wiki-nav-sublist {
  overflow: visible;
}

.custom-wiki-nav-subitem {
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Wrapper for subitem with toggle button */
.custom-wiki-nav-subitem-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

/* Sub-navigation Links */
.custom-wiki-nav-sublink {
  display: block;
  flex: 1;
  padding: 6px 10px 6px 10px;
  color: #6b7280 !important;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
  border-left: 1px solid transparent;
  border-radius: 2px;
  margin: 0 0 0 10px;
}

.custom-wiki-nav-sublink:hover {
  background: #f9fafb !important;
  color: #111827 !important;
  border-left-color: #d1d5db;
}

/* Active sub-item - clear indicator */
.custom-wiki-nav-subitem.active > .custom-wiki-nav-subitem-wrapper > .custom-wiki-nav-sublink {
  background: #dbeafe !important;
  color: #1e40af !important;
  font-weight: 500;
  border-left-color: #3b82f6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Expanded subitem state is managed by max-height on grandchild list */

/* Grandchild toggle button */
.nav-grandchild-toggle,
.nav-nested-toggle {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  transition: all 0.25s ease;
  margin-right: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-grandchild-toggle:hover,
.nav-nested-toggle:hover {
  color: #374151;
  background: #f3f4f6;
}

/* Rotate toggle button when expanded */
li.expanded > .custom-wiki-nav-subitem-wrapper > .nav-nested-toggle,
li.expanded > .custom-wiki-nav-subitem-wrapper > .nav-grandchild-toggle {
  transform: rotate(90deg);
}

/* Grandchild list (expandable) - also handles deeper nested lists */
.custom-wiki-nav-grandchild-list,
.custom-wiki-nav-nested-list {
  list-style: none;
  margin: 0 0 0 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border-left: 2px solid #e5e7eb;
  margin-left: 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

/* When expanded, ensure content is visible */
li.expanded > .custom-wiki-nav-nested-list,
li.expanded > .custom-wiki-nav-grandchild-list {
  overflow: visible;
}

/* Add indentation for deeper nesting */
.custom-wiki-nav-nested-list .custom-wiki-nav-nested-list {
  margin-left: 12px;
  background: transparent !important;
  border-left: 2px solid #e5e7eb;
}

.custom-wiki-nav-nested-list .custom-wiki-nav-nested-list .custom-wiki-nav-nested-list {
  background: transparent !important;
  border-left: 2px solid #e5e7eb;
}

.custom-wiki-nav-grandchild,
.custom-wiki-nav-nested-item {
  margin: 0;
}

/* Grandchild and nested links */
.custom-wiki-nav-grandchild-link,
.custom-wiki-nav-nested-link {
  display: block;
  padding: 6px 16px 7px 10px;
  color: #6b7280 !important;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
  border-left: 1px solid transparent;
  border-radius: 2px;
  margin: 2px 8px 2px 10px;
}

.custom-wiki-nav-grandchild-link:hover,
.custom-wiki-nav-nested-link:hover {
  background: #f9fafb !important;
  color: #111827 !important;
  border-left-color: #d1d5db;
}

/* Active grandchild and nested items */
.custom-wiki-nav-grandchild.active > .custom-wiki-nav-grandchild-link,
.custom-wiki-nav-nested-item.active > .custom-wiki-nav-subitem-wrapper > .custom-wiki-nav-nested-link,
.custom-wiki-nav-nested-item.active > .custom-wiki-nav-nested-link {
  background: #dbeafe !important;
  color: #1e40af !important;
  font-weight: 500;
  border-left-color: #3b82f6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Adjust font size for deeply nested items */
li[data-depth="3"] .custom-wiki-nav-nested-link,
li[data-depth="4"] .custom-wiki-nav-nested-link,
li[data-depth="5"] .custom-wiki-nav-nested-link {
  font-size: 12px;
  padding-left: 8px;
}

/* Adjust padding for wrapper at different depths */
.custom-wiki-nav-nested-item .custom-wiki-nav-subitem-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

/* Clean scrollbar - minimal style */
.custom-wiki-nav::-webkit-scrollbar {
  width: 4px;
}

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

.custom-wiki-nav::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

.custom-wiki-nav::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Responsive adjustments */
@media (max-width: 1264px) {
  .custom-wiki-nav {
    width: 100%;
    max-height: 100%;
  }
}
