/* 聊天区增强：气泡操作工具栏 + 历史提问按钮 */

/* 消息操作工具栏：位于气泡下方外侧，悬停消息时显现（交互对齐 DeepSeek） */
.msg { flex-wrap: wrap; }

.msg-tools {
  flex-basis: 100%;
  display: flex;
  gap: 2px;
  margin-top: 2px;
  opacity: 0;
  transition: opacity .15s;
}
/* 悬停或被键盘聚焦时显示 */
.msg:hover .msg-tools,
.msg-tools:focus-within { opacity: 1; }

/* 提问在右侧、回答在左侧，工具栏需避开各自的头像 */
.msg.assistant .msg-tools { padding-left: 42px; }
.msg.user .msg-tools { justify-content: flex-end; padding-right: 42px; }

.msg-tools button {
  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: #9aa1ab;
  border-radius: 6px; cursor: pointer;
}
.msg-tools button:hover { background: rgba(31, 35, 41, .06); color: #1f2329; }
.msg-tools button:active { background: rgba(31, 35, 41, .1); }

/* 输入框旁的「最近提问」按钮 */
.btn-history {
  border: 1px solid var(--border); background: #fff; color: #555;
  border-radius: 9px; padding: 9px 12px; cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-history:hover { border-color: var(--brand); color: var(--brand); }
