/* Shared by published post content and the WordPress visual editors. */
.pp-blog-single img[data-pp-image-preview] { cursor: zoom-in; }
.pp-blog-single img[data-pp-image-preview]:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 4px; }
body.pp-image-modal-open { overflow: hidden; }
.pp-image-modal { width: fit-content; max-width: 94vw; max-height: 94vh; padding: 48px 20px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-solid, #fff); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.pp-image-modal::backdrop { background: rgba(5, 12, 28, .82); }
.pp-image-modal-close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-soft); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.pp-image-modal figure { margin: 0; }
.pp-image-modal img { display: block; width: auto; height: auto; max-width: min(1400px, 85vw); max-height: 72vh; margin: auto; object-fit: contain; }
.pp-image-modal img[hidden] { display: none; }
.pp-image-modal figcaption { max-width: 75ch; margin: 12px auto 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; text-align: center; }
.pp-image-modal-error { max-width: 40ch; }

.pp-post-content {
    display: flow-root;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption) {
    box-sizing: border-box;
    max-width: 100%;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) img {
    height: auto;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(figure.wp-block-image, figure[class*="img-"], .wp-caption) {
    margin: 1.5em 0;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(figure, .wp-caption) img {
    display: block;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption):is(.img-left, .alignleft) {
    display: block;
    float: left;
    margin: .35em 24px 18px 0;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption):is(.img-right, .alignright) {
    display: block;
    float: right;
    margin: .35em 0 18px 24px;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption):is(.img-center, .aligncenter) {
    display: block;
    float: none;
    margin: 1.5em auto;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-25 { width: 25%; }
:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-50 { width: 50%; }
:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-75 { width: 75%; }
:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-100 {
    width: 100%;
    float: none;
    margin-right: 0;
    margin-left: 0;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(figure, .wp-caption):is(.img-25, .img-50, .img-75, .img-100) img {
    width: 100%;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-rounded,
:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(figure, .wp-caption).img-rounded img {
    border-radius: 18px;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-square,
:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(figure, .wp-caption).img-square img {
    border-radius: 0;
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-border {
    border: 1px solid var(--line, #e8ebe4);
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-shadow {
    box-shadow: 0 10px 28px rgba(17, 90, 136, .16);
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption).img-box {
    padding: 12px;
    border: 1px solid var(--line, #e8ebe4);
    border-radius: 18px;
    background: var(--surface-solid, #fff);
    box-shadow: 0 8px 24px rgba(17, 90, 136, .1);
}

:where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(figcaption, p.wp-caption-text) {
    margin: 10px 0 0;
    color: var(--ink-soft, #596258);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    :where(.pp-post-content, .editor-styles-wrapper, .mce-content-body) :is(img, figure, .wp-caption):is(.img-left, .img-right, .img-center, .alignleft, .alignright, .aligncenter, .img-25, .img-50, .img-75, .img-100) {
        float: none;
        width: 100%;
        margin: 1.25em auto;
    }
}
