/* Custom styling for rich text editor (currently using Lexxy) */

lexxy-editor {
  min-height: 300px;
  display: block;
  padding: 1rem;
  line-height: 1.6;
  font-size: 1rem;
}

lexxy-editor.rich-text-editor {
  min-height: 300px;
}

/* Style the editable content area inside the editor */
lexxy-editor .lexxy-content {
  min-height: 250px;
  padding: 0.5rem;
}

/* Make paragraphs more readable */
lexxy-editor p {
  margin-bottom: 1em;
  line-height: 1.7;
}

lexxy-editor p:last-child {
  margin-bottom: 0;
}

/* Style headings in the editor */
lexxy-editor h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75em;
  margin-top: 0.5em;
  color: #111827;
}

lexxy-editor h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75em;
  margin-top: 0.5em;
  color: #1f2937;
}

lexxy-editor h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75em;
  margin-top: 0.5em;
  color: #374151;
}

/* Style lists */
lexxy-editor ul,
lexxy-editor ol {
  margin-left: 1.5rem;
  margin-bottom: 1em;
  line-height: 1.7;
}

lexxy-editor ul {
  list-style-type: disc;
}

lexxy-editor ol {
  list-style-type: decimal;
}

lexxy-editor li {
  margin-bottom: 0.5em;
  padding-left: 0.25rem;
}

lexxy-editor li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
lexxy-editor ul ul,
lexxy-editor ol ul {
  list-style-type: circle;
  margin-top: 0.5em;
}

lexxy-editor ol ol,
lexxy-editor ul ol {
  list-style-type: lower-alpha;
  margin-top: 0.5em;
}

/* Style links */
lexxy-editor a {
  color: #2563eb;
  text-decoration: underline;
}

lexxy-editor a:hover {
  color: #1d4ed8;
}

/* Style strong and emphasis */
lexxy-editor strong {
  font-weight: 700;
  color: #111827;
}

lexxy-editor em {
  font-style: italic;
}

/* Style code */
lexxy-editor code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  color: #dc2626;
}

/* Placeholder text */
lexxy-editor::before {
  color: #9ca3af;
}

/* Hide attachment/upload and link buttons */
.lexxy-editor__toolbar button[data-command="uploadAttachments"],
.lexxy-editor__toolbar button[data-dialog-target="link-dialog"] {
  display: none;
}
