/* Tiptap / ProseMirror editor styles */
/* Tiptap v3 applies class "tiptap" to the contenteditable element */

/* Editor container */
.tiptap {
  font-size: 0.875rem;
  line-height: 1.625;
  padding: 0.75rem;
}

/* Placeholder */
.tiptap p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--color-base-content, #6b7280);
  opacity: 0.4;
  pointer-events: none;
  height: 0;
}

/* ProseMirror focus */
.tiptap:focus {
  outline: none;
}

/* Inline formatting — !important needed to override global strong { font-medium } */
.tiptap strong { font-weight: 700 !important; }
.tiptap em { font-style: italic; }

/* Typography within editor */
.tiptap h1 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 0.5rem; }
.tiptap h2 { font-size: 1.25rem; font-weight: 700; margin: 0.75rem 0 0.375rem; }
.tiptap h3 { font-size: 1.125rem; font-weight: 600; margin: 0.5rem 0 0.25rem; }

.tiptap ul { list-style-type: disc; padding-left: 1.25rem; margin: 0.5rem 0; }
.tiptap ol { list-style-type: decimal; padding-left: 1.25rem; margin: 0.5rem 0; }
.tiptap li { margin-bottom: 0.125rem; }
.tiptap li p { margin: 0; }

.tiptap blockquote {
  border-left: 3px solid var(--color-base-300, #d1d5db);
  padding-left: 1rem;
  font-style: italic;
  margin: 0.75rem 0;
}

.tiptap a {
  color: var(--color-primary, #167bff);
  text-decoration: underline;
}

.tiptap p { margin: 0.25rem 0; }

.tiptap img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  margin: 0.5rem 0;
}

.tiptap code {
  background: var(--color-base-200, #f3f4f6);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.8125rem;
}

.tiptap pre {
  background: var(--color-base-200, #f3f4f6);
  padding: 0.75rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.tiptap pre code {
  background: none;
  padding: 0;
}

.tiptap hr {
  border: none;
  border-top: 1px solid var(--color-base-300, #d1d5db);
  margin: 1rem 0;
}

/* ProseMirror cursor */
.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}
