/* 4.14.2 — isolate images in the bibliographic entry's editorial content.
 * Shared by the themed view and standalone full-text view.
 * No clipping, fixed heights, reparenting or changes to stored post_content.
 */
.bai-entry-content {
    display: flow-root;
    clear: both;
    min-width: 0;
}

/* Clearfix fallback also covers a theme overriding display: flow-root. */
.bai-entry-content::after {
    content: "";
    display: table;
    clear: both;
}

.bai-entry-content img {
    max-width: 100%;
    height: auto;
}

/* Keep captions/figures inside the same region, including inline widths. */
.bai-entry-content .wp-caption,
.bai-entry-content .wp-block-image {
    max-width: 100%;
    box-sizing: border-box;
}

/* WordPress alignment classes must also work without the theme (full view). */
.bai-entry-content .alignleft {
    float: left;
    max-width: calc(100% - 1.25rem);
    margin: 0 1.25rem 1rem 0;
}

.bai-entry-content .alignright {
    float: right;
    max-width: calc(100% - 1.25rem);
    margin: 0 0 1rem 1.25rem;
}

.bai-entry-content .aligncenter {
    display: block;
    float: none;
    clear: both;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* On a phone retain left/right alignment, but leave prose a full line. */
@media (max-width: 600px) {
    .bai-entry-content .alignleft,
    .bai-entry-content .alignright {
        float: none;
        display: block;
        max-width: 100%;
        margin: 0 0 1rem;
    }
    .bai-entry-content .alignleft { margin-right: auto; }
    .bai-entry-content .alignright { margin-left: auto; }
    .bai-entry-content figure.alignleft,
    .bai-entry-content figure.alignright { width: fit-content; }
}
