/**
 * AOH Online Archive — print stylesheet.
 * Owned by: styling squad. Enqueued by the theme as handle `aoh-archive-print`
 * with media="print" (MODULE-CONTRACT §7), so it is inert on screen and needs
 * no @media print wrapper of its own — the <link media> attribute already
 * scopes it.
 *
 * Audience: genealogists and researchers printing a single entry
 * (single-archive_item.php) for their paper files. Goals:
 *   1. Strip chrome (masthead, nav, facets, footer, feedback CTA, decorative
 *      colour) that wastes ink/paper and has no value on a physical page.
 *   2. Make the citation and the outbound repository URL fully legible and
 *      *present as literal text* since a printed page can't be clicked.
 *   3. Keep it plain black-on-white, serif body copy, clear section rules.
 *
 * This file targets the class contract in docs/design/UI-IMPLEMENTATION.md §1
 * (the same names main.css styles for screen).
 */

/* ---- Global page setup -------------------------------------------------- */

@page {
	margin: 2cm 1.5cm;
}

body.aoh-archive {
	background: #fff !important;
	color: #000 !important;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 12pt;
	line-height: 1.5;
}

/* ---- Hide everything that isn't the entry itself ------------------------ */

.aoh-skip-link,
.aoh-utility,
.aoh-masthead,
.aoh-primary-nav,
.aoh-site-footer,
.aoh-breadcrumbs,
.aoh-facet-sidebar,
.aoh-active-filters,
.aoh-feedback-cta,
.aoh-pagination,
.aoh-entry__related,
.aoh-outbound__hint,
.aoh-outbound__domain,
.aoh-citation__copy,
.aoh-callout {
	display: none !important;
}

/* Reset grid scaffolding so the entry prints as one plain flowing column
   instead of leaving empty grid gaps where the sidebar/aside was. */
.aoh-layout,
.aoh-entry {
	display: block !important;
}

.aoh-main {
	padding: 0 !important;
}

.aoh-container {
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ---- Typography & colour -------------------------------------------------- */

h1,
h2,
h3,
h4 {
	color: #000 !important;
	font-family: Georgia, "Times New Roman", Times, serif;
	page-break-after: avoid;
}

.aoh-entry__title {
	font-size: 20pt;
	border-bottom: 1pt solid #000;
	padding-bottom: 6pt;
}

.aoh-acc-chip {
	background: none !important;
	color: #000 !important;
	border: 1pt solid #000;
	font-family: "Courier New", Courier, monospace;
}

.aoh-pill {
	background: none !important;
	color: #000 !important;
	border: 1pt solid #000;
}

.aoh-entry__daterange {
	color: #000 !important;
}

a {
	color: #000 !important;
	text-decoration: underline;
}

/* Expand link URLs as visible text so a printed page still carries the
   destination. Skip the citation box (already plain text) to avoid doubling. */
.aoh-desc a[href^="http"]::after,
.aoh-entry-meta a[href^="http"]::after,
.aoh-repo-card a[href^="http"]::after {
	content: " (" attr(href) ")";
	font-size: 9pt;
	font-family: "Courier New", Courier, monospace;
	word-break: break-all;
}

/* ---- Outbound repository link: print as literal text --------------------- */

.aoh-outbound__link {
	background: none !important;
	color: #000 !important;
	border: 1pt solid #000 !important;
	text-align: left;
	padding: 8pt;
}

.aoh-outbound__link[href^="http"]::after {
	content: " (" attr(href) ")";
	display: block;
	margin-top: 6pt;
	font-family: "Courier New", Courier, monospace;
	font-size: 9pt;
	font-weight: 400;
	word-break: break-all;
}

/* ---- Metadata & citation: the two blocks a genealogist files away -------- */

.aoh-entry-meta,
.aoh-citation {
	border: 1pt solid #000 !important;
	background: none !important;
	border-radius: 0;
	page-break-inside: avoid;
}

.aoh-entry-meta__row {
	border-bottom: 0.5pt solid #666 !important;
}

.aoh-citation__text {
	background: none !important;
	border: none !important;
	color: #000 !important;
	font-family: "Courier New", Courier, monospace;
	font-size: 10.5pt;
	padding: 0;
}

/* Footer line identifying the source + print date, appended once at the very
   end of the entry article via generated content so a printed page is
   self-citing even if separated from the rest of a print job. */
.aoh-entry::after {
	content: "Printed from AOH Online Archive — archive.aoh.com";
	display: block;
	margin-top: 18pt;
	padding-top: 6pt;
	border-top: 0.5pt solid #666;
	font-size: 9pt;
	color: #333 !important;
}

/* ---- Page-break hygiene ---------------------------------------------------- */

.aoh-card,
.aoh-entry-meta,
.aoh-citation,
.aoh-repo-card {
	page-break-inside: avoid;
}
