/*
 * Remote featured images stay in normal document flow, remain inside their
 * content area, and preserve their aspect ratio on narrow screens.
 */
img.uidi-remote-image {
	display: block;
	box-sizing: border-box;
	max-width: 100%;
	height: auto;
}

/*
 * A registered hard-crop size gets a deterministic aspect ratio and uses the
 * browser to crop visually. The original remote file is never fetched or
 * resized by WordPress.
 */
img.uidi-remote-image-cropped {
	object-fit: cover;
}

/*
 * Core/block themes can give Post Featured Image a fixed aspect-ratio box.
 * Native images receive 100% width/height plus object-fit:cover, but a remote
 * image has no attachment markup to provide those declarations. Match the
 * native crop geometry in archive/query contexts so the remote image cannot
 * overflow its figure and cover the title or excerpt.
 */
body.archive .wp-block-post-featured-image img.uidi-remote-image,
body.blog .wp-block-post-featured-image img.uidi-remote-image,
body.search .wp-block-post-featured-image img.uidi-remote-image,
.wp-block-query .wp-block-post-featured-image img.uidi-remote-image {
	position: static !important;
	inset: auto !important;
	float: none !important;
	display: block !important;
	width: 100% !important;
	max-width: 100%;
	height: 100% !important;
	object-fit: cover !important;
	margin: 0;
}
