/* 协同聊天窗样式（类名前缀 aicc-，避免与站点 app.css 冲突） */

.aicc-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f5b942, #e09a2a);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.aicc-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
.aicc-fab-icon {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; position: relative; flex: 0 0 auto;
}
.aicc-fab-icon::after {
  content: ""; position: absolute; left: 5px; top: 8px; width: 0; height: 0;
  border-left: 5px solid #e09a2a; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}

.aicc-panel {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 480px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.aicc-panel.aicc-open { opacity: 1; transform: none; pointer-events: auto; }

.aicc-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f5b942, #e09a2a);
  color: #fff;
}
.aicc-panel-title { font-weight: 600; font-size: 14px; }
.aicc-close {
  border: none; background: transparent; color: #fff; font-size: 22px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}

.aicc-msgs { flex: 1 1 auto; overflow-y: auto; padding: 14px; background: #f6f7f9; }
.aicc-row { display: flex; margin-bottom: 10px; }
.aicc-user { justify-content: flex-end; }
.aicc-assistant { justify-content: flex-start; }
.aicc-bubble {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.aicc-user .aicc-bubble { background: #e09a2a; color: #fff; border-bottom-right-radius: 4px; }
.aicc-assistant .aicc-bubble { background: #fff; color: #222; border: 1px solid #e6e8eb; border-bottom-left-radius: 4px; }
.aicc-typing { color: #999; }

.aicc-profile { display: flex; gap: 8px; padding: 8px 12px 0; background: #fff; }
.aicc-input {
  flex: 1; min-width: 0; border: 1px solid #e6e8eb; border-radius: 8px;
  padding: 7px 9px; font-size: 12px; color: #333; outline: none;
}
.aicc-input:focus { border-color: #e09a2a; }

.aicc-composer { display: flex; gap: 8px; padding: 10px 12px 12px; background: #fff; }
.aicc-textarea {
  flex: 1; resize: none; border: 1px solid #e6e8eb; border-radius: 8px;
  padding: 9px 11px; font-size: 14px; line-height: 1.4; outline: none; max-height: 110px;
  font-family: inherit; color: #333;
}
.aicc-textarea:focus { border-color: #e09a2a; }
.aicc-send {
  border: none; border-radius: 8px; background: #e09a2a; color: #fff;
  padding: 0 16px; font-size: 14px; cursor: pointer;
}
.aicc-send:disabled { opacity: .55; cursor: not-allowed; }
/* 发送按钮不许被压缩。
   flex 默认允许收缩，输入内容变长时按钮会被挤窄、"发送"两字换行或被切。 */
.aicc-send { flex: 0 0 auto; white-space: nowrap; }

/* 快捷键提示。压到很轻的层级：需要时看得见，不跟输入框抢注意力。 */
.aicc-hint {
  padding: 0 12px 10px; font-size: 11.5px; color: #9aa0a6;
  line-height: 1.5; background: #fff;
  border-radius: 0 0 12px 12px;   /* 与面板圆角对齐，否则底部露白角 */
}
/* composer 原本承担面板底部的内边距，提示行接手后这里收掉，避免出现双份空白 */
.aicc-composer { padding-bottom: 8px; }

/* 占位文字比正文小一档并允许省略号。
   窄屏（480px 以下面板会拉满）仍可能不够宽，
   宁可显示省略号，也不要把字截成半个。 */
.aicc-textarea::placeholder {
  font-size: 13px; color: #9aa0a6;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}

@media (max-width: 480px) {
  .aicc-panel { right: 12px; left: 12px; width: auto; bottom: 80px; }
  .aicc-fab { right: 12px; bottom: 12px; }
  /* 手机上把提示行再压小，屏幕高度紧张，它是最次要的信息 */
  .aicc-hint { font-size: 11px; padding-bottom: 8px; }
}
