/* ============= Trunks 来源显示样式 ============= */

/* Trunks 来源区块 */
.trunks-sources {
  margin-top: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.sources-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #dee2e6;
}

.sources-header .icon {
  font-size: 20px;
}

.sources-header .title {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
}

.sources-header .count {
  font-size: 14px;
  color: #6c757d;
}

/* Trunk 卡片列表 */
.trunk-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 单个 Trunk 卡片 */
.trunk-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.trunk-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #ffc107;
}

.trunk-card.highlighted {
  border-color: #ffc107;
  background: #fff3cd;
}

/* 卡片头部 */
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-header .rank {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.card-header .source {
  font-size: 14px;
  color: #0d6efd;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 卡片元数据 */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #6c757d;
}

.card-meta .type {
  font-weight: 500;
}

/* 卡片内容预览 */
.card-content {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #adb5bd;
}

.card-content .quote-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.card-content .preview {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #495057;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 卡片操作按钮 */
.card-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-highlight {
  padding: 6px 14px;
  background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-highlight:hover {
  background: linear-gradient(135deg, #ffb300 0%, #ffa000 100%);
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4);
  transform: translateY(-1px);
}

.btn-highlight:active {
  transform: translateY(0);
}

/* 答案中的高亮样式 */
.message-content mark {
  background-color: #fff3cd;
  border-bottom: 2px solid #ffc107;
  padding: 2px 4px;
  border-radius: 3px;
  animation: highlight-fade-in 0.3s ease;
}

@keyframes highlight-fade-in {
  from {
    background-color: transparent;
  }
  to {
    background-color: #fff3cd;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .trunks-sources {
    padding: 12px;
  }

  .trunk-card {
    padding: 12px;
  }

  .card-header .source {
    font-size: 13px;
  }

  .card-content .preview {
    font-size: 12px;
  }
}
