/* 微信对话样式组件 CSS */

.chat-item-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-bottom: 1rem;
}

/* 头像容器 */
.chat-item-avatar {
  width: 2.75rem;
  height: 2.75rem;
  margin-left: 0.75rem;
  margin-right: 0.75rem;
  border: 0.06rem solid #e6e6e6;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.chat-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s;
}

.chat-item-avatar-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.chat-item-avatar-link:hover {
  text-decoration: none;
}

.chat-item-avatar-link:hover img {
  transform: scale(1.1);
}

.chat-item-avatar:hover {
  border-color: #ff7224;
}

/* 内容容器 */
.chat-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  padding-right: 1rem;
  background: #fff;
  border-radius: 1rem;
  position: relative;
  max-width: calc(100% - 5.5rem);
}

/* 消息气泡小三角 */
.chat-item-bubble-arrow {
  width: 1rem;
  height: 1rem;
  position: absolute;
  left: -0.75rem;
  top: 1.56rem;
}

/* 顶部信息栏 */
.chat-item-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-height: 3rem;
  align-items: center;
  border-bottom: 1px solid #e6e6e6;
}

.chat-item-header-left {
  display: flex;
  height: 100%;
  align-items: center;
}

.chat-item-header-info {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

/* 用户名/股票名称 */
.chat-item-name {
  height: 50%;
  margin-top: 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.chat-item-name.stock-name {
  color: #ff5c02;
  font-weight: 600;
}

/* 股票代码 */
.chat-item-stock-code {
  color: #999;
  font-size: 0.85rem;
  margin-left: 0.3rem;
}

/* 底部元信息 */
.chat-item-meta {
  font-size: 0.75rem;
  height: 50%;
  display: flex;
  align-items: center;
  color: #999;
}

.chat-item-meta-item {
  margin-right: 1rem;
  display: flex;
  align-items: center;
}

.chat-item-meta-item img {
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

/* 时间/关注按钮 */
.chat-item-header-right {
  display: flex;
  align-items: center;
}

.chat-item-time {
  font-size: 0.85rem;
  color: #999;
}

.chat-item-follow-btn {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  color: #666;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s;
}

.chat-item-follow-btn:hover {
  color: #ff7224;
}

.chat-item-follow-btn.followed {
  color: #ff7224;
}

.chat-item-follow-btn img {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.25rem;
}

/* 主体内容区 */
.chat-item-body {
  display: flex;
  flex-direction: column;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* 标题 */
.chat-item-title {
  font-size: 1rem;
  margin-top: 0.5rem;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s;
}

.chat-item-title:hover {
  color: #ff7224;
}

/* 内容摘要 */
.chat-item-desc {
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #666;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 0.25rem;
  cursor: pointer;
}

/* 问答样式 */
.chat-item-qa {
  cursor: pointer;
}

.chat-item-question {
  width: 100%;
  margin-top: 0.25rem;
}

.chat-item-question-label {
  color: #ff5c02;
  font-weight: 600;
}

.chat-item-answer {
  width: 100%;
  margin-top: 0.25rem;
}

.chat-item-answer-label {
  color: #ff5c02;
  font-weight: 600;
}

/* 底部操作栏 */
.chat-item-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* 推送条件（左侧） */
.chat-item-push-condition {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.3s;
}

.chat-item-push-condition:hover {
  opacity: 0.7;
}

/* 操作按钮组（右侧） */
.chat-item-actions {
  display: flex;
  gap: 1.5rem;
  margin-right: 1rem;
  align-items: center;
}

.chat-item-action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.chat-item-action i {
  font-size: 1.1rem;
}

/* 未点赞/未操作状态 - 灰色 */
.chat-item-action-normal {
  color: #999;
}

.chat-item-action-normal:hover {
  color: #ff7224;
}

/* 已点赞状态 - 主色 */
.chat-item-action-liked {
  color: #ff7224;
}

.chat-item-action-liked:hover {
  color: #ff5c02;
}

.chat-item-action span {
  font-size: 0.8rem;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .chat-item-avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .chat-item-name {
    font-size: 0.9rem;
  }

  .chat-item-title {
    font-size: 0.95rem;
  }

  .chat-item-desc {
    font-size: 0.85rem;
  }
}

/* 深色主题支持（可选） */
@media (prefers-color-scheme: dark) {
  .chat-item-content {
    background: #1f1f1f;
  }

  .chat-item-header {
    border-bottom-color: #333;
  }

  .chat-item-name {
    color: #fff;
  }

  .chat-item-title {
    color: #fff;
  }

  .chat-item-desc {
    color: #ccc;
  }

  .chat-item-meta {
    color: #999;
  }

  .chat-item-time {
    color: #999;
  }
}

