/* TipTap Editor Content Styles */
.tiptap-content {
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #374151;
  max-width: none;
}

/* Headings */
.tiptap-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #111827;
}

.tiptap-content h1:first-child {
  margin-top: 0;
}

.tiptap-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  color: #111827;
}

.tiptap-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  color: #111827;
}

.tiptap-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  color: #111827;
}

.tiptap-content h5 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

.tiptap-content h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #111827;
}

/* Paragraphs */
.tiptap-content p {
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

/* Lists */
.tiptap-content ul,
.tiptap-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.2;
}

.tiptap-content ul {
  list-style-type: disc;
}

.tiptap-content ol {
  list-style-type: decimal;
}

.tiptap-content li {
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

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

/* Nested Lists */
.tiptap-content ul ul,
.tiptap-content ol ol,
.tiptap-content ul ol,
.tiptap-content ol ul {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.tiptap-content ul ul {
  list-style-type: circle;
}

.tiptap-content ul ul ul {
  list-style-type: square;
}

/* Text Formatting */
.tiptap-content strong {
  font-weight: 700;
}

.tiptap-content em {
  font-style: italic;
}

.tiptap-content s {
  text-decoration: line-through;
}

/* Links */
.tiptap-content a {
  color: #B7005F;
  text-decoration: underline;
  transition: color 0.2s ease-in-out;
}

.tiptap-content a:hover {
  color: #8e0048;
  text-decoration: underline;
}

.tiptap-content a:visited {
  color: #9d0052;
}

.tiptap-content a:focus {
  outline: 2px solid #B7005F;
  outline-offset: 2px;
  border-radius: 2px;
}

.tiptap-content a:active {
  color: #a0004d;
}

/* Code */
.tiptap-content code {
  background-color: #f3f4f6;
  color: #e11d48;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875em;
}

.tiptap-content pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.tiptap-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
}

/* Blockquotes */
.tiptap-content blockquote {
  border-left: 4px solid #d1d5db;
  margin: 1.5rem 0;
  padding-left: 1rem;
  color: #6b7280;
  font-style: italic;
}

.tiptap-content blockquote p {
  margin-bottom: 0.5rem;
}

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

/* Horizontal Rule */
.tiptap-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* Images */
.tiptap-content img {
  border: none;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
}

.tiptap-content img:only-child {
  margin: 0 auto;
}

/* Inline images */
.tiptap-content p img {
  display: inline-block;
  margin: 0 0.25rem;
  vertical-align: middle;
}

/* Figure and figcaption */
.tiptap-content figure {
  margin: 1.5rem 0;
  text-align: center;
}

.tiptap-content figure img {
  margin: 0 auto 0.5rem auto;
}

.tiptap-content figcaption {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Hard Break */
.tiptap-content br {
  line-height: 1.2;
}

/* Editor specific styles */
.ProseMirror {
  outline: none;
  line-height: 1.2;
}

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

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

/* Selection styles */
.ProseMirror .ProseMirror-selectednode {
  outline: 2px solid #68d391;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tiptap-content {
    font-size: 0.9rem;
  }
  
  .tiptap-content h1 {
    font-size: 1.875rem;
  }
  
  .tiptap-content h2 {
    font-size: 1.5rem;
  }
  
  .tiptap-content h3 {
    font-size: 1.25rem;
  }
  
  .tiptap-content ul,
  .tiptap-content ol {
    padding-left: 1.25rem;
  }
  
  .tiptap-content img {
    margin: 0.75rem auto;
  }
  
  .tiptap-content figure {
    margin: 1rem 0;
  }
}
