/* Rich text editor (Jodit) — RTL Persian */
.rich-editor-wrap {
  direction: rtl;
}

.rich-editor-wrap .jodit-container {
  font-family: Shabnam, Tahoma, sans-serif;
  border-radius: 0.75rem;
  border-color: rgb(226 232 240) !important;
}

.rich-editor-wrap .jodit-toolbar__box {
  direction: rtl;
  flex-wrap: wrap;
  background: rgb(248 250 252);
  border-radius: 0.75rem 0.75rem 0 0;
}

.rich-editor-wrap .jodit-workplace {
  border-radius: 0 0 0.75rem 0.75rem;
}

.rich-editor-wrap .jodit-popup,
.rich-editor-wrap .jodit-popup__content {
  z-index: 120 !important;
}

.rich-editor-wrap .jodit-wysiwyg img {
  max-width: 100%;
  height: auto;
}

.rich-editor-wrap .jodit-wysiwyg {
  direction: rtl;
  text-align: right;
  font-family: "Shabnam", Tahoma, sans-serif;
  font-size: 0.875rem;
  line-height: 1.85;
  min-height: 260px;
  padding: 12px 16px;
}

.rich-editor-wrap .jodit-wysiwyg,
.rich-editor-wrap .jodit-wysiwyg * {
  font-family: "Shabnam", Tahoma, sans-serif !important;
}

.rich-editor-wrap .jodit-status-bar {
  direction: rtl;
}

/* Public article / news body */
.news-body-content {
  direction: rtl;
  text-align: right;
  line-height: 1.9;
  font-family: "Shabnam", Tahoma, sans-serif;
}

.news-body-content,
.news-body-content * {
  font-family: "Shabnam", Tahoma, sans-serif !important;
}

.news-body-content p {
  margin-bottom: 0.75rem;
}

.news-body-content ul,
.news-body-content ol {
  margin: 0.5rem 1.25rem 0.75rem 0;
  padding-right: 1.25rem;
}

.news-body-content img {
  max-width: 100%;
  border-radius: 0.75rem;
}

.news-body-content video,
.rich-editor-wrap .jodit-wysiwyg video {
  display: inline-block;
  max-width: 100%;
  width: min(100%, 640px);
  height: auto;
  margin: 0.75rem 0;
  border-radius: 0.75rem;
  background: #000;
  vertical-align: top;
}

.news-body-content iframe,
.rich-editor-wrap .jodit-wysiwyg iframe {
  display: inline-block;
  max-width: 100%;
  width: min(100%, 640px);
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 200px;
  margin: 0.75rem 0;
  border: 0;
  border-radius: 0.75rem;
  vertical-align: top;
}

.rich-editor-wrap .jodit-wysiwyg jodit-media {
  display: block;
  max-width: 100%;
  margin: 0.75rem 0;
  clear: none;
}

.rich-editor-wrap .jodit-wysiwyg jodit-media video,
.rich-editor-wrap .jodit-wysiwyg jodit-media iframe {
  display: block;
  width: 100%;
  margin: 0;
}

.news-body-content jodit-media {
  display: block;
  max-width: 100%;
  margin: 0.75rem 0;
}

.news-body-content jodit-media video,
.news-body-content jodit-media iframe {
  display: block;
  width: 100%;
  margin: 0;
}

/* Clear floats after aligned / floated media in article body */
.news-body-content::after {
  content: "";
  display: table;
  clear: both;
}

.news-body-content h1,
.news-body-content h2,
.news-body-content h3 {
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.news-body-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
}

.news-body-content table td,
.news-body-content table th {
  border: 1px solid rgb(226 232 240);
  padding: 0.5rem;
}
