/* Release the viewport clipping and smooth-scroll transform for printing.
 * Keep screen scrolling unchanged; only already-loaded content can be printed.
 */
@media print {
	html,
	body,
	.body_wrap,
	.main {
		height: auto !important;
		overflow: visible !important;
	}

	#scroll_wrap {
		min-height: 0 !important;
		transform: none !important;
	}

	#scroll_inner_wrap {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}

	#single {
		overflow: visible !important;
	}

	/* Hide the whole ad slot, including labels and reserved space. */
	.ad,
	.single_ad,
	.ad_container,
	.underlay-ad-container,
	.mings-inarticle-1x1,
	.iframe_ad {
		display: none !important;
	}

	/* Screen navigation and overlays have no place in the printed article. */
	#header_wrap,
	#single_header,
	#footer,
	#cookies,
	#cc-main,
	.backtotop,
	.popup,
	#fancybox-auto-overlay,
	#fancybox-auto-content-wrapper,
	#single .post_details .function,
	#single .content .recommended,
	#single .content .popup_btn,
	#single .credit > .wrap:first-child,
	#single .credit .bot,
	#single .related {
		display: none !important;
	}

	#single::before {
		display: none !important;
	}

	#single .single_title {
		padding-top: 0 !important;
	}

	#single .post_details {
		padding-bottom: 20px !important;
	}

	#single .max_width {
		margin-bottom: 24px !important;
	}

	#single .content {
		padding-bottom: 0 !important;
	}

	/* Keep images proportional and small enough to share a printed page with text.
	 * Inline-block image wrappers otherwise move as a whole to the next page.
	 */
	#single .content .image {
		display: block !important;
		margin-bottom: 24px !important;
	}

	#single .content .image img {
		width: auto !important;
		height: auto !important;
		max-width: 100% !important;
		max-height: 150mm !important;
		margin: 0 auto !important;
	}

	#single .credit > .wrap {
		padding: 8px 0 !important;
	}
}
