/* Shared by the admin editor and published rich text. Dimensions live in HTML attributes.
   Template sizing rules use :not(:where(.rich-image)), preserving specificity for untouched images. */
figure:has(img.rich-image) {
    width: auto;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
img.rich-image {
    display: block;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
}
img.rich-image-left { margin-left: 0; margin-right: auto; }
img.rich-image-center { margin-left: auto; margin-right: auto; }
img.rich-image-right { margin-left: auto; margin-right: 0; }

/* Explicit editor alignment takes precedence over a template's default text alignment. */
.rich-text-left { text-align: left !important; }
.rich-text-center { text-align: center !important; }
.rich-text-right { text-align: right !important; }
