@charset "UTF-8";
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f1f1f1;
  height: 100vh;
}

#acone-app {
  background-size: cover;
  background-image: url("/static/my_web/img/chat/xiaoqiche.png");
}

.el-dialog__header {
  display: none;
}

.el-drawer__header {
  height: auto;
}

.el-dialog__body {
  padding: 0;
}

.el-message-box {
  width: 10%;
}

.el-message__icon {
  font-size: 1.1rem;
}

.container {
  display: flex;
  height: 70vh;
  border-radius: 5px;
  box-shadow: #b9b9b9 0 0 6px 4px;
  /* 左侧好友栏 */
  /* 右侧聊天区域 */
}
.container .friends-sidebar {
  width: 260px;
  background: #f8f8f8;
  border-right: 1px solid #e7e7e7;
  display: flex;
  flex-direction: column;
}
.container .friends-sidebar .friends-header {
  padding: 15px;
  font-size: 18px;
  font-weight: 500;
  border-bottom: 1px solid #e7e7e7;
}
.container .friends-sidebar .friends-list {
  flex: 1;
  overflow-y: auto;
  border-right: 1px solid #DCDBDB;
}
.container .friends-sidebar .friends-list .friend-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.container .friends-sidebar .friends-list .friend-item .badge {
  position: absolute;
  top: 10px; /* 向上偏移 */
  left: 40px; /* 向右偏移 */
  min-width: 18px; /* 保持圆形最小尺寸 */
  height: 18px;
  border-radius: 50%; /* 圆形效果 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  padding: 0; /* 移除原有padding */
  transform: translate(30%, -30%); /* 微调定位 */
  background: #ff4444;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 添加立体感 */
  z-index: 101;
}
.container .friends-sidebar .friends-list .friend-item:hover {
  background: #D3D1D0;
}
.container .friends-sidebar .friends-list .friend-item .friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  margin-right: 12px;
}
.container .friends-sidebar .friends-list .friend-item .chat_friend_online {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 28px; /* 根据实际图片尺寸调整 */
  height: 28px;
  z-index: 20; /* 确保显示在头像上层 */
}
.container .friends-sidebar .friends-list .friend-item .not-online {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11.5px;
  color: #7D7782;
}
.container .friends-sidebar .friends-list .friend-item .friend-info {
  flex: 1;
  min-width: 0;
}
.container .friends-sidebar .friends-list .friend-item .friend-info .friend-name {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-content: space-between;
  align-items: center;
  display: flex;
}
.container .friends-sidebar .friends-list .friend-item .friend-info .friend-lastmsg {
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.container .friends-sidebar .friends-list .active {
  background-color: #C6C5C4;
}
.container .chat-main {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* 标题栏 */
  /* 聊天内容区域 */
  /* 输入区域 */
}
.container .chat-main .header {
  background: #ededed;
  padding: 10px 10px 10px 25px;
  height: 50px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #d9d9d9;
}
.container .chat-main .header .header-title {
  text-align: center;
  font-size: 18px;
}
.container .chat-main .chat-container {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  padding: 15px;
  background: #f3f3f3;
  /* 时间戳 */
  /* 消息气泡 */
  /* 对方消息 */
  /* 自己消息 */
}
.container .chat-main .chat-container .timestamp {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 10px 0;
  position: relative;
}
.container .chat-main .chat-container .message {
  margin: 13px 0;
  display: flex;
  align-items: flex-start;
}
.container .chat-main .chat-container .message .avatar {
  width: 35px;
  height: 35px;
  border-radius: 5px;
  margin: 0 10px;
}
.container .chat-main .chat-container .message .bubble {
  max-width: 70%;
  padding: 7px 9px;
  border-radius: 5px;
  position: relative;
  word-break: break-word;
  font-size: 15.5px;
}
.container .chat-main .chat-container .message .bubble i {
  max-width: 50px;
}
.container .chat-main .chat-container .message.self {
  justify-content: flex-end;
}
.container .chat-main .chat-container .message.other .bubble {
  background: white;
  color: #000;
}
.container .chat-main .chat-container .message.other .bubble:hover {
  background-color: #EBEBEB;
}
.container .chat-main .chat-container .message.self .bubble {
  background: #9eea6a;
  color: #000;
}
.container .chat-main .chat-container .message.self .bubble:hover {
  background-color: #89D961;
}
.container .chat-main .input-area {
  background: #ededed;
  padding: 15px;
  display: flex;
  align-items: center;
  border-top: 1px solid #d9d9d9;
  border-right: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;
  height: 110px;
  outline: none;
}
.container .chat-main .input-area .input-box {
  flex: 1;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  min-height: 70px;
  max-height: 90px;
  overflow-y: auto;
  background: white;
  margin-right: 10px;
  outline: none;
  /* 原有样式 */
  -webkit-user-modify: read-write-plaintext-only; /* 限制只能输入纯文本 */
  white-space: pre-wrap; /* 保留换行 */
}
.container .chat-main .input-area .send-btn {
  padding: 8px 20px;
  background: #07c160;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.container .chat-main .input-area .send-btn:hover {
  background: #05ad52;
}

/* 代码图标样式 */
.code-trigger {
  cursor: pointer;
  color: #666;
  padding: 8px;
  margin-right: 5px;
  transition: color 0.3s;
}

.code-trigger:hover {
  color: #409EFF;
}

.page_title_info {
  color: #815ba4;
}

/* 代码预览模态框 */
#codePreview {
  border-radius: 4px;
  padding: 15px;
  background-color: #272822 !important; /* GitHub风格的浅灰色背景 */
}

/* 聊天中的代码图标 */
.code-icon {
  color: #9b59b6;
  cursor: pointer;
  font-size: 24px;
  vertical-align: middle;
}

/* 调整代码字体 */
.hljs {
  font-family: "Menlo", "Consolas", monospace;
  font-size: 16.5px;
  line-height: 1.5;
  color: #24292e; /* GitHub黑色文本 */
}

/* 表情面板样式 */
.emoji-panel {
  position: absolute;
  bottom: 60px;
  right: 20px;
  width: 410px; /* 缩小宽度 */
  height: 340px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1000;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #eee;
}

.emoji-container {
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* 6列布局 */
  gap: 4px;
}

.emoji-item {
  font-size: 20px; /* 缩小字体 */
  cursor: pointer; /* 添加手指指针 */
  transition: transform 0.1s;
  user-select: none;
  text-align: center;
  padding: 4px;
  border-radius: 4px;
}

.emoji-trigger:hover {
  transform: scale(1.1);
  background: #f0f2f5;
  cursor: pointer;
  color: #9b59b6;
}

/* 分类标签样式 */
.emoji-tabs {
  display: flex;
  padding: 8px 4px;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
}

.emoji-tab {
  flex: 1;
  padding: 6px 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-radius: 4px;
  transition: all 0.2s;
  margin: 3px;
}

.emoji-tab.active {
  background: #9b59b6;
  color: white;
}

.emoji-tab:hover {
  background: #f0f0f0;
}

.emoji-tab.active:hover {
  background: #8e44ad;
}

/* 补充CSS调整 */
.code-container {
  position: relative;
  counter-reset: line;
  padding-left: 3.5em !important; /* 增加左边距 */
  background: #f5f5f5 !important; /* 添加背景色 */
  border-radius: 4px;
  margin: 0;
}

.hljs.code-container {
  background: inherit !important;
  padding: 1em !important;
}

.code-line .hljs {
  background: transparent !important;
  padding: 0 !important;
}

.code-line {
  position: relative;
  display: block;
  min-height: 1.2em; /* 确保空行也有行号 */
  padding-left: 1em;
}

/* 确保高亮后的代码颜色可见 */
.code-line:hover {
  background-color: #383838;
}

/* 修复行号对齐 */
.code-line::before {
  content: counter(line);
  counter-increment: line;
  position: absolute;
  left: -2.5em; /* 对齐左边距 */
  width: 3em;
  text-align: right;
  color: #666;
  user-select: none;
  font-family: monospace; /* 保持与代码字体一致 */
  font-size: 0.9em;
  line-height: 1.8; /* 对齐代码行高 */
}

/* 新增代码高亮容器样式 */
.code-line > :not(::before) { /* 排除伪元素 */
  margin-left: 1.5em; /* 单独控制代码内容边距 */
}

/* 保持代码块的原有样式 */
#codePreview {
  white-space: pre-wrap;
  font-family: monospace;
}

/*# sourceMappingURL=chat.css.map */
