/* ============================================
   聊天消息批量管理
   玻璃条 + 左侧圆点点选（微信式全左）
   ============================================ */

/* —— 磨砂玻璃条（浮于聊天窗上方；fixed + JS 按视口定位，不随消息滚动） —— */
.chat-body {
  position: relative;   /* 玻璃条定位基准 */
}
.batch-bar {
  position: fixed;
  top: 8px;   /* JS 打开时按 messagesScroll 视口位置重算 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 94%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 10px;
  background: rgba(24, 18, 14, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 0.5px solid rgba(233, 196, 170, 0.28);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(10, 6, 4, 0.4);
}
.batch-bar::-webkit-scrollbar {
  display: none;
}

.batch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 46px;
  padding: 6px 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(233, 214, 196, 0.78);
  cursor: pointer;
  transition: color 0.25s, background 0.25s, text-shadow 0.25s;
}
.batch-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.batch-btn span {
  font-family: 'Inter', 'PingFang SC', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 2px;
  white-space: nowrap;
}
.batch-btn:hover {
  color: #f6e1c4;
  background: rgba(233, 196, 170, 0.08);
  text-shadow: 0 0 10px rgba(246, 225, 196, 0.35);
}
.batch-btn:disabled {
  opacity: 0.32;
  cursor: default;
}
.batch-btn:disabled:hover {
  color: rgba(233, 214, 196, 0.78);
  background: transparent;
  text-shadow: none;
}
/* 删除按钮微偏玫瑰 */
.batch-btn[data-bm-action="delete"]:hover {
  color: #e8b4a8;
  background: rgba(232, 180, 168, 0.08);
  text-shadow: 0 0 10px rgba(232, 180, 168, 0.35);
}

.batch-bar-hint {
  font-family: 'Inter', 'PingFang SC', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: rgba(246, 225, 196, 0.85);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  padding: 0 6px;
  pointer-events: none;
}

/* —— 批量态：消息整体右移，让出左侧选中徽标槽 —— */
.messages-scroll.bm-mode .msg-wrapper {
  position: relative;
  padding-left: 40px;
}

/* —— 批量态选中交互（点整条消息/思考链即选中）：
   徽标用 ::before 锚在气泡/思考链自身（两者基类均已 position:relative）——
   思考链开合时徽标跟随内容，不会再"留在原地"。
   ::after 已被占用（用户气泡尾巴/思考链增强层），故徽标只用 ::before —— */
.messages-scroll.bm-mode .msg-bubble,
.messages-scroll.bm-mode .msg-wrapper > .thinking-chain.done {
  cursor: pointer;
}
.messages-scroll.bm-mode .msg-bubble {
  user-select: none;
}
.messages-scroll.bm-mode .msg-bubble::before,
.messages-scroll.bm-mode .msg-wrapper > .thinking-chain.done::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--color-chat-title, #7284bc);
  background: transparent;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.18s ease, background 0.18s ease;
}
.messages-scroll.bm-mode .msg-bubble:hover::before,
.messages-scroll.bm-mode .msg-wrapper > .thinking-chain.done:hover::before {
  opacity: 0.75;
}
/* 选中态 = 实心圆 + 极淡白晕（圆内不打勾）。
   ★ 日后改观感只动这里：虎虎计划用更好看的线条/实心 SVG 重做选中圆——
   把 background 换成 SVG data-URI 或独立图标元素即可，徽标锚定方式（::before 挂气泡/思考链自身）
   与选中类 .bm-selected 不变。选择器必须 ≥ 上方基础徽标规则权重（思考链 5 类），否则选中态会被压掉。 */
.messages-scroll.bm-mode .msg-bubble.bm-selected::before,
.messages-scroll.bm-mode .msg-wrapper > .thinking-chain.done.bm-selected::before {
  background: var(--color-chat-title, #7284bc);
  opacity: 0.92;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}
/* 批量态：消息底栏（复制/刷新/编辑/收藏/更多/删除/版本导航）整体禁用——防点选时误触 */
.messages-scroll.bm-mode .msg-actions-bar {
  pointer-events: none;
  opacity: 0.4;
}

/* —— 底部按钮激活态 —— */
.tool-btn.bm-on {
  color: #f6e1c4;
  filter: drop-shadow(0 0 8px rgba(246, 225, 196, 0.45));
}

/* —— 全局轻提示 toast（铭刻/留存/删除/复制结果；不依赖玻璃条可见） —— */
.bm-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(8px);
  z-index: 900;
  padding: 8px 18px;
  background: rgba(24, 18, 14, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 0.5px solid rgba(233, 196, 170, 0.3);
  border-radius: 999px;
  font-family: 'Inter', 'PingFang SC', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: rgba(246, 225, 196, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.bm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   铭刻弹窗（复用 model-switch-* 弹窗族）
   ============================================ */
.bm-inscribe-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0.6rem 2rem 0.8rem;
}
.bm-inscribe-code {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--color-model-option-desc, rgba(200, 200, 200, 0.6));
  opacity: 0.85;
  text-align: center;
}
.bm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bm-field label {
  font-family: 'Inter', 'PingFang SC', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 3px;
  color: var(--color-model-option-desc, rgba(200, 200, 200, 0.7));
  opacity: 0.9;
}
.bm-anchor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bm-anchor-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.bm-anchor-wrap .mb-anchor-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 10px;
  border: 0.5px solid var(--color-model-input-border, rgba(200, 200, 200, 0.25));
  border-radius: 12px;
  font-size: 0.7rem;
  color: var(--color-model-input-text, #e8e0d8);
}
.bm-anchor-wrap .mb-anchor-chip-remove {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
}
.bm-anchor-wrap .mb-anchor-chip-remove:hover {
  opacity: 1;
}
.bm-anchor-row .mb-anchor-input {
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--color-model-input-border, rgba(200, 200, 200, 0.25));
  color: var(--color-model-input-text, #e8e0d8);
  font-size: 0.72rem;
  padding: 2px 4px;
  outline: none;
  min-width: 90px;
}
.bm-anchor-row .mb-anchor-add {
  background: transparent;
  border: none;
  color: var(--color-model-option-desc, rgba(200, 200, 200, 0.65));
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  transition: color 0.25s;
}
.bm-anchor-row .mb-anchor-add svg {
  width: 15px;
  height: 15px;
}
.bm-anchor-row .mb-anchor-add:hover {
  color: var(--color-chat-title, #7284bc);
}
.bm-gen-state {
  font-family: 'Inter', 'PingFang SC', sans-serif;
  font-size: 0.62rem;
  font-style: italic;
  letter-spacing: 1px;
  color: var(--color-model-option-desc, rgba(200, 200, 200, 0.7));
  min-height: 1em;
  text-align: center;
}

/* —— 留存弹窗：目标切片滚动目录 —— */
.bm-slice-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 0.5px solid var(--color-model-input-border, rgba(200, 200, 200, 0.25));
  border-radius: 10px;
  padding: 6px;
}
.bm-slice-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}
.bm-slice-row:hover {
  background: var(--color-model-option-hover, rgba(255, 255, 255, 0.05));
}
.bm-slice-row.selected {
  /* 选中底色用淡蓝（与模型选项 hover 同色系、加深一档），不用深蓝（太深割裂） */
  background: rgba(192, 206, 222, 0.16);
}
.bm-slice-code {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.66rem;
  font-weight: 350;
  letter-spacing: 0.5px;
  color: var(--color-chat-title, #7284bc);
  flex-shrink: 0;
  opacity: 0.8;
}
.bm-slice-title {
  /* 切片标题字重与周围（label 400/输入框 300）一致，不自带粗感 */
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--color-model-input-text, #e8e0d8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
