/* ========== 思维链（Thinking Chain）样式 ========== */

.thinking-chain-panel {
  margin-bottom: 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(147, 130, 220, 0.08), rgba(100, 180, 255, 0.06));
  border: 1px solid rgba(147, 130, 220, 0.2);
  overflow: hidden;
  max-width: 85%;
  font-size: 12px;
}

.thinking-chain-header {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  gap: 6px;
  user-select: none;
  transition: background 0.2s;
}

.thinking-chain-header:active {
  background: rgba(147, 130, 220, 0.1);
}

.thinking-chain-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.thinking-chain-label {
  font-weight: 600;
  color: #7c6bb5;
  font-size: 11px;
  flex-shrink: 0;
}

.thinking-chain-preview {
  color: #888;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.thinking-chain-arrow {
  font-size: 10px;
  color: #999;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.thinking-chain-body {
  border-top: 1px solid rgba(147, 130, 220, 0.15);
  animation: thinkingFadeIn 0.2s ease;
}

.thinking-chain-content {
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #555;
  max-height: 300px;
  overflow-y: auto;
  word-break: break-word;
}

.thinking-chain-content::-webkit-scrollbar {
  width: 4px;
}

.thinking-chain-content::-webkit-scrollbar-thumb {
  background: rgba(147, 130, 220, 0.3);
  border-radius: 2px;
}

@keyframes thinkingFadeIn {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 300px; }
}

/* 暗色主题适配 */
[data-theme="dark"] .thinking-chain-panel {
  background: linear-gradient(135deg, rgba(147, 130, 220, 0.12), rgba(100, 180, 255, 0.08));
  border-color: rgba(147, 130, 220, 0.3);
}

[data-theme="dark"] .thinking-chain-label {
  color: #a99de0;
}

[data-theme="dark"] .thinking-chain-preview {
  color: #aaa;
}

[data-theme="dark"] .thinking-chain-content {
  color: #ccc;
}

/* 模拟思维链样式（灰色调） */
.thinking-chain-panel.thinking-simulated {
  background: linear-gradient(135deg, rgba(150, 150, 150, 0.08), rgba(180, 180, 180, 0.06));
  border-color: rgba(150, 150, 150, 0.2);
}

.thinking-chain-panel.thinking-simulated .thinking-chain-label {
  color: #888;
}

[data-theme="dark"] .thinking-chain-panel.thinking-simulated {
  background: linear-gradient(135deg, rgba(150, 150, 150, 0.12), rgba(180, 180, 180, 0.08));
  border-color: rgba(150, 150, 150, 0.3);
}

[data-theme="dark"] .thinking-chain-panel.thinking-simulated .thinking-chain-label {
  color: #aaa;
}

/* 真实思维链样式（紫色调，保持原样） */
.thinking-chain-panel.thinking-real {
  background: linear-gradient(135deg, rgba(147, 130, 220, 0.08), rgba(100, 180, 255, 0.06));
  border-color: rgba(147, 130, 220, 0.2);
}

.thinking-chain-panel.thinking-real .thinking-chain-label {
  color: #7c6bb5;
}

/* 设置面板中的思维链开关样式 */
#thinking-chain-section .setting-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  line-height: 1.5;
}
