/* Add this to your global CSS or create a separate tiptap.css file */

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

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

/* Headings */
.ProseMirror h1 {
  font-size: 2em;
  font-weight: bold;
  margin-top: 0.67em;
  margin-bottom: 0.67em;
  line-height: 1.2;
}

.ProseMirror h2 {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 0.83em;
  margin-bottom: 0.83em;
  line-height: 1.3;
}

.ProseMirror h3 {
  font-size: 1.17em;
  font-weight: bold;
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.4;
}

.ProseMirror h4 {
  font-size: 1em;
  font-weight: bold;
  margin-top: 1.33em;
  margin-bottom: 1.33em;
}

/* Paragraphs */
.ProseMirror p {
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.6;
}

/* Lists */
.ProseMirror ul,
.ProseMirror ol {
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.ProseMirror ul {
  list-style-type: disc;
}

.ProseMirror ol {
  list-style-type: decimal;
}

.ProseMirror li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Code */
.ProseMirror code {
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
}

.ProseMirror pre {
  background-color: #1f2937;
  color: #f3f4f6;
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin-top: 1em;
  margin-bottom: 1em;
}

.ProseMirror pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* Blockquote */
.ProseMirror blockquote {
  border-left: 4px solid #dc2626;
  padding-left: 1em;
  margin-left: 0;
  margin-top: 1em;
  margin-bottom: 1em;
  font-style: italic;
  color: #4b5563;
}

/* Links */
.ProseMirror a {
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
}

.ProseMirror a:hover {
  color: #2563eb;
}

/* Horizontal Rule */
.ProseMirror hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2em 0;
}

/* Bold, Italic, Underline, Strike */
.ProseMirror strong {
  font-weight: bold;
}

.ProseMirror em {
  font-style: italic;
}

.ProseMirror u {
  text-decoration: underline;
}

.ProseMirror s {
  text-decoration: line-through;
}

/* Text Alignment */
.ProseMirror [style*="text-align: left"] {
  text-align: left;
}

.ProseMirror [style*="text-align: center"] {
  text-align: center;
}

.ProseMirror [style*="text-align: right"] {
  text-align: right;
}

.ProseMirror [style*="text-align: justify"] {
  text-align: justify;
}

/* Selection */
.ProseMirror::selection {
  background-color: #dbeafe;
}

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

/* Scrollbar for editor */
.ProseMirror::-webkit-scrollbar {
  width: 8px;
}

.ProseMirror::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.ProseMirror::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.ProseMirror::-webkit-scrollbar-thumb:hover {
  background: #555;
}