/* Markdown Content Styles */
.post-content,
.markdown-content,
.post-preview,
.message-preview {
  line-height: 1.6;
}

/* Remove excessive top margin from first element */
.post-content > *:first-child,
.markdown-content > *:first-child {
  margin-top: 0 !important;
}

/* Paragraphs */
.post-content p,
.markdown-content p {
  margin: 0.5rem 0;
}

/* Headings */
.post-content h1,
.markdown-content h1 {
  margin: 1.5rem 0 1rem 0; /* Increased top/bottom margin */
  font-size: 1.75rem;
  line-height: 1.3;
}

.post-content h2,
.markdown-content h2 {
  margin: 1.25rem 0 0.75rem 0; /* Increased top/bottom margin */
  font-size: 1.5rem;
  line-height: 1.3;
}

.post-content h3,
.markdown-content h3 {
  margin: 1rem 0 0.75rem 0; /* Increased top/bottom margin */
  font-size: 1.25rem;
  line-height: 1.3;
}

/* Lists */
.post-content ul,
.post-content ol,
.markdown-content ul,
.markdown-content ol {
  margin: 1rem 0; /* Increased vertical spacing */
  padding-left: 1.5rem;
}

.post-content li,
.markdown-content li {
  margin: 0.5rem 0; /* Increased item spacing */
}

/* Code blocks */
.post-content pre,
.markdown-content pre {
  margin: 0.75rem 0;
  padding: 1rem;
  background-color: #f6f8fa;
  border-radius: 6px;
  overflow-x: auto;
}

.post-content code,
.markdown-content code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.875em;
}

/* Inline code */
.post-content :not(pre) > code,
.markdown-content :not(pre) > code {
  background-color: #f6f8fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

/* Blockquotes */
.post-content blockquote,
.markdown-content blockquote {
  margin: 0.75rem 0;
  padding-left: 1rem;
  border-left: 4px solid #ddd;
  color: #666;
}

/* Images */
.post-content img,
.markdown-content img {
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
}

/* Links */
.post-content a,
.markdown-content a {
  color: #2563eb;
  text-decoration: none;
}

.post-content a:hover,
.markdown-content a:hover {
  text-decoration: underline;
}

/* Horizontal rules */
.post-content hr,
.markdown-content hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

/* Tables */
.post-content table,
.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75rem 0;
}

.post-content th,
.post-content td,
.markdown-content th,
.markdown-content td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: left;
}

.post-content th,
.markdown-content th {
  background-color: #f6f8fa;
  font-weight: 600;
}
