/* Critical CSS for above-the-fold content */
.smooth-scroll {
  scroll-behavior: smooth;
}

.focus-visible:focus {
  outline: none;
}

.sidebar-transition {
  transition: transform 0.3s ease-in-out;
}

@media (max-width: 768px) {
  .sidebar-hidden {
    transform: translateX(-100%);
  }
}

/* 简化的导航样式 */
.document-nav-toggle {
  transition: all 0.2s ease-in-out;
}

.document-nav-toggle:hover {
  background-color: #f3f4f6;
}

.document-nav-submenu {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  transition: max-height 0.25s ease-out, padding-top 0.25s ease-out;
}

.document-nav-submenu.expanded {
  max-height: 2500px; /* 更合理的最大高度 */
}

.document-nav-toggle-icon {
  transition: transform 0.2s ease-in-out;
}

/* 激活状态样式 */
.document-nav-item-active {
  color: #2563eb !important;
  background-color: #dbeafe !important;
  border-left: 3px solid #3b82f6;
  font-weight: 600;
}

.document-nav-subitem {
  position: relative;
  transition: all 0.2s ease-in-out;
}

.document-nav-subitem::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 4px;
  height: 4px;
  background-color: #9ca3af;
  border-radius: 50%;
  transform: translateY(-50%);
}

.document-nav-subitem:hover {
  background-color: #f9fafb;
}

/* 搜索高亮样式 */
.document-search-highlight {
  background-color: #fef3c7 !important;
  border-left: 3px solid #f59e0b !important;
  animation: highlight-pulse 1s ease-in-out;
}

@keyframes highlight-pulse {
  0% { background-color: #fef3c7; }
  50% { background-color: #fed7aa; }
  100% { background-color: #fef3c7; }
}

#document-search-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 搜索结果为空时的样式 */
.search-no-results {
  padding: 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.search-no-results i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}
