/**
 * askintell-sidebar.css — 全站统一侧边栏基础样式
 * v20260729sb1
 * 提供 .ask-sidebar-left 和 .ask-sidebar-right 统一类名
 * 页面特定类（.sidebar-left / .pricing-sidebar / .pm-sidebar / .mc-sidebar 等）保留用于页面特定样式
 */

/* === 统一侧边栏基类 === */
.ask-sidebar-left,
.ask-sidebar-right {
  /* 尺寸：左 200px / 右 200px */
  flex-shrink: 0;
  padding: 20px 12px;
  position: sticky;
  top: 56px; /* 导航栏高度 */
  height: calc(100vh - 56px);
  overflow-y: auto;
  box-sizing: border-box;
  transition: background-color 0.2s, border-color 0.2s;
}

aside.ask-sidebar-left,
.pm-sidebar.ask-sidebar-left,
.mc-sidebar.ask-sidebar-left,
.pricing-sidebar.ask-sidebar-left,
.sidebar-left.ask-sidebar-left {
  width: 176px !important;
  border-right: 1px solid var(--h-border, #E2E6EF);
}

aside.ask-sidebar-right,
.pm-sidebar.ask-sidebar-right,
.mc-sidebar.ask-sidebar-right,
.pricing-sidebar.ask-sidebar-right,
.sidebar-right.ask-sidebar-right {
  width: 200px !important;
  border-left: 1px solid var(--h-border, #E2E6EF);
}

/* 暗色模式 */
[data-theme="dark"] .ask-sidebar-left,
[data-theme="dark"] .ask-sidebar-right {
  border-color: var(--h-border-dark, rgba(255,255,255,0.06));
}

/* === 滚动条样式 === */
.ask-sidebar-left::-webkit-scrollbar,
.ask-sidebar-right::-webkit-scrollbar {
  width: 4px;
}
.ask-sidebar-left::-webkit-scrollbar-thumb,
.ask-sidebar-right::-webkit-scrollbar-thumb {
  background: var(--h-border, rgba(0,0,0,0.15));
  border-radius: 2px;
}

/* === 移动端隐藏（统一行为：移动端侧边栏不显示，由底部 tabbar 导航） === */
@media (max-width: 768px) {
  .ask-sidebar-left,
  .ask-sidebar-right {
    display: none !important;
  }
}

/* === 侧边栏内部通用组件 === */
/* 导航项 */
.ask-sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--h-text-secondary, #6B7280);
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.15s, color 0.15s;
  cursor: pointer;
}
.ask-sidebar-nav-item:hover {
  background: var(--h-card-hover, rgba(99, 102, 241, 0.06));
  color: var(--h-text, #1a1a2e);
}
.ask-sidebar-nav-item.active {
  background: var(--h-primary-alpha, rgba(99, 102, 241, 0.1));
  color: var(--h-primary, #6366F1);
  font-weight: 500;
}
.ask-sidebar-nav-item .icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* 区块标题 */
.ask-sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--h-text-tertiary, #9CA3AF);
  padding: 12px 12px 6px;
  margin: 0;
}

/* 分隔线 */
.ask-sidebar-divider {
  height: 1px;
  background: var(--h-border, #E2E6EF);
  margin: 12px 8px;
}
[data-theme="dark"] .ask-sidebar-divider {
  background: var(--h-border-dark, rgba(255,255,255,0.06));
}

/* === 快捷操作 (Quick Actions) — 3列网格，与 family-home 统一风格 === */
/* 仅作用于加载了 askintell-sidebar.css 的页面（deep-assistant / my-center / points-mall）*/
/* family-home 有自己的内联样式，不加载此文件 */
.ask-sidebar-right .qa-container {
  padding: 4px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}
/* 隐藏 nav-user.js 注入的重复标题（这些页面已有自己的标题） */
.ask-sidebar-right .qa-title {
  display: none !important;
}
.ask-sidebar-right .qa-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--h-text, #1a1a2e);
  font-size: 11px;
  transition: background 0.15s;
  border: 1px solid var(--h-border, rgba(0,0,0,0.06));
  background: var(--h-card, transparent);
  text-align: center;
}
.ask-sidebar-right .qa-link:hover {
  background: var(--h-hover, rgba(99,102,241,0.06));
  border-color: var(--h-accent, #6366F1);
}
.ask-sidebar-right .qa-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.ask-sidebar-right .qa-link > span:not(.qa-icon) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

}
