/* Tiptap editor styles */

.tiptap-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 0.25rem;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

.tiptap-toolbar-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.tiptap-toolbar-btn.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.tiptap-divider {
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  background: #d1d5db;
  margin: 0 0.125rem;
  flex-shrink: 0;
}

/* ProseMirror editor area */
.tiptap-editor-content {
  padding: 0.75rem 1rem;
  min-height: 12rem;
  font-size: 0.875rem;
  color: #111827;
  line-height: 1.625;
}

.tiptap-editor-content p {
  margin-bottom: 0.75em;
}

.tiptap-editor-content p:last-child {
  margin-bottom: 0;
}

.tiptap-editor-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1em;
  margin-bottom: 0.4em;
  color: #111827;
}

.tiptap-editor-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1em;
  margin-bottom: 0.4em;
  color: #111827;
}

.tiptap-editor-content h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.75em;
  margin-bottom: 0.3em;
  color: #111827;
}

.tiptap-editor-content ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}

.tiptap-editor-content ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}

.tiptap-editor-content li {
  margin-bottom: 0.25em;
}

.tiptap-editor-content blockquote {
  border-left: 3px solid #d1d5db;
  padding-left: 1em;
  margin-left: 0;
  color: #6b7280;
  font-style: italic;
}

.tiptap-editor-content code {
  background: #f3f4f6;
  border-radius: 0.2em;
  padding: 0.1em 0.3em;
  font-family: monospace;
  font-size: 0.875em;
}

.tiptap-editor-content pre {
  background: #f3f4f6;
  border-radius: 0.375rem;
  padding: 0.75em 1em;
  overflow-x: auto;
  margin-bottom: 0.75em;
}

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

.tiptap-editor-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 1em 0;
}

.tiptap-editor-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tiptap-editor-content a:hover {
  color: #1d4ed8;
}

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

/* ProseMirror selection */
.tiptap-editor-content .ProseMirror-selectednode {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
