/* =============================================================================
 * 99-print.css -- enqueued with media="print".
 *
 * BYTE-IDENTICAL across both sites.
 *
 * Enqueued LAST and with media="print", so it is never a dependency of any
 * other sheet -- see quadtech_css_manifest() in _shared/php/enqueue.php, which
 * deliberately does not chain anything after it.
 *
 * This is not decoration. GlobeFreight's classic pages include the ICExpress
 * T&Cs (27,217 bytes) and a Glossary -- documents people genuinely print or
 * save to PDF. Printing the textured body wastes ink and printing the chrome
 * wastes a page.
 * ========================================================================== */

@media print {

	/* ---- drop the chrome ---------------------------------------------- */
	.qt-header,
	.qt-footer,
	.qt-nav-toggle,
	.skip-link,
	.qt-slot,
	.qt-whatsapp-float,
	.qt-searchform {
		display: none !important;
	}

	/* ---- flatten the sheet --------------------------------------------
	 * The texture/sheet pair from 30-sheet.css is a SCREEN feature. On paper
	 * both parts go together -- same rule as always: never one without the
	 * other.
	 *
	 * Body copy prints BLACK, not the harvested ink. --qt-ink is #334155 on
	 * AT and #333333 on GF; both are mid-greys chosen for a backlit white
	 * sheet, and both print noticeably lighter than they look. Paper is not a
	 * screen, so this is one of the few places the theme deliberately departs
	 * from the measurement. */
	body {
		background: none !important;
		background-color: #ffffff !important;
		color: #000000 !important;
	}

	.qt-container,
	#content.site-content {
		background: none !important;
		box-shadow: none !important;
		border-radius: 0 !important;
		max-width: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	.qt-entry__title,
	.qt-entry__content,
	.qt-entry__content h2,
	.qt-entry__content h3,
	.qt-entry__content h4 {
		color: #000000 !important;
	}

	/* ---- links --------------------------------------------------------
	 * Printing a URL after every link is a well-known pattern and a
	 * well-known annoyance on a page full of nav links. Apply it to prose
	 * only -- the chrome is already hidden above. */
	.qt-entry__content a {
		color: #000000 !important;
		text-decoration: underline;
	}

	.qt-entry__content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		word-break: break-all;
	}

	/* ---- page breaks ---------------------------------------------------- */
	.qt-entry__content h2,
	.qt-entry__content h3 {
		break-after: avoid;
		page-break-after: avoid;
	}

	.qt-entry__content table,
	.qt-entry__content figure,
	.qt-entry__content blockquote {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	/* A scrolling table cannot scroll on paper. Undo 40-content.css's
	 * `display: block; overflow-x: auto` or the last columns are lost. */
	.qt-entry__content table {
		display: table;
		overflow: visible;
	}

	/* ---- forms ----------------------------------------------------------
	 * A printed form is a dead form. Hide the frame rather than printing an
	 * empty iframe box -- but keep the reference number, which is the one
	 * thing on the page a person might actually want on paper (R4). */
	.qt-form-frame,
	.gform_wrapper,
	.forminator-ui {
		display: none !important;
	}

	.qt-form__ref {
		display: block !important;
		font-size: 1.1em;
		font-weight: 700;
		color: #000000 !important;
		border-color: #000000 !important;
	}
}
