/* GM Næring — Gourministeriets printlayout for opskrifter (websitets /wprm_print/, se includes/class-gmn-print.php).
 * Printervenligt: hvid baggrund, mørk tekst, tynde streger og ingen farveflader på papiret. Alle størrelser i em, så
 * WPRM's knapper «Mindre/Normal/Større» skalerer det hele. Skærmen viser et A4-ark på en lys baggrund. */

body.wprm-print { background: #f2efe8; color: #1f2a24; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }

/* ---------- Værktøjslinjen (kun skærm) ---------- */
body.wprm-print #wprm-print-header { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid #e4dfd3; padding: 12px 16px; margin: 0 0 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 24px; box-shadow: 0 1px 8px rgba(31, 42, 36, .06); }
body.wprm-print #wprm-print-header-main { display: flex; gap: 8px; margin: 0; padding: 0; }
/* WPRM's print.css + accentfarve-stil sætter knapperne med id-selektorer — derfor #wprm-print-header og !important. */
body.wprm-print #wprm-print-header .wprm-print-button { font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important; padding: 10px 18px !important; margin: 0 !important; border-radius: 999px !important; border: 1px solid #c9c2b3 !important; background: #fff !important; color: #2C4A3A !important; cursor: pointer; text-decoration: none !important; }
body.wprm-print #wprm-print-header .wprm-print-button:hover { border-color: #2C4A3A !important; }
body.wprm-print #wprm-print-header #wprm-print-button-print { background: #2C4A3A !important; border-color: #2C4A3A !important; color: #fff !important; }
body.wprm-print #wprm-print-servings-container input, body.wprm-print #wprm-print-servings-container .wprm-print-servings-change { border-color: #c9c2b3 !important; }
body.wprm-print #wprm-print-servings-container .wprm-print-servings-change { background: #2C4A3A !important; color: #fff !important; border-color: #2C4A3A !important; }
body.wprm-print #wprm-print-header-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; margin: 0; font-size: 14px; color: #4a5650; }
body.wprm-print .wprm-print-toggle-container { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
body.wprm-print .wprm-print-toggle { accent-color: #2C4A3A; width: 16px; height: 16px; margin: 0; }
body.wprm-print #wprm-print-header .wprm-print-option-container { display: inline-flex; border: 1px solid #c9c2b3; border-radius: 999px; overflow: hidden; margin: 0; }
body.wprm-print #wprm-print-header .wprm-print-option { padding: 6px 12px; color: #2C4A3A; text-decoration: none; border: 0; font-size: 13px; background: #fff; }
body.wprm-print #wprm-print-header .wprm-print-option + .wprm-print-option { border-left: 1px solid #e4dfd3; }
body.wprm-print #wprm-print-header .wprm-print-option.option-active { background: #2C4A3A !important; color: #fff !important; }
body.wprm-print #wprm-print-servings-container, body.wprm-print .wprm-print-servings-container { display: inline-flex; align-items: center; gap: 6px; margin: 0; }

/* ---------- Arket ---------- */
body.wprm-print #wprm-print-content.gmnp-page { max-width: 210mm; margin: 0 auto 40px; padding: 0; background: transparent; }
.gmnp-page .wprm-print-recipe { background: #fff; padding: 16mm 15mm 12mm; box-shadow: 0 2px 18px rgba(31, 42, 36, .10); border-radius: 4px; margin: 0; }
.gmnp { font-size: 15px; line-height: 1.55; color: #1f2a24; }
.gmnp h1, .gmnp h2, .gmnp h3 { font-family: Georgia, "Times New Roman", serif; color: #2C4A3A; font-weight: 400; margin: 0; }

.gmnp-top { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid #2C4A3A; padding-bottom: .5em; margin-bottom: 1.4em; font-size: .78em; letter-spacing: .14em; text-transform: uppercase; color: #2C4A3A; }
.gmnp-brand { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.gmnp-host { color: #6b756f; letter-spacing: .06em; text-transform: none; }

.gmnp-head { display: flex; gap: 1.6em; align-items: flex-start; margin-bottom: 1.6em; }
.gmnp-head__txt { flex: 1 1 auto; min-width: 0; }
.gmnp-title { font-size: 2em; line-height: 1.15; margin-bottom: .35em; }
.gmnp-sum { font-style: italic; color: #4a5650; margin: 0 0 .9em; }
.gmnp-meta { display: flex; flex-wrap: wrap; gap: .4em 1.6em; margin: 0; padding: .6em 0 0; border-top: 1px solid #e4dfd3; }
.gmnp-meta > div { margin: 0; }
.gmnp-meta dt { font-size: .72em; letter-spacing: .1em; text-transform: uppercase; color: #6b756f; margin: 0; }
.gmnp-meta dd { margin: 0; font-weight: 600; }
.gmnp-img { flex: 0 0 34%; margin: 0; }
.gmnp-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }

.gmnp-cols { display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: 2em; }
.gmnp h2 { font-size: 1.25em; padding-bottom: .3em; border-bottom: 1px solid #d8d2c4; margin-bottom: .7em; }

/* Ingredienser (WPRM's markup) */
.gmnp .wprm-recipe-ingredients-container, .gmnp .wprm-recipe-instructions-container, .gmnp .wprm-recipe-notes-container { margin: 0; padding: 0; }
.gmnp .wprm-recipe-group-name { font: 700 .74em/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important; letter-spacing: .1em; text-transform: uppercase; color: #8a6a2e !important; margin: 1.1em 0 .35em !important; }
.gmnp .wprm-recipe-ingredient-group:first-child .wprm-recipe-group-name, .gmnp .wprm-recipe-instruction-group:first-child .wprm-recipe-group-name { margin-top: 0 !important; }
.gmnp ul.wprm-recipe-ingredients { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.gmnp li.wprm-recipe-ingredient { list-style: none !important; margin: 0 !important; padding: .28em 0 !important; border-bottom: 1px dotted #d8d2c4; break-inside: avoid; page-break-inside: avoid; }
.gmnp .wprm-recipe-ingredient-amount, .gmnp .wprm-recipe-ingredient-unit { font-weight: 700; }
.gmnp .wprm-recipe-ingredient-notes { color: #6b756f; font-style: italic; }
.gmnp .wprm-checkbox-container, .gmnp .wprm-checkbox { display: none !important; }

/* Fremgangsmåde: nummer i en tynd ring (ingen farveflade) */
.gmnp ul.wprm-recipe-instructions, .gmnp ol.wprm-recipe-instructions { list-style: none !important; margin: 0 !important; padding: 0 !important; counter-reset: gmnp-step; }
.gmnp li.wprm-recipe-instruction { list-style: none !important; position: relative; margin: 0 0 .85em !important; padding: 0 0 0 2.3em !important; break-inside: avoid; page-break-inside: avoid; }
.gmnp li.wprm-recipe-instruction::before { counter-increment: gmnp-step; content: counter(gmnp-step); position: absolute; left: 0; top: .05em; width: 1.6em; height: 1.6em; border: 1.5px solid #2C4A3A; border-radius: 50%; color: #2C4A3A; font: 700 .82em/1.6em -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; text-align: center; box-sizing: content-box; }
.gmnp .wprm-recipe-instruction-group { margin-bottom: .6em; }
.gmnp .wprm-recipe-instruction-text p { margin: 0 0 .4em; }
.gmnp .wprm-recipe-instruction-text p:last-child { margin-bottom: 0; }
.gmnp .wprm-recipe-instruction-ingredients { display: none !important; }
.gmnp .wprm-recipe-instruction-media { margin-top: .5em; max-width: 60%; }
.gmnp .wprm-recipe-instruction-media img { max-width: 100%; height: auto; }
.gmnp .wprm-tip, .gmnp .wprm-recipe-instruction.wprm-recipe-instruction-tip { border-left: 2px solid #B8883A !important; background: none !important; padding: .1em 0 .1em .8em !important; color: #4a5650; }

/* Noter */
.gmnp-notes { margin-top: 1.6em; padding: .9em 1.1em 1em; border: 1px solid #d8d2c4; border-radius: 3px; break-inside: avoid; page-break-inside: avoid; }
.gmnp-notes h2 { border: 0; padding: 0; margin-bottom: .4em; }
.gmnp-notes p { margin: 0 0 .5em; }
.gmnp-notes p:last-child { margin-bottom: 0; }

/* Næringsindhold (kun med adgang — fyldes af gmn-print.js) */
.gmnp-naering { margin-top: 1.8em; break-inside: avoid; page-break-inside: avoid; }
.gmnp-naering[hidden] { display: none !important; }
.gmnp-nt-wrap { display: block; }
.gmnp-nt { width: 100%; border-collapse: collapse; font-size: .9em; font-variant-numeric: tabular-nums; }
.gmnp-nt th, .gmnp-nt td { padding: .32em .5em; border-bottom: 1px solid #e4dfd3; text-align: right; white-space: nowrap; }
.gmnp-nt th:first-child { text-align: left; white-space: normal; font-weight: 600; padding-left: 0; }
.gmnp-nt thead th { font-size: .78em; letter-spacing: .06em; text-transform: uppercase; color: #6b756f; font-weight: 600; border-bottom: 1.5px solid #2C4A3A; }
.gmnp-nt tr.sub th { font-weight: 400; padding-left: 1em; color: #4a5650; }
.gmnp-nt td:last-child { color: #6b756f; }
.gmnp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gmnp-micro { margin-top: 1.2em; }
.gmnp-micro h3 { font-size: .95em; margin: 0 0 .4em; }
.gmnp-micro dl { margin: 0; font-size: .82em; font-variant-numeric: tabular-nums; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1.6em; }
.gmnp-micro dl > div { display: flex; justify-content: space-between; gap: .8em; padding: .18em 0; border-bottom: 1px dotted #e4dfd3; margin: 0; }
.gmnp-micro dt { margin: 0; }
.gmnp-micro dd { margin: 0; text-align: right; white-space: nowrap; }
.gmnp-micro dd span { display: inline-block; min-width: 3.2em; color: #6b756f; }
.gmnp-nt-note { font-size: .74em; color: #6b756f; margin: .8em 0 0; }

.gmnp-foot { margin-top: 2em; padding-top: .6em; border-top: 1px solid #d8d2c4; font-size: .74em; color: #6b756f; text-align: center; word-break: break-all; }

/* WPRM's egne rester, der ikke hører hjemme på papiret */
.gmnp-page #wprm-print-footer, .gmnp-page .wprm-recipe-print, .gmnp-page .wprm-recipe-video-container { display: none !important; }

/* ---------- Smal skærm ---------- */
@media screen and (max-width: 640px) {
	body.wprm-print #wprm-print-header { padding: 10px 12px; gap: 8px 12px; }
	.gmnp-page .wprm-print-recipe { padding: 20px 16px; border-radius: 0; box-shadow: none; }
	.gmnp-head { flex-direction: column-reverse; gap: 1em; }
	.gmnp-img { flex-basis: auto; width: 100%; }
	.gmnp-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4em; }
	.gmnp-micro dl { grid-template-columns: minmax(0, 1fr); }
	.gmnp-nt th, .gmnp-nt td { white-space: normal; }
	.gmnp-title { font-size: 1.6em; }
}

/* ---------- Papir ---------- */
@media print {
	@page { size: A4; margin: 14mm 14mm 16mm; }
	html, body.wprm-print { background: #fff !important; }
	body.wprm-print #wprm-print-header, #print-pdf { display: none !important; } /* #wprm-print-footer-ad røres ikke (annoncer er fredede) */
	body.wprm-print #wprm-print-content.gmnp-page { max-width: none; margin: 0; }
	.gmnp-page .wprm-print-recipe { padding: 0; box-shadow: none; border-radius: 0; }
	.gmnp { font-size: 10.5pt; color: #000; }
	.gmnp h1, .gmnp h2, .gmnp h3, .gmnp-top { color: #000; }
	.gmnp-top { border-bottom-color: #000; }
	.gmnp li.wprm-recipe-instruction::before { border-color: #000; color: #000; }
	.gmnp-nt thead th { border-bottom-color: #000; }
	.gmnp-img img { max-height: 60mm; }
	.gmnp-cols { gap: 8mm; }
	.gmnp h2, .gmnp-group-name { break-after: avoid; page-break-after: avoid; }
	.gmnp a { color: inherit; text-decoration: none; }
	.gmnp-sum, .gmnp-meta dt, .gmnp-host, .gmnp-nt-note, .gmnp-foot, .gmnp-nt td:last-child, .gmnp-micro dd span, .gmnp .wprm-recipe-ingredient-notes { color: #333; }
}
body.wprm-print #wprm-print-header .wprm-print-spacer { display: none !important; }
