@import "tailwindcss";

@theme {
  --color-primary: #2563eb;
  --color-primary-light: #3b82f6;
  --color-primary-dark: #1d4ed8;
  --color-surface: #ffffff;
  --color-surface-2: #f9fafb;
  --color-surface-3: #f3f4f6;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-success: #059669;
  --color-error: #dc2626;
  --color-warning: #d97706;
}

.dark {
  --color-surface: #171717;
  --color-surface-2: #212121;
  --color-surface-3: #2a2a2a;
  --color-border: #333333;
  --color-text: #ececec;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #666666;
}

html, body, #root {
  height: 100%;
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar styles */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* Markdown content styles */
.markdown-content h1 { font-size: 1.375em; font-weight: 600; margin: 0.5em 0 0.25em; color: var(--color-text); }
.markdown-content h2 { font-size: 1.2em; font-weight: 600; margin: 0.5em 0 0.25em; color: var(--color-text); }
.markdown-content h3 { font-size: 1.05em; font-weight: 600; margin: 0.5em 0 0.25em; color: var(--color-text); }
.markdown-content p { margin: 0.35em 0; line-height: 1.65; }
.markdown-content ul { margin: 0.35em 0; padding-left: 1.5em; list-style-type: disc; }
.markdown-content ol { margin: 0.35em 0; padding-left: 1.5em; list-style-type: decimal; }
.markdown-content li { margin: 0.15em 0; line-height: 1.65; }
.markdown-content li > ul { list-style-type: circle; }
.markdown-content li > ol { list-style-type: lower-alpha; }
.markdown-content code {
  background: var(--color-surface-3);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", "Cascadia Code", monospace;
}
.markdown-content pre {
  background: var(--color-surface-3);
  padding: 0.75em 1em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 0.5em 0;
  font-size: 0.85em;
}
.markdown-content pre code {
  background: none;
  padding: 0;
}
.markdown-content blockquote {
  border-left: 2px solid var(--color-border);
  padding-left: 0.75em;
  margin: 0.5em 0;
  color: var(--color-text-secondary);
}
.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5em 0;
  font-size: 0.9em;
}
.markdown-content th, .markdown-content td {
  border: 1px solid var(--color-border);
  padding: 0.35em 0.6em;
  text-align: left;
}
.markdown-content th {
  background: var(--color-surface-3);
  font-weight: 600;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Allotment sash styling */
.sash {
  background: var(--color-border) !important;
}

/* Print styles — show only chat messages */
@media print {
  /* Force light colors */
  :root { --color-text: #111827; --color-surface: #fff; --color-surface-2: #f9fafb; --color-surface-3: #f3f4f6; --color-border: #e5e7eb; }
  /* Hide marked elements: header, sidebar, chat input */
  [data-print-hide] { display: none !important; }
  /* Flatten layout so all messages flow naturally */
  html, body, #root, #root > * { height: auto !important; overflow: visible !important; }
  #root * { position: static !important; overflow: visible !important; height: auto !important; }
  /* Restore flex for message spacing */
  .space-y-5 { display: block !important; }
  .space-y-5 > * { margin-bottom: 1.25rem; page-break-inside: avoid; }
  /* Hide iframes (charts/HTML that won't render in print) */
  iframe { display: none !important; }
  /* Hide streaming indicator */
  .animate-bounce { display: none !important; }
  /* Clean margins */
  .max-w-4xl { max-width: none !important; }
}

