/* 智能体思考 / 分析过程动效 */
.lc-ai-thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 48px 24px 40px;
  min-height: 320px;
  text-align: center;
}

.lc-ai-thinking-compact {
  min-height: 220px;
  padding: 32px 20px 28px;
  gap: 18px;
}

.lc-ai-thinking-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lc-ai-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(114, 46, 209, 0.15);
  border-top-color: #722ed1;
  border-right-color: #1677ff;
  animation: lc-ai-spin 0.9s linear infinite;
  position: relative;
}

.lc-ai-spinner::after {
  content: "🤖";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  animation: lc-ai-pulse 1.4s ease-in-out infinite;
}

.lc-ai-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: lc-ai-spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 4px;
}

.lc-ai-thinking-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--portal-text, #1a3353);
}

html[data-theme="dark"] .lc-ai-thinking-title {
  color: #e2e8f0;
}

.lc-ai-thinking-sub {
  font-size: 13px;
  color: var(--portal-muted, #64748b);
  min-height: 20px;
}

.lc-ai-thinking-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(420px, 100%);
  text-align: left;
}

.lc-ai-thinking-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--portal-muted, #94a3b8);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.lc-ai-step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.45);
  flex-shrink: 0;
  position: relative;
}

.lc-ai-step.active {
  color: #722ed1;
  background: rgba(114, 46, 209, 0.06);
  font-weight: 600;
}

.lc-ai-step.active .lc-ai-step-dot {
  border-color: #722ed1;
  border-top-color: transparent;
  animation: lc-ai-spin 0.8s linear infinite;
}

.lc-ai-step.done {
  color: #16a34a;
}

.lc-ai-step.done .lc-ai-step-dot {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
}

.lc-ai-step.done .lc-ai-step-dot::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
}

.lc-ai-thinking-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.lc-ai-thinking-overlay-panel {
  width: min(480px, 100%);
  background: var(--shell-panel, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--shell-border, rgba(22, 119, 255, 0.14));
  overflow: hidden;
}

html[data-theme="dark"] .lc-ai-thinking-overlay-panel {
  background: rgba(8, 22, 48, 0.98);
}

.dir-agent-step-active .dir-agent-step-icon.lc-ai-step-spin,
.lc-ai-step-spin {
  border-color: #722ed1 !important;
  color: transparent !important;
  background: rgba(114, 46, 209, 0.1) !important;
  animation: lc-ai-spin 0.8s linear infinite;
}

.dir-agent-step-active .dir-agent-step-icon.lc-ai-step-spin::after {
  content: "";
}

@keyframes lc-ai-spin {
  to { transform: rotate(360deg); }
}

@keyframes lc-ai-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.92); opacity: 0.85; }
}

.audit-agent-pulse,
.dir-agent-pulse {
  animation: lc-ai-pulse-dot 1.2s ease-in-out infinite;
}

@keyframes lc-ai-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
