/*
	Theme Name:		MiWiki 2023
	Theme Part:		j4b-print.css
	Description:	CSS-Formatierungen für den Ausdruck einer Seite
	Author:			Stefan Kuhn
	Author URI:		https://just4business.de/
	Template:		Generatepress Child-Theme MiWiki 2023
	Version:		0.1
*/


@media print {


	/* Setting margins */
	@page { 
		size: A4 portrait;
		margin: 1.5cm 2cm;
	}
	@page :header,
	@page :footer {
		display: none
	}


	/* Basic Typo */
	body {font-size: 12pt !important;}
	h1 {font-size:2.0em !important; hyphens:manual;}	/* 42.0px */
	h2 {font-size:1.6em !important; margin-bottom: calc(0.25em / 1.6);}	/* 33.6px */
	h3 {font-size:1.4em !important; margin-bottom: calc(0.25em / 1.4);}	/* 29.4px */
	h4 {font-size:1.2em !important; margin-bottom: calc(0.25em / 1.2);}	/* 25.2px */
	h5,h6 {font-size: 1em !important; margin-bottom: 0.25em;}		/* 21.0px */
	h1 {font-weight: 900 !important; line-height: 1.1 !important;}
	h2, h3, h4, h5, h6 {font-weight: 900 !important; line-height: 1.2 !important; hyphens:manual;}

	article .entry-title {
		margin-bottom: 0.5em !important;
	}
	.content-area .dachzeile {
		font-size: .5em !important;
		margin-bottom: 0.25em !important;
	}

	/* Grey Printout */
	body {
		filter: grayscale(1);
	}

	/* Seitenelemente ausblenden */
	/* Wordpress Admin-Bar ausblenden */
	#wpadminbar,
	/* Navigation ausblenden */
	.main-navigation .navigation-search,
	.main-navigation button.menu-toggle,
	.main-navigation #primary-menu,
	.main-navigation .menu-bar-items,
	.breadcrumb,
	.archive.one-container .site-main .paging-navigation,
	/* Footer ausblenden */
	.site-footer,
	/* Anzeigen ausblenden */
	.mitte-header-homepage,
	.mitte-bottom-homepage,
	.mitte-header-wordpress,
	.mitte-bottom-wordpress,
	.mitte-header-mediawiki,
	.mitte-bottom-mediawiki,
	/* Wordpress Post-Navigation ausblenden */
	.single .type-post .inside-article footer.entry-meta,
	/* MediaWiki Inhaltsverzeichnis ausblenden */
	.page.wissen .toc,
	/* Kennzeichnung externer Link ausblenden */
	.content-area a.external::after,
	/* Audio-Block ausblenden */
	.wp-block-audio
	{
		display:none !important;
	}

	body {
		margin-top: 0 !important;
		background-image: none !important;
	}

	.main-navigation {
		position: relative !important;
		box-shadow: none !important;
	}
	.main-navigation .inside-navigation {
		justify-content: center !important;
	}

	.main-navigation .site-logo a {
		padding: 0 !important;
	}

	.one-container .site-content, .one-container .inside-site-info {
		padding: 0 !important;
	}

	.content-area a.external {
		padding-right: inherit !important;
	}

.single .type-post .inside-article .featured-image+.entry-header,
.single .inside-article .entry-content,
.page.wissen .inside-article .entry-header,
.page.wissen .inside-article .teaser-text,
.page.wissen .entry-meta.mediawiki,
.page.wissen:not(.has-teaser) .inside-article .entry-header,
.page.wissen .inside-article .entry-content
{
	max-width: unset !important;
}

	/* Bilder: Automatische Breite aktivieren */
	.page.wissen div.floatright:has(img) {
		width: auto !important;
	}

	/* Überschriften: Kein Seitenumbruche nach h1-h6 Tags */
	h1, h2, h3, h4, h5, h6,
	.h1, .h2, .h3, .h4, .h5, .h6 {
		break-inside: avoid !important;
		break-after: avoid !important;
	}

	/* Kästen im MediaWiki: Kein Schatten, einfache Umrahmung, Seitenumbrüche verhindern */
	.page.wissen .kasten {
		box-shadow: unset !important;
		border-top: 0.05em solid var(--wp-j4b-theme-color-accent) !important;
		border-bottom: 0.05em solid var(--wp-j4b-theme-color-accent) !important;
		border-right: 0.05em solid var(--wp-j4b-theme-color-accent) !important;
		break-inside: avoid;
	}


	/* Links formatieren */
	a, a:any-link {
		color: inherit !important;
		text-decoration: underline dashed 1px var(--wp-j4b-theme-color-accent);
		text-underline-offset: 0.25em !important;
	}
	#j4b_printout_canonical a {
		text-decoration: none;
	}

	/* "Nützliche Links" im MediaWiki: URL nach Titel zeigen */
	.page.wissen h2:has(span[id="Nützliche_Links"]) + ul {
		margin-top: 1.5em !important;
		--base-url: "https://www.mittelstandswiki.de" !important;
	}
	.page.wissen h2:has(span[id="Nützliche_Links"]) + ul a {
		text-decoration: none !important;
		font-weight: bold !important;
	}
	.page.wissen h2:has(span[id="Nützliche_Links"]) + ul a[href*="://"]::after,
	.page.wissen h2:has(span[id="Nützliche_Links"]) + ul a:not([href^="/"])::after {
		content: attr(href) !important;
		display: block !important;
		font-weight: normal !important;
	}
	.page.wissen h2:has(span[id="Nützliche_Links"]) + ul a[href^="/"]:not([href*="://"])::after {
		content: var(--base-url) attr(href) !important;
		display: block !important;
		font-weight: normal !important;
	}

	/* Wordpress-Buttons: URL nach Titel zeigen */
	.button, .wp-block-button .wp-block-button__link:any-link {
		--base-url: "https://www.mittelstandswiki.de" !important;
		background: unset;
	}
	.button, .wp-block-button .wp-block-button__link[href*="://"]::after,
	.button, .wp-block-button .wp-block-button__link:not([href^="/"])::after {
		content: attr(href) !important;
		display: block !important;
		font-weight: normal !important;
		text-transform: none !important;
	}
	.button, .wp-block-button .wp-block-button__link[href^="/"]:not([href*="://"])::after {
		content: var(--base-url) attr(href) !important;
		display: block !important;
		font-weight: normal !important;
		text-transform: none !important;
	}

	/* Überhohe Aufmacherbilder auf maximal 50% der Seitenhöhe beschränken */
	.single .type-post .inside-article .featured-image {
		text-align: center;
		max-height: 50vh;
	}
	.single .type-post .inside-article .featured-image img {
		object-fit: contain;
		width: 100%;
		height: unset;
		max-width: calc( (210mm - 4cm));
		max-height: calc( ((297mm - 3cm) / 2) - 1.5em - (0.8em * 1.5) );
		border: none;
	}


	::marker {
		color: var(--wp-j4b-theme-color-accent);
	}



}




