/* Quill rich editor — panel */
.rich-editor {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.65rem;
  overflow: hidden;
  background: var(--background, #fff);
}

.rich-editor .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: color-mix(in srgb, var(--muted, #f1f5f9) 70%, transparent);
  font-family: inherit;
  direction: rtl;
}

.rich-editor .ql-container.ql-snow {
  border: 0;
  font-family: inherit;
  font-size: 0.925rem;
  direction: rtl;
}

.rich-editor .ql-editor {
  min-height: 180px;
  line-height: 1.85;
  text-align: right;
}

.rich-editor .ql-editor.ql-blank::before {
  right: 15px;
  left: auto;
  font-style: normal;
  color: var(--muted-foreground, #94a3b8);
}

.rich-editor .ql-snow .ql-picker {
  color: inherit;
}

/* Public / read view */
.rich-content {
  font-size: 0.95rem;
  line-height: 1.9;
  color: inherit;
}

.rich-content p {
  margin: 0 0 0.85em;
}

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

.rich-content h2,
.rich-content h3,
.rich-content h4 {
  font-weight: 700;
  margin: 1.25em 0 0.5em;
  line-height: 1.4;
}

.rich-content h2 { font-size: 1.25rem; }
.rich-content h3 { font-size: 1.1rem; }
.rich-content h4 { font-size: 1rem; }

.rich-content ul,
.rich-content ol {
  margin: 0.5em 0 0.85em;
  padding-inline-start: 1.4rem;
}

.rich-content li {
  margin: 0.25em 0;
}

.rich-content blockquote {
  margin: 0.85em 0;
  padding: 0.5rem 1rem;
  border-inline-start: 3px solid var(--primary, #1b84ff);
  background: color-mix(in srgb, var(--muted, #f1f5f9) 60%, transparent);
  color: var(--secondary-foreground, #64748b);
}

.rich-content a {
  color: var(--primary, #1b84ff);
  text-decoration: underline;
}

.rich-content strong,
.rich-content b {
  font-weight: 700;
}
