/* ============================================================
   momo2026 · AI 搜索入口
   在头部搜索区提供「问AI」入口，指向搜索中心（vod/search_hub）。
   独立文件，避免污染 style.css / 被美化脚本重新生成时覆盖。
   ============================================================ */

/* ---------- 首页头部（public/head.html） ---------- */
/* 作为 .head-search 的兄弟节点，因此在 ≤768px 搜索框隐藏后依然保留 */
.head-ai-entry {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.head-ai-entry svg {
  flex: none;
  display: block;
}
.head-ai-entry:hover {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.26);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ---------- 内页头部搜索胶囊体（PC / 移动端共用） ---------- */
.head_search_capsule_ai {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  margin: 0 4px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.head_search_capsule_ai:hover {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.26);
  box-shadow: var(--shadow-glow);
}

/* ---------- 窄屏收敛 ---------- */
@media (max-width: 992px) {
  .head-ai-entry { padding: 0 10px; }
}
@media (max-width: 768px) {
  .head-ai-entry {
    height: 30px;
    padding: 0 10px;
    border-radius: 15px;
    font-size: 12px;
    gap: 4px;
  }
  .head_search_capsule_ai {
    height: 22px;
    padding: 0 8px;
    margin: 0 2px;
    font-size: 11px;
  }
}

/* ============================================================
   v202609242 · 头部搜索框 AI 集成
   - ✦ 开关收进搜索框内(替代原独立「问AI」文字胶囊,节省头部空间)
   - 独立入口保留为移动端专属的纯图标按钮(≤768px 搜索框隐藏时兜底)
   ============================================================ */

/* 搜索框内 ✦ 开关(.head-search button 是绝对定位,需与搜索按钮错开) */
.head-search .head-search__ai {
  position: absolute;
  right: 36px;
  top: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--txt-3, #64748b);
  background: transparent;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.head-search .head-search__ai:hover { color: var(--txt-1, #e2e8f0); }
.head-search .head-search__ai.on {
  color: #00d68f;
  background: rgba(0, 192, 125, .14);
  box-shadow: 0 0 10px rgba(0, 192, 125, .3);
}
/* 输入框右侧腾出两个图标的位置 */
.head-search input { padding-right: 68px; }

/* 独立入口:桌面端隐藏(已集成进搜索框),移动端显示为纯图标 */
@media (min-width: 769px) {
  .head-ai-entry { display: none; }
}
@media (max-width: 768px) {
  .head-ai-entry { width: 30px; padding: 0; justify-content: center; }
}

/* ============================================================
   v202609243 · ✦ 开关首次引导气泡(仅出现一次)
   ============================================================ */
.head-ai-bubble {
  position: absolute;
  z-index: 9999;
  max-width: 200px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(0, 192, 125, .45);
  box-shadow: 0 8px 30px rgba(2, 6, 23, .55), 0 0 0 1px rgba(0, 192, 125, .1);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.head-ai-bubble.show { opacity: 1; transform: translateY(0); }
.head-ai-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 24px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: rgba(15, 23, 42, .96);
  border-left: 1px solid rgba(0, 192, 125, .45);
  border-top: 1px solid rgba(0, 192, 125, .45);
}
