/*
 * This file is intentionally scoped to Analizi and Retro posts without the
 * statistics panel. It never changes colours, typography, headers, or other posts.
 */

body.kf-analysis-no-stats.single-post {
	--kf-analysis-image-width: 800px;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-image,
body.kf-analysis-no-stats.single-post article.type-post .entry-content > figure.wp-block-image,
body.kf-analysis-no-stats.single-post article.type-post .entry-content > img {
	box-sizing: border-box;
	width: min(var(--kf-analysis-image-width), 100%) !important;
	max-width: var(--kf-analysis-image-width) !important;
	margin: 30px auto !important;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-image > a,
body.kf-analysis-no-stats.single-post article.type-post .entry-content > figure.wp-block-image > a {
	display: block;
	width: 100%;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-image img,
body.kf-analysis-no-stats.single-post article.type-post .entry-content > figure.wp-block-image img,
body.kf-analysis-no-stats.single-post article.type-post .entry-content > img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: contain !important;
}

/*
 * Repairs the temporary 25/50/25 Gutenberg Columns workaround: when the side
 * columns are empty and the middle column contains the image, the plugin turns
 * that rendered block into the same centred 800 px presentation.
 */
body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-columns:has(> .wp-block-column:first-child:not(:has(*))):has(> .wp-block-column:nth-child(2) > .wp-block-image):has(> .wp-block-column:last-child:not(:has(*))) {
	display: block !important;
	box-sizing: border-box;
	width: min(var(--kf-analysis-image-width), 100%) !important;
	max-width: var(--kf-analysis-image-width) !important;
	margin: 30px auto !important;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-columns:has(> .wp-block-column:first-child:not(:has(*))):has(> .wp-block-column:nth-child(2) > .wp-block-image):has(> .wp-block-column:last-child:not(:has(*))) > .wp-block-column {
	display: none !important;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-columns:has(> .wp-block-column:first-child:not(:has(*))):has(> .wp-block-column:nth-child(2) > .wp-block-image):has(> .wp-block-column:last-child:not(:has(*))) > .wp-block-column:nth-child(2) {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	flex-basis: auto !important;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-columns:has(> .wp-block-column:first-child:not(:has(*))):has(> .wp-block-column:nth-child(2) > .wp-block-image):has(> .wp-block-column:last-child:not(:has(*))) .wp-block-image {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-columns:has(> .wp-block-column:first-child:not(:has(*))):has(> .wp-block-column:nth-child(2) > .wp-block-image):has(> .wp-block-column:last-child:not(:has(*))) .wp-block-image img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: contain !important;
}

@media (max-width: 860px) {
	body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-image,
	body.kf-analysis-no-stats.single-post article.type-post .entry-content > figure.wp-block-image,
	body.kf-analysis-no-stats.single-post article.type-post .entry-content > img,
	body.kf-analysis-no-stats.single-post article.type-post .entry-content > .wp-block-columns:has(> .wp-block-column:first-child:not(:has(*))):has(> .wp-block-column:nth-child(2) > .wp-block-image):has(> .wp-block-column:last-child:not(:has(*))) {
		width: 100% !important;
		max-width: 100% !important;
		margin-top: 24px !important;
		margin-bottom: 24px !important;
	}
}

