/* BabyPark mobile editorial media V17 / scoped rich text responsive sizing.
 * Applies to all currently published AND future basic pages, articles, news,
 * sections and branded informational bodies. Never touch product/catalog media.
 * Intentionally CSS-only: source image attributes/HTML & editor remain intact.
 */
@media (max-width:767px) {
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-items,
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item {
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }

  /* Clamp rich-text images even when WYSIWYG saved inline width:500px;height:500px.
     CSS height:auto reestablishes native aspect; small graphics are NOT upscaled. */
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item img {
    max-width:100%!important;
    height:auto!important;
    object-fit:contain;
    box-sizing:border-box;
  }

  /* Editor blocks holding images can have hard-coded widths. Protect the
     surrounding content without turning every paragraph into a new layout. */
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item :is(figure,picture),
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item :is(div,p):has(> img) {
    max-width:100%!important;
    min-width:0;
    box-sizing:border-box;
  }

  /* Videos/embeds inside authored editorial content, not Chatwoot, product
     galleries or checkout. Leave arbitrary iframe heights untouched. */
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item :is(iframe,video,embed,object) {
    max-width:100%!important;
    box-sizing:border-box;
  }
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item :is(
    iframe[src*="youtube.com/embed/"],iframe[src*="youtube-nocookie.com/embed/"],
    iframe[src*="player.vimeo.com/video/"],video
  ) {
    width:100%!important;
    aspect-ratio:16/9;
    height:auto!important;
  }

  /* Older rich-text pages sometimes embed images in two-column fixed-width
     layout tables. Keep table semantics and let cells flex within the
     editorial column, without touching text/legal tables without images. */
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item table:has(img) {
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed;
    box-sizing:border-box;
  }
  body:is(.node-type-page,.node-type-article,.node-type-news,.node-type-section,.node-type-brand)
  .node .field-name-body .field-item table:has(img) :is(td,th) {
    width:auto!important;
    max-width:100%;
    min-width:0;
    overflow-wrap:anywhere;
    box-sizing:border-box;
  }
}
@media (prefers-reduced-motion:reduce) {
  /* No animation is introduced by this stylesheet. */
}
/* /BABYPARK_EDITORIAL_MEDIA_V17 */