@import "tailwindcss";

:root {
  --background: #ffffff;
  --foreground: #171717;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-sans);
  --font-serif: var(--font-serif);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

/* TipTap Editor Styles */
.ProseMirror {
  min-height: 200px;
  outline: none;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #374151;
}
.ProseMirror > * + * {
  margin-top: 0.75em;
}
.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3,
.ProseMirror h4,
.ProseMirror h5,
.ProseMirror h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1em;
}
.ProseMirror h1 { font-size: 1.5em; }
.ProseMirror h2 { font-size: 1.25em; }
.ProseMirror a {
  color: #1D9E75;
  text-decoration: underline;
  cursor: pointer;
}
.ProseMirror ul,
.ProseMirror ol {
  padding-left: 1.5em;
}
.ProseMirror ul { list-style-type: disc; }
.ProseMirror ol { list-style-type: decimal; }
.ProseMirror blockquote {
  border-left: 3px solid #e5e7eb;
  padding-left: 1em;
  color: #6b7280;
  font-style: italic;
}
.ProseMirror code {
  background: #f3f4f6;
  padding: 0.15em 0.3em;
  border-radius: 3px;
  font-size: 0.85em;
}
.ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #d1d5db;
  pointer-events: none;
  height: 0;
}

/* Table styles */
.ProseMirror table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5em 0;
}
.ProseMirror td,
.ProseMirror th {
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  min-width: 1em;
}
.ProseMirror th {
  background: #f9fafb;
  font-weight: 600;
  text-align: left;
}
.ProseMirror .selectedCell:after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(29, 158, 117, 0.15);
  pointer-events: none;
}

/* Image styles */
.ProseMirror img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.5em 0;
}

/* KaTeX rendering */
.katex-render {
  margin: 1em 0;
  text-align: center;
  overflow-x: auto;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans), Arial, Helvetica, sans-serif;
}
