.ananeoo-image-width-adjusted :where(.figframe, .ibadge),
.editor-styles-wrapper [style*="--ananeoo-image-scale"] :where(.figframe, .ibadge) {
    transform: scale(var(--ananeoo-image-scale, 1));
    transform-origin: center center;
}

.ananeoo-image-width-adjusted :where(img, svg),
.editor-styles-wrapper [style*="--ananeoo-image-scale"] :where(img, svg) {
    transform: scale(var(--ananeoo-image-scale, 1));
    transform-origin: center center;
}

.ananeoo-image-width-adjusted :where(.figframe, .ibadge) :where(img, svg),
.editor-styles-wrapper [style*="--ananeoo-image-scale"] :where(.figframe, .ibadge) :where(img, svg) {
    transform: none;
}

.ananeoo-image-width-adjusted :where(figure, .figframe, .ibadge),
.editor-styles-wrapper [style*="--ananeoo-image-scale"] :where(figure, .figframe, .ibadge) {
    overflow: visible;
}

.figframe:has(> img[style*="max-width"]),
.editor-styles-wrapper .figframe:has(> img[style*="max-width"]) {
    display: table;
    width: fit-content;
    max-width: 100%;
}

.figframe:has(> img[style*="margin-left:auto"][style*="margin-right:auto"]),
.figframe:has(> img[style*="margin-left: auto"][style*="margin-right: auto"]),
.editor-styles-wrapper .figframe:has(> img[style*="margin-left:auto"][style*="margin-right:auto"]),
.editor-styles-wrapper .figframe:has(> img[style*="margin-left: auto"][style*="margin-right: auto"]) {
    margin-left: auto;
    margin-right: auto;
}

.figframe:has(> img[style*="margin-left:auto"][style*="margin-right:0"]),
.figframe:has(> img[style*="margin-left: auto"][style*="margin-right: 0"]),
.editor-styles-wrapper .figframe:has(> img[style*="margin-left:auto"][style*="margin-right:0"]),
.editor-styles-wrapper .figframe:has(> img[style*="margin-left: auto"][style*="margin-right: 0"]) {
    margin-left: auto;
    margin-right: 0;
}

.figframe:has(> img[style*="max-width"]) > img,
.editor-styles-wrapper .figframe:has(> img[style*="max-width"]) > img {
    display: block;
    width: 100%;
}
