/**
 * Formatted text (CKEditor content).
 */
.text-content {
  overflow-wrap: break-word;
}

.text-content::after {
  content: "";
  display: table;
  clear: both;
}

/* As in the original (Canvas resets ul/ol padding to 0): the list text is
   aligned with the paragraphs and the markers hang in the container padding.
   Only from 992px, where that padding (55px) is wide enough for "53." etc. */
@media (min-width: 992px) {
  .text-content ul,
  .text-content ol {
    padding-left: 0;
  }

  .text-content li ul,
  .text-content li ol {
    padding-left: 2em;
  }
}

/* The last paragraph keeps its bottom margin: in the original it adds to the
   spacing before the next section heading. */

.text-content table {
  width: 100%;
  border-collapse: collapse;
}

.text-content td,
.text-content th {
  padding: 6px 10px;
  border: 1px solid var(--ncmg-color-border);
  vertical-align: top;
}

.text-content img[align="left"] {
  float: left;
  margin: 0 12px 12px 0;
}

.text-content img[align="right"] {
  float: right;
  margin: 0 0 12px 12px;
}

.text-content .text-align-left { text-align: left; }
.text-content .text-align-right { text-align: right; }
.text-content .text-align-center { text-align: center; }
.text-content .text-align-justify { text-align: justify; }

.text-content .align-left { float: left; margin: 0 20px 13px 0; }
.text-content .align-right { float: right; margin: 0 0 13px 20px; }
.text-content .align-center { display: block; margin-inline: auto; }

/* As in the original (Bootstrap 3): no figure margin, the caption in the
   body text size directly under the image. */
.text-content figure {
  margin: 0;
}

.text-content figcaption {
  color: var(--ncmg-color-muted);
}

/* Consent placeholder of blocked embeds (src/ConsentEmbeds.php). */
.consent-placeholder {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin: 0 0 30px;
  padding: 20px;
  border: 1px dashed var(--ncmg-color-border-strong);
  background: var(--ncmg-color-surface);
}

.consent-placeholder p {
  margin: 0;
}

/* Word's empty <o:p></o:p> paragraphs: the original Drupal 8 filter turned
   them into an empty <p> (30px bottom margin), keep the same spacing. */
.text-content o\:p {
  display: block;
  margin-bottom: 30px;
}
