/* GLM-OCR Custom Styles */

/* ── 置信度条 ──────────────────────────────────── */
.confidence-high { background-color: #22c55e; }
.confidence-medium { background-color: #eab308; }
.confidence-low { background-color: #ef4444; }

/* ── 拖拽上传区域 ──────────────────────────────── */
.drop-zone {
  border: 2px dashed #d1d5db;
  transition: all 0.2s ease;
}
.drop-zone.dragover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* ── KaTeX 公式容器 ────────────────────────────── */
.formula-display {
  overflow-x: auto;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

/* ── Toast 动画 ────────────────────────────────── */
.toast-enter { animation: slideIn 0.3s ease-out; }
.toast-exit  { animation: slideOut 0.3s ease-in forwards; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ── 加载动画 ──────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 结果区域表格 ──────────────────────────────── */
.result-table { width: 100%; border-collapse: collapse; }
.result-table th,
.result-table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 1rem;
}
.result-table th {
  background-color: #f9fafb;
  font-weight: 600;
}

/* ── Markdown / raw_text 渲染区域 ──────────────── */
.markdown-content h1,
.prose h1 { font-size: 1.5rem; font-weight: 700; margin: 1.25rem 0 0.5rem; color: #111827; }
.markdown-content h2,
.prose h2 { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: #111827; }
.markdown-content h3,
.prose h3 { font-size: 1.125rem; font-weight: 600; margin: 1rem 0 0.5rem; color: #1f2937; }
.markdown-content h4,
.prose h4 { font-size: 1rem; font-weight: 600; margin: 0.75rem 0 0.25rem; color: #1f2937; }
.markdown-content p,
.prose p { margin: 0.5rem 0; line-height: 1.75; color: #374151; }
.markdown-content ul, .markdown-content ol,
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0.5rem 0; }
.markdown-content li, .prose li { margin: 0.25rem 0; line-height: 1.65; }
.markdown-content code,
.prose code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #dc2626;
}
.markdown-content pre,
.prose pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0.75rem 0;
}
.markdown-content pre code,
.prose pre code { background: none; padding: 0; color: inherit; }
.markdown-content blockquote,
.prose blockquote {
  border-left: 4px solid #3b82f6;
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
  background: #eff6ff;
  border-radius: 0 0.375rem 0.375rem 0;
  color: #1e40af;
}
.markdown-content hr,
.prose hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.25rem 0; }
.markdown-content a,
.prose a { color: #2563eb; text-decoration: underline; }
.markdown-content img,
.prose img { max-width: 100%; border-radius: 0.5rem; margin: 0.5rem 0; }

/* ── raw_text 渲染后的 HTML 表格样式 ───────────── */
.prose table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.prose table th,
.prose table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 1rem;
}
.prose table th { background-color: #f9fafb; font-weight: 600; }
.prose table tr:nth-child(even) td { background-color: #fafafa; }

/* ── 通用卡片间距 ─────────────────────────────── */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; }
.card-header { font-size: 1rem; font-weight: 600; color: #6b7280; margin-bottom: 0.5rem; }
