/**
 * Post image layout fix for Twenty Sixteen + IPB child theme.
 *
 * Problem: IPB hides .entry-footer, but parent theme JS still tags large images
 * with .below-entry-meta and CSS pulls them left (-40% margin) on desktop.
 *
 * Revert: set IPB_FIX_POST_IMAGE_LAYOUT to false in functions.php (or delete
 * this file and the enqueue block). Customizer Additional CSS is untouched.
 *
 * @version 1.0.0
 */

@media screen and (min-width: 61.5625em) {

	/* Use full content width instead of floated magazine column beside meta. */
	body:not(.search-results) article:not(.type-page) .entry-content {
		float: none;
		width: 100%;
	}

	/*
	 * Undo Twenty Sixteen "bleed" styles. Scoped to .entry-content so
	 * Customizer / per-post rules (e.g. main .wp-block-image) still apply.
	 */
	body:not(.search-results) article:not(.type-page) .entry-content img.below-entry-meta,
	body:not(.search-results) article:not(.type-page) .entry-content figure.below-entry-meta {
		margin-left: 0;
		margin-right: 0;
		max-width: 100%;
	}

	body:not(.search-results) article:not(.type-page) .entry-content .wp-block-image figcaption.below-entry-meta {
		margin-left: 0;
		margin-right: 0;
		max-width: 100%;
	}

	/* Keep resized / classic aligned images inside the content column. */
	body:not(.search-results) article:not(.type-page) .entry-content figure.alignleft,
	body:not(.search-results) article:not(.type-page) .entry-content figure.alignright,
	body:not(.search-results) article:not(.type-page) .entry-content figure.aligncenter,
	body:not(.search-results) article:not(.type-page) .entry-content .wp-block-image {
		max-width: 100%;
	}

	body:not(.search-results) article:not(.type-page) .entry-content figure img,
	body:not(.search-results) article:not(.type-page) .entry-content .wp-block-image img {
		max-width: 100%;
		height: auto;
	}
}
