/* Sidebar Nav Items & Icon Badges (Matching Guide style) */
.nav-item {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #d7d3e4;
  text-align: right;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.nav-item:hover {
  background: rgba(144, 104, 248, 0.1);
  color: #fff;
  transform: translateX(-2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(126, 82, 236, 0.35), rgba(96, 66, 183, 0.25)) !important;
  border: 1px solid rgba(168, 140, 255, 0.32) !important;
  color: #fff !important;
}

.nav-icon-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #bfaaff;
  font-size: 13px;
  flex: none;
  line-height: 1;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.nav-item.active .nav-icon-badge {
  background: linear-gradient(135deg, #7c53e9, #a175ff) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(124, 83, 233, 0.38) !important;
}

.nav-item {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.nav-item-content {
  display: flex;
  flex-direction: column;
  min-width: 0 !important;
  max-width: calc(100% - 37px) !important;
  flex: 1 1 auto;
  overflow: hidden !important;
}

.nav-item-content strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item-content small {
  display: block;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin-top: 1px;
  color: #9295aa;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item.active .nav-item-content small {
  color: #d6cbff !important;
}

/* Subcategory branch line */
.nav-subcategory-pages-inner {
  border-right: 2px solid rgba(168, 140, 255, 0.22) !important;
  margin-right: 6px !important;
  padding-right: 14px !important;
}

/* Legacy fallback */
.nav-index {
  overflow: hidden;
}
.nav-index img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}
.nav-index.missing {
  visibility: hidden;
}

/* Light Theme Overrides */
html[data-theme="light"] .nav-item {
  color: #383151 !important;
}

html[data-theme="light"] .nav-item:hover {
  background: rgba(135, 95, 246, 0.1) !important;
  color: #1f1442 !important;
}

html[data-theme="light"] .nav-item.active {
  background: linear-gradient(135deg, #8058e7, #a177ff) !important;
  color: #fff !important;
  border-color: #8058e7 !important;
}

html[data-theme="light"] .nav-icon-badge {
  background: rgba(135, 95, 246, 0.1) !important;
  color: #5534b0 !important;
}

html[data-theme="light"] .nav-item.active .nav-icon-badge {
  background: linear-gradient(135deg, #7c53e9, #a175ff) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(124, 83, 233, 0.38) !important;
}

html[data-theme="light"] .nav-item-content small {
  color: #6b6380 !important;
}

html[data-theme="light"] .nav-item.active .nav-item-content small {
  color: #f0ebff !important;
}

html[data-theme="light"] .nav-subcategory-pages-inner {
  border-right-color: rgba(135, 95, 246, 0.3) !important;
}

/* Discord Voice & Text Channel Items in Pickers */
.channel-voice-item,
.channel-text-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  vertical-align: middle;
}
.welcome-picker > button .channel-voice-item,
.welcome-picker > button .channel-text-item {
  max-width: calc(100% - 22px);
}
.discord-voice-icon {
  width: 17px;
  height: 17px;
  min-width: 17px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  color: #949ba4;
  transition: color 0.15s ease;
}
.welcome-picker-menu button,
.role-picker-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.welcome-picker-menu button:hover .discord-voice-icon,
.welcome-picker-menu button.selected .discord-voice-icon,
.welcome-picker > button:hover .discord-voice-icon,
.welcome-picker > button:focus .discord-voice-icon,
.role-picker-menu button:hover .discord-voice-icon,
.role-picker-menu button.selected .discord-voice-icon,
.role-picker > button:hover .discord-voice-icon,
.role-picker > button:focus .discord-voice-icon {
  color: #f2f3f5;
}
html[data-theme="light"] .discord-voice-icon {
  color: #5c5f66;
}
html[data-theme="light"] .welcome-picker-menu button:hover .discord-voice-icon,
html[data-theme="light"] .welcome-picker-menu button.selected .discord-voice-icon,
html[data-theme="light"] .welcome-picker > button:hover .discord-voice-icon,
html[data-theme="light"] .role-picker-menu button:hover .discord-voice-icon,
html[data-theme="light"] .role-picker-menu button.selected .discord-voice-icon,
html[data-theme="light"] .role-picker > button:hover .discord-voice-icon {
  color: #313338;
}
.channel-voice-name,
.channel-text-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-hash {
  color: #949ba4;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

/* Discord Category Items in Pickers */
.channel-category-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  vertical-align: middle;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.discord-category-icon {
  width: 13px;
  height: 13px;
  min-width: 13px;
  flex-shrink: 0;
  color: #949ba4;
  opacity: 0.85;
  transition: color 0.15s ease;
}

.welcome-picker-menu button:hover .discord-category-icon,
.welcome-picker-menu button.selected .discord-category-icon,
.welcome-picker > button:hover .discord-category-icon,
.role-picker-menu button:hover .discord-category-icon,
.role-picker-menu button.selected .discord-category-icon,
.role-picker > button:hover .discord-category-icon {
  color: #f2f3f5;
}

html[data-theme="light"] .discord-category-icon {
  color: #5c5f66;
}

html[data-theme="light"] .welcome-picker-menu button:hover .discord-category-icon,
html[data-theme="light"] .welcome-picker-menu button.selected .discord-category-icon,
html[data-theme="light"] .welcome-picker > button:hover .discord-category-icon,
html[data-theme="light"] .role-picker-menu button:hover .discord-category-icon,
html[data-theme="light"] .role-picker-menu button.selected .discord-category-icon,
html[data-theme="light"] .role-picker > button:hover .discord-category-icon {
  color: #313338;
}

.channel-category-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
