/*
 * Agively Framework — Print Stylesheet
 *
 * Loaded only when the page is printed (media="print").
 * Designed for US county and NGO sites where staff regularly print:
 *   - Meeting agendas and minutes pages
 *   - Department / service pages
 *   - Public documents and news posts
 *   - Staff directory entries
 *
 * PRINCIPLES
 * 1. Remove all chrome (header nav, footer, buttons, search, overlays).
 * 2. Show all content in a single full-width column.
 * 3. Use pt units — px and rem can be unpredictable across print drivers.
 * 4. Show URLs after links so printed pages are useful without a screen.
 * 5. Avoid page breaks inside headings, figures, tables, and blockquotes.
 * 6. Keep meeting tables and document cards legible without colour fills.
 */

/* =============================================================================
   01. Base Reset
   ============================================================================= */

*,
*::before,
*::after {
	background:  transparent !important;
	box-shadow:  none        !important;
	text-shadow: none        !important;
}

html {
	font-size: 12pt;
}

body {
	font-family:  Georgia, 'Times New Roman', Times, serif;
	font-size:    11pt;
	line-height:  1.6;
	color:        #000;
	margin:       0;
	padding:      0;
	width:        100%;
}

/* =============================================================================
   02. Hide Non-Content Elements
   ============================================================================= */

/* Navigation and header chrome */
.site-header__toggle,
.site-header__controls,
.site-header__search-toggle,
.site-search,
.site-nav,
#site-nav,

/* Footer: keep brand/address block but hide nav columns and social links */
.site-footer__menu,
.site-footer__social,
.site-footer__legal,

/* Interactive elements that are meaningless on paper */
.btn,
.btn--primary,
.btn--outline,
.btn--accent,
.btn--outline-light,
.btn--white,
.skip-link,
.search-form,
.search-no-results__form,
.search-no-results__links,

/* Pagination */
.wp-block-query-pagination,
.posts-navigation,
.post-navigation,
.single-post__nav,
.nav-links,

/* Meeting archive year-tab nav and filters */
.meeting-archive__year-tabs,
.meeting-archive__filters,
.meeting-archive__type-filter,

/* Document archive sidebar filter */
.document-archive__sidebar,

/* Overlays, toggles, sticky anything */
body.nav-open::before,

/* Post card images on archive/search pages (not single posts) */
.post-grid .post-card__image-link,

/* Homepage block elements unnecessary on print */
.block-hero__scroll-hint,
.block-cta,

/* 404 page actions */
.error-404__actions {
	display: none !important;
}

/* =============================================================================
   03. Layout — Single Full-Width Column
   ============================================================================= */

.container,
.site-header__inner,
.site-footer__grid,
.site-footer__body,
.layout-page,
.layout-single,
.layout-archive,
.layout-default,
.post-grid,
.document-archive__layout,
.single-post__body {
	display:   block   !important;
	max-width: 100%    !important;
	width:     100%    !important;
	margin:    0       !important;
	padding:   0       !important;
	gap:       0       !important;
	grid-template-columns: 1fr !important;
}

/* Give body content a modest margin for paper readability */
body > * {
	margin-left:  0.5cm;
	margin-right: 0.5cm;
}

/* =============================================================================
   04. Site Header — Logo and Site Name Only
   ============================================================================= */

.site-header {
	position:      static !important;
	border-bottom: 1.5pt solid #000;
	padding:       8pt 0;
	margin-bottom: 16pt;
	height:        auto !important;
}

.site-header__brand {
	display:    block;
	text-align: left;
}

.site-header__site-name {
	font-size:   16pt;
	font-weight: bold;
	color:       #000 !important;
}

.site-header__tagline {
	font-size: 9pt;
	color:     #333;
}

.custom-logo {
	max-height: 48pt;
	width:      auto;
}

/* =============================================================================
   05. Footer — Slim Print Footer
   ============================================================================= */

.site-footer {
	border-top: 1.5pt solid #000;
	margin-top: 20pt;
	padding:    8pt 0 4pt;
	color:      #333 !important;
}

.site-footer__name,
.site-footer__tagline,
.site-footer__description,
.site-footer__address {
	font-size: 9pt;
	color:     #333 !important;
}

/* =============================================================================
   06. Typography
   ============================================================================= */

h1 { font-size: 22pt; font-weight: bold; margin: 0 0 10pt; }
h2 { font-size: 17pt; font-weight: bold; margin: 16pt 0 6pt; }
h3 { font-size: 14pt; font-weight: bold; margin: 14pt 0 4pt; }
h4 { font-size: 12pt; font-weight: bold; margin: 12pt 0 4pt; }
h5 { font-size: 11pt; font-weight: bold; margin: 10pt 0 4pt; }
h6 { font-size: 10pt; font-weight: bold; margin: 10pt 0 4pt; }

p, li, td, th {
	font-size:   11pt;
	line-height: 1.6;
	color:       #000 !important;
}

blockquote {
	border-left: 3pt solid #666;
	padding-left: 12pt;
	margin-left:  0;
	color:        #333 !important;
	font-style:   italic;
}

/* Eyebrow labels */
.eyebrow {
	font-size:      8pt;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color:          #444 !important;
}

/* =============================================================================
   07. Links — Show URLs on Print
   ============================================================================= */

/*
 * Show the href after every link so printed pages are actionable.
 * Exceptions:
 *   - Anchor links (#something) — useless on paper
 *   - JavaScript links
 *   - Links that already contain the URL as their visible text
 *   - Nav links (hidden anyway)
 */
a[href]::after {
	content:   " (" attr(href) ")";
	font-size: 9pt;
	color:     #444;
	word-break: break-all;
}

/* Skip bare anchors, JS, mailto as-is (mailto is fine to show) */
a[href^="#"]::after,
a[href^="javascript"]::after {
	content: "";
}

/* Don't clutter the logo link */
.custom-logo-link::after,
.site-header__site-name::after {
	content: "";
}

/* =============================================================================
   08. Page Breaks
   ============================================================================= */

/* Never break immediately after a heading */
h1, h2, h3, h4, h5, h6 {
	page-break-after:  avoid;
	break-after:       avoid;
}

/* Never break inside these */
figure,
blockquote,
table,
pre,
.post-card,
.document-card,
.single-meeting__details,
.faq-entry,
.team-member-card {
	page-break-inside: avoid;
	break-inside:      avoid;
}

/* Always start a new page before the main content on single-post print
   so the header info doesn't get orphaned */
.single-post__body {
	page-break-before: auto;
}

/* =============================================================================
   09. Post Cards (Archive, Search, Home)
   ============================================================================= */

.post-card {
	border:        1pt solid #ccc;
	padding:       8pt;
	margin-bottom: 10pt;
}

.post-card__meta {
	font-size: 9pt;
	color:     #555 !important;
}

.post-card__title {
	font-size: 13pt;
	margin:    4pt 0;
}

.post-card__excerpt {
	font-size: 10pt;
}

.post-card__read-more {
	display: none; /* URL shown via a[href]::after instead */
}

/* =============================================================================
   10. Single Post / Page
   ============================================================================= */

.single-post__header {
	border-bottom: 1pt solid #ccc;
	margin-bottom: 14pt;
	padding-bottom: 8pt;
}

.single-post__meta {
	font-size: 9pt;
	color:     #555 !important;
}

.wp-post-image,
.post-thumbnail {
	max-width:     100%;
	height:        auto;
	margin-bottom: 12pt;
}

/* =============================================================================
   11. Meeting Archive and Single Meeting
   ============================================================================= */

.meeting-table {
	width:           100%;
	border-collapse: collapse;
	font-size:       10pt;
}

.meeting-table th,
.meeting-table td {
	border:  0.75pt solid #999;
	padding: 4pt 6pt;
	color:   #000 !important;
}

.meeting-table th {
	font-weight:      bold;
	background-color: #eee !important; /* light grey — prints on most printers */
}

/* Show all columns on print (location was hidden on mobile) */
.meeting-table__col-location {
	display: table-cell !important;
}

/* Status badges — show as plain text with border */
.meeting-status-badge {
	border:     0.5pt solid #666;
	padding:    1pt 4pt;
	font-size:  8pt;
	color:      #000 !important;
}

.single-meeting__details-grid {
	display:               grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap:                   8pt !important;
}

.single-meeting__detail-item {
	border:   0.75pt solid #ccc;
	padding:  6pt;
}

/* Download cards — show filename and URL */
.single-meeting__doc-card {
	border:        0.75pt solid #ccc;
	padding:       8pt;
	margin-bottom: 6pt;
}

.single-meeting__doc-title {
	font-size:   11pt;
	font-weight: bold;
}

/* =============================================================================
   12. Document Library
   ============================================================================= */

.document-card {
	border:        0.75pt solid #ccc;
	padding:       8pt;
	margin-bottom: 6pt;
}

.document-card__title {
	font-size:   12pt;
	font-weight: bold;
}

.document-card__meta {
	font-size: 9pt;
	color:     #555 !important;
}

/* File type badge */
.document-card__badge,
.doc-badge {
	border:     0.5pt solid #666;
	padding:    1pt 4pt;
	font-size:  8pt;
	color:      #000 !important;
}

/* Single document download banner — show as a plain block */
.single-document__download-banner {
	border:      1pt solid #ccc;
	padding:     10pt;
	margin:      10pt 0;
	display:     block !important;
	flex-direction: unset;
}

.single-document__download {
	display: none; /* URL shown via a[href]::after */
}

/* =============================================================================
   13. FAQ Archive and Single FAQ
   ============================================================================= */

.faq-entry {
	border-bottom: 0.75pt solid #ccc;
	padding:       8pt 0;
}

.faq-entry__question {
	font-size:   12pt;
	font-weight: bold;
}

.faq-entry__answer {
	font-size: 11pt;
}

/* =============================================================================
   14. Service and Team Pages
   ============================================================================= */

.service-grid {
	display:               grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap:                   8pt !important;
}

.service-card {
	border:   0.75pt solid #ccc;
	padding:  8pt;
}

.team-grid {
	display:               grid !important;
	grid-template-columns: 1fr 1fr 1fr !important;
	gap:                   6pt !important;
}

.team-member-card {
	border:      0.75pt solid #ccc;
	padding:     6pt;
	text-align:  center;
}

/* Hide team headshots on print to save ink */
.team-member-card__photo {
	display: none;
}

.team-member-card__name {
	font-size:   11pt;
	font-weight: bold;
}

.team-member-card__role {
	font-size: 9pt;
	color:     #444 !important;
}

/* =============================================================================
   15. Archive Headers and Page Headers
   ============================================================================= */

.archive-header,
.page-header {
	border-bottom: 1.5pt solid #000;
	margin-bottom: 14pt;
	padding-bottom: 8pt;
}

.archive-header__title,
.page-header__title {
	font-size: 20pt;
	margin:    0 0 4pt;
}

.archive-header__description,
.page-header__description {
	font-size: 10pt;
	color:     #444 !important;
}

/* =============================================================================
   16. Search Results
   ============================================================================= */

.search-header__query {
	font-size: 18pt;
}

.search-header__count {
	font-size: 9pt;
	color:     #555 !important;
}

.search-result__type-badge {
	border:     0.5pt solid #666;
	padding:    1pt 4pt;
	font-size:  8pt;
	color:      #000 !important;
}

/* =============================================================================
   17. Print-Only Footer URL Line
   ============================================================================= */

/*
 * Adds a "Printed from: [URL]" line at the very bottom of every printed page
 * using a pseudo-element on the body. No JavaScript needed.
 */
body::after {
	content:      "Printed from: " attr(data-site-url) " — " attr(data-print-date);
	display:      block;
	font-size:    8pt;
	color:        #666;
	border-top:   0.75pt solid #ccc;
	margin-top:   16pt;
	padding-top:  4pt;
	text-align:   left;
}
