.wp-block-image {
	text-align: center;

	figcaption {
		color: #{map-deep-get($config-global, "color", "foreground", "light")};
		font-size: #{map-deep-get($config-global, "font", "size", "xs")};
		line-height: #{map-deep-get($config-global, "font", "line-height", "xs")};
		margin-top: calc(0.5 * #{map-deep-get($config-global, "spacing", "unit")});
		margin-bottom: #{map-deep-get($config-global, "spacing", "unit")};
		text-align: center;
	}
}

// Remove vertical margins from image block wrappers when floated
.entry-content > *[class="wp-block-image"],
.entry-content [class*="inner-container"] > *[class="wp-block-image"] {
	margin-top: 0;
	margin-bottom: 0;

	// Remove top margins from the following element when previous image block is floated
	& + * {
		margin-top: 0;
	}
}

img {
	height: auto;
	max-width: 100%;
	vertical-align: middle;
}
