/**
 * AI 消息卡片样式
 * 对齐 Figma 设计稿
 */

.wk-ai-message-card {
  position: relative;
  display: flex;
  background: #F8F9FB;
  border-radius: 8px;
  padding: 16px;
  max-width: 680px;
  min-width: 0;
}

/* 左边条 (4px 蓝紫渐变) */
.wk-ai-message-card__border {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #41D1FF 0%, #7A61FF 100%);
  border-radius: 4px 0 0 4px;
}

.wk-ai-message-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 12px; /* 左边条后的间距 */
}

/* 头部区域 */
.wk-ai-message-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* AI 头像堆叠 */
.wk-ai-message-card__avatars {
  display: flex;
  align-items: center;
}

.wk-ai-message-card__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  object-fit: cover;
}

/* AI 名字 (蓝紫渐变) */
.wk-ai-message-card__names {
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #41DFFF 0%, #7F3BF5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* AI Tag (渐变背景) */
.wk-ai-message-card__tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  background: linear-gradient(90deg, #44C5FB 0%, #7D58F5 100%);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
}

/* 展开/收起按钮 */
.wk-ai-message-card__toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: #7D58F5; /* 深紫色 */
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}

.wk-ai-message-card__toggle:hover {
  opacity: 0.8;
}

/* 消息内容预览 */
.wk-ai-message-card__preview {
  font-size: 14px;
  line-height: 22px;
  color: #4E5969;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tooltip (超过5个AI时) */
.wk-ai-message-card__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: rgba(28, 28, 35, 0.9);
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  transition-delay: 0.3s;
  z-index: 10;
}

.wk-ai-message-card:hover .wk-ai-message-card__tooltip {
  opacity: 1;
}

.wk-ai-message-card__tooltip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.wk-ai-message-card__tooltip-item img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.wk-ai-message-card__tooltip-item span {
  font-size: 12px;
  white-space: nowrap;
}
