/* Styling for content area headers and elements */

.content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.content h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

.content h4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

.content h5 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.content h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Styling for other content elements */
.content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.content ul, .content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

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

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

.content li {
  margin-bottom: 0.5rem;
}

.content pre {
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  color: #abb2bf;
  margin: 1rem 0;
}

.content pre code {
  background: transparent !important;
  padding: 0;
  color: inherit;
}

.content code:not(pre code) {
  padding: 0.2em 0.4em;
  border-radius: 0.2em;
  font-size: 0.9em;
  color: #e53e3e;
}

/* Preview container styles */
#content-preview {
  min-height: 200px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background-color: white;
}

/* Quill editor specific styles */
/* Make the toolbar sticky */
.ql-toolbar.ql-snow {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-top: none !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add padding to the editor container to prevent content from going under sticky toolbar */
.ql-container.ql-snow {
  padding-top: 8px;
}

/* Autosave notification styles */
.autosave-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  background-color: #4CAF50;
  color: white;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.autosave-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.autosave-notification.error {
  background-color: #f44336;
}

.ql-syntax {
  background-color: #282c34 !important;
  color: #abb2bf !important;
  border-radius: 0.25rem;
  padding: 1rem !important;
  margin: 0.5rem 0 !important;
  font-family: 'Fira Code', 'Courier New', monospace !important;
  font-size: 0.9em;
  line-height: 1.5;
  white-space: pre !important;
  overflow-x: auto !important;
}

/* Ensure code blocks in preview have proper styling */
#content-preview pre,
#content-preview code {
  font-family: 'Fira Code', 'Courier New', monospace !important;
  font-size: 0.9em;
  line-height: 1.5;
  white-space: pre !important;
  overflow-x: auto !important;
  max-width: 100%;
}

/* Make sure the preview container handles code blocks well */
#content-preview {
  max-width: 100%;
  overflow-x: auto;
}

/* Fix for inline code in preview */
#content-preview code:not(pre code),
#content-preview .inline-code {
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 0.2em;
  font-size: 0.9em;
  color: #e53e3e;
  white-space: nowrap;
  font-family: 'Fira Code', 'Courier New', monospace !important;
  font-size: 0.85em;
  line-height: 1.5;
  border: 1px solid #e2e8f0;
}

/* Ensure proper spacing in lists */
#content-preview ul,
#content-preview ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

#content-preview li {
  margin: 0.25rem 0;
}

.content blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  margin-bottom: 1rem;
}

.content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
}

.content figure {
  margin: 1rem 0;
}

.content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.content mark {
  background-color: #fef08a;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
}

/* Add styling for images with special classes */
.content figure.with-border img {
  border: 2px solid #000;
}

.content figure.stretched img {
  width: 100%;
}

.content figure.with-background {
  background-color: #f5f5f5;
  padding: 1rem;
}


/* Custom styles for ordered lists in preview */
#content-preview ol {
  list-style-type: decimal !important;
  padding-left: 2rem !important;
  margin-bottom: 1rem !important;
}
#content-preview ol li {
  display: list-item !important;
  margin-bottom: 0.5rem !important;
}
#content-preview ul {
  list-style-type: disc !important;
  padding-left: 2rem !important;
  margin-bottom: 1rem !important;
}
#content-preview ul li {
  display: list-item !important;
  margin-bottom: 0.5rem !important;
}

.align-center {
    text-align: center;
}

.leading-relaxed>pre{
  padding-left: 1rem;
}