/* Tiptap Editor Styles */
.ProseMirror {
  outline: none;
}

.ProseMirror p.is-editor-empty:first-child::before {
  color: #adb5bd;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

/* Prose Styles for Rich Text Content */
.prose {
  color: #334155;
  max-width: 65ch;
}

.prose p {
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.75;
}

.prose h1 {
  font-size: 2.25em;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 0.8em;
  color: #0f172a;
}

.prose h2 {
  font-size: 1.875em;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  color: #1e293b;
}

.prose h3 {
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.25em;
  margin-bottom: 0.6em;
  color: #334155;
}

.prose strong {
  font-weight: 600;
  color: #0f172a;
}

.prose em {
  font-style: italic;
}

.prose code {
  background-color: #f1f5f9;
  color: #e11d48;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875em;
}

.prose ul {
  list-style-type: disc;
  padding-left: 1.625em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose ol {
  list-style-type: decimal;
  padding-left: 1.625em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.75;
}

.prose blockquote {
  border-left: 4px solid #6366f1;
  padding-left: 1em;
  margin-left: 0;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #475569;
}

.prose hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose a {
  color: #6366f1;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #4f46e5;
}

/* Make sure the editor has proper styling */
.prose.max-w-none {
  max-width: none;
}

/* Table Styles - Shared for Editor and Viewer */
.ProseMirror table,
.prose table {
  border-collapse: collapse;
  margin: 1.5rem 0;
  width: 100%;
  table-layout: fixed;
  font-size: 0.95em;
}

.ProseMirror td,
.ProseMirror th,
.prose td,
.prose th {
  border: 1px solid #cbd5e1;
  padding: 0.75rem 1rem;
  vertical-align: top;
  box-sizing: border-box;
  min-width: 1em;
  position: relative;
}

.ProseMirror th,
.prose th {
  background-color: #f1f5f9;
  /* Slate-100 */
  font-weight: 600;
  text-align: left;
  color: #334155;
  /* Slate-700 */
}

.ProseMirror tr:nth-child(even),
.prose tr:nth-child(even) {
  background-color: #fdfdfd;
}

.ProseMirror .selectedCell:after {
  background: rgba(200, 200, 255, 0.4);
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ProseMirror .column-resize-handle {
  background-color: #6366f1;
  bottom: -2px;
  pointer-events: none;
  position: absolute;
  right: -2px;
  top: 0;
  width: 4px;
}

.tableWrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}