/*
 * CasinoMidas 1.0.8
 * Enhetlig och centrerad innehållslayout för vanliga sidor och artiklar.
 */

:root {
	--cmi-reading-width: 980px;
}

/* Håll titel och innehåll på samma centrerade linje. */
body.page #primary .ast-article-single > .entry-header,
body.single #primary .ast-article-single > .entry-header,
body.page #primary .ast-article-single > .entry-content,
body.single #primary .ast-article-single > .entry-content,
body.page #primary .ast-article-single > .post-thumb,
body.single #primary .ast-article-single > .post-thumb,
body.page #primary .ast-article-single > .ast-single-post-featured-section,
body.single #primary .ast-article-single > .ast-single-post-featured-section {
	box-sizing: border-box;
	width: 100% !important;
	max-width: var(--cmi-reading-width) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Alla cmi-komponenter använder hela den centrerade läsbredden. */
body.page #primary .ast-article-single .entry-content,
body.single #primary .ast-article-single .entry-content {
	--cmi-maxw: 100%;
}

/* Tidigare hade vanliga element 860 px medan vissa boxar/tabeller var 100 %.
   Inom den nya läskolumnen ska allt utgå från samma bredd. */
body.page #primary .ast-article-single .entry-content > *,
body.single #primary .ast-article-single .entry-content > * {
	box-sizing: border-box;
	max-width: 100% !important;
}

/* Block och tabellwrappers ska följa samma bredd, inte gå ut till artikelkortets kant. */
body.page #primary .ast-article-single .entry-content > .alignwide,
body.page #primary .ast-article-single .entry-content > .alignfull,
body.single #primary .ast-article-single .entry-content > .alignwide,
body.single #primary .ast-article-single .entry-content > .alignfull,
body.page #primary .ast-article-single .entry-content > .wp-block-table,
body.single #primary .ast-article-single .entry-content > .wp-block-table,
body.page #primary .ast-article-single .entry-content > .cmi-tabell,
body.single #primary .ast-article-single .entry-content > .cmi-tabell {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.page #primary .ast-article-single .entry-content table,
body.single #primary .ast-article-single .entry-content table {
	width: 100% !important;
	max-width: 100% !important;
}

/* Formulär och deras vanligaste wrappers ska inte bli smalare än resten av sidan. */
body.page #primary .ast-article-single .entry-content :is(form, .wpcf7, .wpforms-container, .gform_wrapper),
body.single #primary .ast-article-single .entry-content :is(form, .wpcf7, .wpforms-container, .gform_wrapper) {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

@media (max-width: 767px) {
	:root {
		--cmi-reading-width: 100%;
	}

	body.page #primary .ast-article-single > .entry-header,
	body.single #primary .ast-article-single > .entry-header,
	body.page #primary .ast-article-single > .entry-content,
	body.single #primary .ast-article-single > .entry-content {
		max-width: 100% !important;
	}
}
