/*!
 * NEWS TEMPLATE FIX
 *
 * Scope: only WordPress single posts (body.single-post).
 *
 * Goals:
 * - Wider (but readable) header + content container.
 * - Prevent unintended gray backgrounds on layout blocks (Columns / Media+Text / Group)
 *   when the editor did NOT set a background.
 *
 * Notes:
 * - We deliberately do NOT override blocks that have `.has-background` or inline background styles,
 *   so intentional Gutenberg background choices still work.
 */

body.single-post {
	/* “Wider, but reasonable” reading width; safe on mobile via min(100%, …). */
	--theme--mod--layout_width_content: min(100%, clamp(860px, 70vw, 1040px));
}

/* Ensure a clean page background behind content. */
body.single-post main#content {
	background-color: var(--wp--preset--color--base);
}

/*
 * Remove accidental background-color on layout blocks,
 * but ONLY when background was not explicitly set.
 */
body.single-post :where(.wp-block-post-content) :where(
	.wp-block-columns,
	.wp-block-column,
	.wp-block-media-text,
	.wp-block-group
):not(.has-background):not([style*="background-color"]):not([style*="background:"]) {
	background-color: transparent;
}

