/* ============================================================
   智能体作曲器 · 左下栏最终对齐（1:1 参考站 hz.lk888.ai）
   本文件为最后加载的权威样式，统一覆盖历史补丁中
   （s2-fix-v88 / s2-stage-visual-fix / guide-btn-fix 等）
   对左下栏位置与样式的旧值。
   结构（参考站实测）：
     #agBottomActionLeft（横向插槽，80×36，作曲器左下角，不越入侧边栏）
       ├─ #agPlaybookBtn（guide-btn，36×36 问号圆钮，图标唯一）
       └─ #agStandaloneConfig（config-btn，36×36 齿轮圆钮，与 guide 同 y 并排）
   两钮：圆角 12.6 / 背景 rgba(139,92,246,.08) /
        边框 1.33px rgba(139,92,246,.28) / 色 rgba(171,118,251,.86)
   ============================================================ */

/* 容器：横向插槽，位于作曲器左下角，不越入侧边栏 */
#workspaceShell #wsComposer #agBottomActionLeft.bottom-action-left {
  position: absolute !important;
  left: 7px !important;
  right: auto !important;
  top: auto !important;
  bottom: 10px !important;
  width: 80px !important;
  height: 36px !important;
  transform: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  z-index: 70 !important;
}

/* 默认隐藏：大模型/普通工作台不显示左下 guide/config 插槽（参考站大模型视图无此栏） */
#workspaceShell #wsComposer #agBottomActionLeft.bottom-action-left {
  display: none !important;
}
/* 智能体模式显示：
   1) 文本类团队智能体 → 作曲器 cat-agent
   2) 视频/图片类智能体（漫剧S2/多帧等）→ 作曲器 agent-mode
   大模型视图（cat-chat 或无 agent-mode 的 cat-video）不显示 */
#workspaceShell #wsComposer.cat-agent #agBottomActionLeft.bottom-action-left,
#workspaceShell #wsComposer.agent-mode #agBottomActionLeft.bottom-action-left {
  display: flex !important;
}

/* guide / config 共同样式：36×36 图标圆钮，并排 */
#workspaceShell #wsComposer #agBottomActionLeft #agPlaybookBtn.ag-playbook-btn:not(.hidden),
#workspaceShell #wsComposer #agBottomActionLeft #agStandaloneConfig {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.33px solid rgba(139, 92, 246, 0.28) !important;
  border-radius: 12.6px !important;
  background: rgba(139, 92, 246, 0.08) !important;
  color: rgba(171, 118, 251, 0.86) !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  gap: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  order: 0 !important;
}

/* config 排在 guide 之后（参考站 guide 左、config 右），覆盖基础规则 order:-1 */
#workspaceShell #wsComposer #agBottomActionLeft #agStandaloneConfig {
  order: 1 !important;
}

/* 玩法说明文字标签隐藏（参考站仅图标） */
#workspaceShell #wsComposer #agBottomActionLeft #agPlaybookBtn.ag-playbook-btn span {
  display: none !important;
}

/* 图标统一 18×18 */
#workspaceShell #wsComposer #agBottomActionLeft #agPlaybookBtn.ag-playbook-btn svg,
#workspaceShell #wsComposer #agBottomActionLeft #agStandaloneConfig svg {
  position: relative !important;
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto !important;
}

/* config 背景层：铺满但透明（颜色由按钮本身提供，对齐参考站） */
#workspaceShell #wsComposer #agBottomActionLeft #agStandaloneConfig .asc-bg {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 12.6px !important;
  background: transparent !important;
  border: none !important;
}

/* 去掉按钮伪元素 */
#workspaceShell #wsComposer #agBottomActionLeft #agPlaybookBtn.ag-playbook-btn::before,
#workspaceShell #wsComposer #agBottomActionLeft #agPlaybookBtn.ag-playbook-btn::after {
  content: none !important;
}

/* hover：整体加深 */
#workspaceShell #wsComposer #agBottomActionLeft #agPlaybookBtn.ag-playbook-btn:hover,
#workspaceShell #wsComposer #agBottomActionLeft #agStandaloneConfig:hover {
  background: rgba(139, 92, 246, 0.16) !important;
  border-color: rgba(139, 92, 246, 0.55) !important;
  color: #c4b5fd !important;
}

/* 隐藏旧的悬浮提示文案 */
#agPlaybookTip { display: none !important; }
