/* 收藏详情页面样式 */
.favorite-detail-page {
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  background: #fafafa;
}

/* 头部信息 */
.favorite-header {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.favorite-header-left {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex: 1;
}

.favorite-title-section {
  flex: 1;
  min-width: 0;
}

.favorite-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favorite-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* 元信息 */
.favorite-meta {
  background: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.favorite-meta .anticon {
  color: #1890ff;
  margin-right: 4px;
}

/* 主要内容 */
.favorite-main-content {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 页面内容样式 */
.favorite-page-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.messages-preview {
  margin-top: 16px;
}

.favorite-messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

/* 消息列表滚动条 */
.favorite-messages-list::-webkit-scrollbar {
  width: 6px;
}

.favorite-messages-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.favorite-messages-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.favorite-messages-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 消息卡片标题样式 */
.favorite-messages-list .ant-card-head {
  min-height: auto;
  padding: 8px 12px;
  background: #fafafa;
}

.favorite-messages-list .ant-card-head-title {
  padding: 0;
  font-size: 12px;
}

.favorite-messages-list .ant-card-body {
  padding: 12px;
}

.message-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fafafa;
  border-radius: 4px;
}

/* 消息内容样式 */
.favorite-message-content {
  display: flex;
  flex-direction: column;
}

.message-content {
  padding: 8px 0;
}

.context-messages {
  margin-top: 8px;
}

/* 文本片段内容样式 */
.favorite-text-fragment-content {
  display: flex;
  flex-direction: column;
}

/* 滚动条样式 */
.favorite-detail-page::-webkit-scrollbar {
  width: 8px;
}

.favorite-detail-page::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.favorite-detail-page::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.favorite-detail-page::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .favorite-detail-page {
    padding: 16px;
  }

  .favorite-header {
    flex-direction: column;
    gap: 16px;
  }

  .favorite-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .favorite-meta {
    padding: 8px 16px;
  }

  .favorite-main-content {
    padding: 16px;
  }
}

/* Ant Design Card 自定义样式 */
.favorite-detail-page .ant-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.favorite-detail-page .ant-card-head-title {
  font-weight: 500;
}

.favorite-detail-page .ant-descriptions-item-label {
  font-weight: 500;
  background: #fafafa;
}

/* Markdown 内容样式 - 允许选择和复制 */
.favorite-detail-page .markdown-body {
  user-select: text;
  cursor: text;
}

.favorite-detail-page .message-content,
.favorite-detail-page .context-messages,
.favorite-detail-page .favorite-text-fragment-content,
.favorite-detail-page .messages-preview {
  user-select: text;
  cursor: text;
}

/* 确保 Card 内的内容可以选择 */
.favorite-detail-page .ant-card-body {
  user-select: text;
  cursor: text;
}
