/* OGC Blog image wrapping V2 — editor preview and published article output. */
.ogcb-rich-content img.ogc-image-left,
.ogcb-rich-content img.alignleft,
.ogcb-article-body img.ogc-image-left,
.ogcb-article-body img.alignleft {
    float: left !important;
    display: inline-block;
    width: 40%;
    max-width: 360px;
    height: auto;
    margin: 6px 22px 14px 0 !important;
}

.ogcb-rich-content img.ogc-image-right,
.ogcb-rich-content img.alignright,
.ogcb-article-body img.ogc-image-right,
.ogcb-article-body img.alignright {
    float: right !important;
    display: inline-block;
    width: 40%;
    max-width: 360px;
    height: auto;
    margin: 6px 0 14px 22px !important;
}

.ogcb-rich-content img.ogc-image-center,
.ogcb-rich-content img.aligncenter,
.ogcb-article-body img.ogc-image-center,
.ogcb-article-body img.aligncenter {
    display: block !important;
    float: none !important;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 22px auto !important;
}

.ogcb-rich-content::after,
.ogcb-article-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile articles stack floated images above their accompanying text. */
@media (max-width: 600px) {
    .ogcb-rich-content img.ogc-image-left,
    .ogcb-rich-content img.ogc-image-right,
    .ogcb-rich-content img.alignleft,
    .ogcb-rich-content img.alignright,
    .ogcb-article-body img.ogc-image-left,
    .ogcb-article-body img.ogc-image-right,
    .ogcb-article-body img.alignleft,
    .ogcb-article-body img.alignright {
        display: block !important;
        float: none !important;
        width: 100% !important;
        max-width: 100%;
        margin: 16px 0 !important;
    }
}

/* Small visual refinement for TinyMCE's floating image toolbar. */
.tox .tox-pop .tox-toolbar {
    border: 1px solid #e2ebe7;
    border-radius: 8px;
    box-shadow: 0 7px 22px rgba(16, 43, 56, .12);
}
