/* Shared rich-text content styles.

   Loaded both in the admin CKEditor editing area (via CKEDITOR_CONFIGS
   'contentsCss' + 'bodyClass': 'bd-rich-content') and on the public page
   view, so what an admin sees while typing matches the rendered page.

   An admin can insert media with a fixed width (e.g. 400px) that would
   overflow narrow viewports and cause horizontal scroll on mobile;
   constrain all media to the container. */
.bd-rich-content {
    overflow-wrap: break-word;
}

.bd-rich-content img,
.bd-rich-content video {
    max-width: 100% !important;
    height: auto !important;
}

.bd-rich-content figure,
.bd-rich-content iframe {
    max-width: 100%;
}

/* Wide tables scroll within their own box instead of the whole page. */
.bd-rich-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}
