/*
 * Print Stylesheet
 * Ensures only the drawing is printed. Hides all UI elements.
 */

/* Remove cabeçalhos, datas e URLs nativos do navegador */
@page {
	margin: 0; 
}

@media print {
	/* Hide UI */
	#masthead,
	#colophon,
	.action-buttons,
	.ad-container,
	.page-header,
	.print-counter-badge,
	#wpadminbar,
	.entry-header,
	.post-navigation,
	.entry-content,
	.site-footer,
	.related-drawings,
	.other-themes-section {
		display: none !important;
	}

	/* Show Site Branding */
	.print-only-site-name {
		display: block !important;
	}

	/* Reset Backgrounds & Apply Safe Printing Area */
	body, html, #page, #content, #primary, main, article, .imprimir-content-wrapper {
		background: transparent !important;
		background-color: transparent !important;
		color: #000 !important;
		margin: 0 !important;
		padding: 0 !important;
		height: 100vh !important;
		max-height: 100vh !important;
		overflow: hidden !important; /* Corta vazamentos invisíveis que geram páginas a mais */
		box-sizing: border-box !important;
	}

	.drawing-image-container {
		width: 100% !important;
		height: 100vh !important;
		max-width: 100% !important;
		max-height: 100vh !important;
		border: none !important;
		padding: 0 !important;
		margin: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
	}

	.drawing-image-container img {
		max-width: 100% !important;
		max-height: 95vh !important; /* 95% da altura da folha atual para garantir que não vai transbordar e criar novas paginas */
		width: auto !important;
		height: auto !important;
		page-break-inside: avoid;
		display: block;
		margin: 0 auto;
	}

	/* Remove links printing */
	a[href]:after {
		content: none !important;
	}
}
