/*
 * MyRecipe Styles: print. Enqueued with media="print".
 *
 * Ctrl/Cmd+P prints the whole page with a tidy card. The card's Print button
 * adds .mrs-printing to <html>, marks the card's ancestors with .mrs-print-path
 * and the card with .mrs-print-target, so only the recipe is printed. The
 * script also opens the nutrition panel for the duration of the print.
 *
 * The print options (photo / notes / nutrition) set .mrs-print-no-* classes on
 * <html>; they also apply to the browser's own Print command. Aimed at one
 * A4 or Letter page: tight spacing, ingredients in two columns, and groups and
 * steps that never split across pages.
 */

@page {
	margin: 12mm;
}

.mrs-card {
	margin: 0 0 1rem;
	color: #000 !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	--mrs-accent: #000;
	--mrs-on-accent: #fff;
	--mrs-surface: #fff;
	--mrs-line: #ccc;
	--mrs-line-strong: #888;
	--mrs-muted: #444;
	--mrs-tint: transparent;
}

/* Ink-friendly hero: no colour band, so the photo sits below the text. */
.mrs-card .mrs-hero,
.mrs-card .mrs-hero.has-avatar {
	padding: 0 0 0.75rem;
	color: #000;
	background: none;
	border-bottom: 2px solid #000;
}

.mrs-card .mrs-avatar {
	width: 1.75in;
	height: 1.75in;
	margin: 0.75rem auto 0;
	border: 0;
}

.mrs-card .mrs-content,
.mrs-preset-minimal .mrs-content {
	padding: 0.75rem 0 0;
}

.mrs-card .mrs-gallery,
.mrs-card .mrs-video,
.mrs-card .mrs-actions,
.mrs-card .mrs-tools,
.mrs-card .mrs-timers,
.mrs-card .mrs-check,
.mrs-card .mrs-newsletter,
.mrs-card .mrs-pin-cta,
.mrs-card .mrs-meta-icon,
.mrs-jump-wrap,
.mrs-sticky {
	display: none !important;
}

html.mrs-print-no-image .mrs-card .mrs-avatar,
html.mrs-print-no-image .mrs-card .mrs-step-img {
	display: none !important;
}

html.mrs-print-no-notes .mrs-card .mrs-notes,
html.mrs-print-no-notes .mrs-card .mrs-substitutions {
	display: none !important;
}

html.mrs-print-no-nutrition .mrs-card .mrs-panel {
	display: none !important;
}

/* Tighter rhythm so a typical recipe fits on one page. */
.mrs-card {
	--mrs-section-gap: 0.9rem;
	font-size: 10.5pt;
	line-height: 1.4;
}

.mrs-card .mrs-hero .mrs-title {
	margin-bottom: 0.4em;
}

.mrs-card .mrs-facts {
	gap: 0.4em;
}

.mrs-card .mrs-fact {
	min-width: 0;
	padding: 0.3em 0.7em;
}

.mrs-card .mrs-meta-item {
	padding: 0.4em 0.5em;
}

.mrs-card .mrs-meta dd {
	font-size: 1.05em;
}

.mrs-card .mrs-item {
	padding: 0.25em 0;
}

.mrs-card .mrs-list--ingredients {
	columns: 2;
	column-gap: 1.5rem;
}

.mrs-card .mrs-step-img {
	max-width: 2.5in;
}

.mrs-card .mrs-meta-item,
.mrs-card .mrs-panel {
	background: none;
}

.mrs-card .mrs-nutrition-table thead th {
	color: #000;
	background: none;
	border-bottom: 2px solid #000;
}

.mrs-card .mrs-fact {
	background: none;
	border-color: #000;
}

/* Print clean numbers and full-strength text, whatever was ticked on screen. */
.mrs-card .mrs-item-text {
	opacity: 1 !important;
	text-decoration: none !important;
	font-size: inherit !important;
}

.mrs-card .mrs-step-check:checked + .mrs-step-num {
	color: #000;
	background: none;
}

.mrs-card .mrs-step.is-current {
	padding-inline: 0;
	background: none;
}

.mrs-card .mrs-nutrition summary::after {
	display: none;
}

.mrs-card .mrs-item,
.mrs-card .mrs-list--ingredients,
.mrs-card .mrs-list--equipment,
.mrs-card .mrs-notes,
.mrs-card .mrs-nutrition,
.mrs-card .mrs-print-footer {
	break-inside: avoid;
}

.mrs-card .mrs-section-title,
.mrs-card .mrs-section-head,
.mrs-card .mrs-group-title {
	break-after: avoid;
}

/* QR code and short link back to the article. */
.mrs-card .mrs-print-footer {
	display: flex !important;
	align-items: center;
	gap: 0.75rem;
	padding-top: 0.6rem;
	font-size: 9pt;
	border-top: 1px solid #000;
}

.mrs-card .mrs-qr svg {
	display: block;
	width: 0.85in;
	height: 0.85in;
}

.mrs-card .mrs-qr:empty {
	display: none;
}

.mrs-card .mrs-key-stat {
	border-width: 1px;
}

.mrs-card .mrs-item-text a {
	color: inherit;
	text-decoration: none;
}

/* ---------- "Print" button: just this recipe ---------- */

html.mrs-printing .mrs-print-path > :not(.mrs-print-path):not(.mrs-print-target) {
	display: none !important;
}

html.mrs-printing .mrs-print-path {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	max-width: none !important;
	width: auto !important;
}
