/*
 * 3.8.134-safe103 RC30 — Native article rendering
 * Goal: preserve Halo editor output instead of re-typesetting it with theme .rich-content rules.
 * This file intentionally does NOT set article typography, heading spacing, image alignment,
 * table width, borders or colors. It only adds responsive safety and neutralizes a few global
 * theme rules that would otherwise change editor-authored alignment/appearance.
 */

.article-native-content {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  color: inherit;
}

/* Do not let the corporate global paragraph/list color override editor-authored content. */
.article-native-content :where(p, li, small) {
  color: inherit;
}

/* Restore normal link semantics inside editor content. Inline/editor styles still win. */
.article-native-content a {
  color: revert;
  text-decoration: revert;
}

/* Preserve editor alignment. The global theme sets all images to display:block; inline-block
   lets parent text-align (left/center/right) work again while inline styles remain authoritative. */
.article-native-content img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: revert;
  vertical-align: middle;
}

.article-native-content figure,
.article-native-content picture,
.article-native-content video,
.article-native-content audio,
.article-native-content iframe,
.article-native-content embed,
.article-native-content object,
.article-native-content svg,
.article-native-content canvas {
  max-width: 100%;
}

.article-native-content video,
.article-native-content iframe,
.article-native-content embed,
.article-native-content object,
.article-native-content canvas {
  height: auto;
}

/* Keep authored table layout on desktop. Only prevent catastrophic overflow. */
.article-native-content table {
  max-width: 100%;
  white-space: normal;
}

.article-native-content :where(th, td) {
  white-space: normal;
}

.article-native-content pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

.article-native-content code {
  overflow-wrap: normal;
  word-break: normal;
}

/* Common editor alignment attributes/classes — do not depend on theme image centering. */
.article-native-content [style*="text-align: center"],
.article-native-content [style*="text-align:center"] {
  text-align: center;
}
.article-native-content [style*="text-align: right"],
.article-native-content [style*="text-align:right"] {
  text-align: right;
}
.article-native-content [style*="text-align: left"],
.article-native-content [style*="text-align:left"] {
  text-align: left;
}

/* Responsive safety only. Do not restyle desktop article content. */
@media (max-width: 768px) {
  .article-native-content {
    max-width: 100%;
    overflow-x: hidden;
  }

  .article-native-content img,
  .article-native-content video,
  .article-native-content canvas,
  .article-native-content svg {
    max-width: 100% !important;
    height: auto !important;
  }

  .article-native-content iframe,
  .article-native-content embed,
  .article-native-content object {
    max-width: 100% !important;
  }

  /* On narrow screens a wide authored table should scroll instead of being squeezed/reformatted. */
  .article-native-content table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-native-content pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
