/**
 * print.css — стили для печати.
 *
 * Подключается через inc/enqueue.php с media="print".
 *
 * Задача: превратить страницу в чистый, читаемый документ —
 * чёрным по белому, без навигации, курсов, шеринга и декора.
 * Ссылки в тексте статьи печатают свой URL в скобках.
 *
 * @package Aktg
 */

@media print {

	/* Базовый сброс на печать */
	* {
		background: transparent !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	html, body {
		font-size: 12pt;
		line-height: 1.5;
		background: #fff !important;
		color: #000 !important;
		width: 100%;
		margin: 0;
		padding: 0;
	}

	/* Прячем всё, что не относится к содержанию */
	.topstrip,
	.tablo,
	.nav,
	.mobile-toggle,
	.nav-subscribe,
	.mast-actions,
	.search-form,
	.searchform,
	.reading-progress,
	.share-row,
	.share-buttons,
	.article-tags,
	.author-socials,
	.newsletter,
	#aktg-newsletter,
	.footer-socials,
	.site-footer,
	.related,
	.comments-area,
	.comment-respond,
	.to-top,
	.toc-toggle,
	.after-single,
	.sidebar,
	.widget-area,
	.popular-widget,
	.breadcrumb,
	.strip-more,
	.feed-day-more,
	.cat-filter,
	.pagination,
	.search-filter,
	.brief-time,
	.spread-cta {
		display: none !important;
	}

	/* Шапка — только название издания текстом */
	.masthead,
	.mast-logo {
		text-align: left !important;
		padding: 0 !important;
		margin: 0 0 4pt !important;
		border: none !important;
	}
	.mast-logo a {
		font-family: Georgia, 'Times New Roman', serif !important;
		font-size: 24pt !important;
		font-weight: 700 !important;
	}
	.mast-tag {
		font-size: 9pt !important;
		font-style: italic;
		margin-bottom: 12pt !important;
		padding-bottom: 8pt !important;
		border-bottom: 1.5pt solid #000 !important;
	}

	/* Заголовок статьи */
	.article-h1,
	.single-title,
	h1 {
		font-family: Georgia, 'Times New Roman', serif !important;
		font-size: 22pt !important;
		line-height: 1.15 !important;
		margin: 0 0 8pt !important;
		page-break-after: avoid;
	}

	.article-dek,
	.single-dek {
		font-size: 13pt !important;
		font-style: italic;
		margin-bottom: 10pt !important;
	}

	/* Мета: автор + дата */
	.article-meta,
	.single-meta {
		font-size: 9pt !important;
		border-top: 0.5pt solid #000 !important;
		border-bottom: 0.5pt solid #000 !important;
		padding: 4pt 0 !important;
		margin-bottom: 12pt !important;
	}

	/* Тело статьи */
	.article-body,
	.read-container,
	.container {
		max-width: 100% !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.article-body p {
		font-family: Georgia, 'Times New Roman', serif !important;
		font-size: 12pt !important;
		line-height: 1.5 !important;
		margin: 0 0 8pt !important;
		orphans: 3;
		widows: 3;
	}

	.article-body h2,
	.article-body h3 {
		font-family: Georgia, 'Times New Roman', serif !important;
		page-break-after: avoid;
		margin-top: 14pt !important;
	}
	.article-body h2 { font-size: 15pt !important; }
	.article-body h3 { font-size: 13pt !important; }

	/* Изображения не разрываются между страницами */
	.article-body img,
	figure {
		max-width: 100% !important;
		page-break-inside: avoid;
	}
	figcaption {
		font-size: 9pt !important;
		font-style: italic;
	}

	/* Печать URL внешних ссылок в теле статьи */
	.article-body a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		word-break: break-all;
	}
	/* Кроме ссылок-якорей и картинок */
	.article-body a[href^="#"]::after {
		content: "";
	}

	/* Цитаты и врезки */
	.article-body blockquote,
	.wp-block-quote,
	.is-style-aktg-pullquote,
	.is-style-aktg-callout {
		border-left: 2pt solid #000 !important;
		padding-left: 10pt !important;
		page-break-inside: avoid;
		font-style: italic;
	}

	/* Таблицы */
	.article-body table,
	.wp-block-table table {
		border-collapse: collapse !important;
		width: 100% !important;
		page-break-inside: avoid;
	}
	.article-body th,
	.article-body td,
	.wp-block-table th,
	.wp-block-table td {
		border: 0.5pt solid #000 !important;
		padding: 4pt 6pt !important;
		font-size: 10pt !important;
	}

	/* Оглавление печатаем как простой список */
	.toc {
		border: 0.5pt solid #000 !important;
		padding: 8pt 12pt !important;
		margin-bottom: 12pt !important;
		page-break-inside: avoid;
	}
	.toc-list { max-height: none !important; opacity: 1 !important; }
	.toc-item a::after { content: ""; }

	/* Автор-бокс — компактно */
	.author-box {
		border-top: 0.5pt solid #000 !important;
		padding-top: 8pt !important;
		margin-top: 12pt !important;
		page-break-inside: avoid;
	}
	.author-box-avatar { display: none !important; }

	/* Подвал печати — источник */
	.article-body::after {
		content: "Источник: " attr(data-print-source);
	}

	@page {
		margin: 1.6cm 1.4cm;
	}
}
