/* ==========================================================================
   Printpagina (scherm + A4). Ontwerp: redesign/02-ontwerp/canvas/Desktop-Print.dc.html
   ========================================================================== */

body.print-view { background: var(--c-placeholder); color: #333333; }

/* ---------- Schermbalk ---------- */
.print-bar {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	min-height: 76px;
	padding: 12px var(--s-4);
	background: #fff;
	border-bottom: 1px solid var(--c-border);
}
.print-bar__back { font-size: 14px; font-weight: 700; color: var(--c-link); text-decoration: none; }
.print-bar__back:hover { text-decoration: underline; }
.print-bar__spacer { flex: 1; }
.print-bar__check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-dark); cursor: pointer; }
.print-bar__check input { width: 18px; height: 18px; accent-color: var(--c-navy); }
.print-bar .portions { display: inline-flex; align-items: center; height: 40px; border: 1px solid #cccccc; border-radius: 20px; background: #fff; }
.print-bar .portions__btn { width: 38px; height: 38px; border: 0; border-radius: 20px; background: transparent; color: var(--c-navy); font-size: 20px; }
.print-bar .portions__btn:disabled { color: var(--c-border); }
.print-bar .portions__value { min-width: 78px; text-align: center; font-size: 14px; font-weight: 600; color: var(--c-ink); }
/* Inter, gewone hoofdletter, min. 14px; mag op mobiel over twee regels (liep daar buiten beeld). */
.print-hint { margin: 0; padding: 8px 16px; text-align: center; font-size: 14px; line-height: 20px; letter-spacing: normal; text-transform: none; color: var(--c-muted); }

@media (max-width: 599px) {
	.print-bar__spacer { display: none; }
	.print-bar__print { width: 100%; }
}

/* ---------- A4-vel ---------- */
.sheet {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 100%;
	max-width: 794px;
	min-height: 1123px;
	margin: 0 auto 48px;
	padding: 44px 52px 40px;
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
	font-size: 13px;
	line-height: 1.5;
}
@media (max-width: 599px) {
	.sheet { min-height: 0; padding: 24px 20px; box-shadow: none; }
}

.sheet__top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 2px solid #000; }
.sheet__logo { width: 48px; height: 48px; }
.sheet__site { font-size: 12px; color: var(--c-muted); }

.sheet__intro { display: grid; grid-template-columns: 1fr 120px; gap: 28px; align-items: start; }
.sheet__titles { display: flex; flex-direction: column; gap: 10px; }
.sheet__title { margin: 0; font-family: var(--f-display); font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #000; }
.sheet__facts { margin: 0; font-size: 12.5px; color: var(--c-text); }
.sheet__facts b { color: #000; }
.sheet__about { margin: 0; font-size: 12px; color: var(--c-muted); }
.sheet__photo { width: 120px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 8px; background: var(--c-placeholder); }
.sheet__photo img { width: 100%; height: 100%; object-fit: cover; }

.sheet__cols { display: grid; grid-template-columns: 230px 1fr; gap: 32px; }
@media (max-width: 599px) {
	.sheet__cols { grid-template-columns: 1fr; gap: 20px; }
	/* Foto ook op mobiel (klein naast de titel), anders doet het vinkje "Met foto" zichtbaar niets (Quint 5 okt). */
	.sheet__intro { grid-template-columns: 1fr 96px; gap: 16px; }
	.sheet__photo { width: 96px; }
}
.sheet__h { margin: 0 0 8px; font-family: var(--f-display); font-size: 15px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #000; }
.sheet__h--notes { margin-top: 16px; }

.sheet__ingredients { font-size: 12.5px; }
.sheet__ingredients ul { margin: 0 0 8px; padding: 0; list-style: none; }
.sheet__ingredients li { padding: 5px 0; border-bottom: 1px solid #eee; }
.sheet__ingredients p { margin: 10px 0 2px; }
.sheet__ingredients p:first-child { margin-top: 0; }

.sheet__steps { font-size: 12.5px; }
.sheet__steps ol { counter-reset: stap; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.sheet__steps ol > li { counter-increment: stap; position: relative; padding-left: 30px; }
.sheet__steps ol > li::before { content: counter(stap) "."; position: absolute; left: 0; top: 0; font-size: 12px; font-weight: 700; color: var(--c-navy); }
.sheet__notes p { margin: 0 0 6px; font-size: 12.5px; }

/* Zelfde regel als de receptkaart (review Quint 4 okt, B5): vanaf 600px alle tegels op één rij,
   even breed; smaller rijen van 3 in een raster van 6, nooit één losse tegel. Zie lcc_nutri_grid_attrs(). */
.sheet__tiles { display: grid; grid-template-columns: repeat(var(--nutri-n, 5), minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media screen and (max-width: 599px) {
	.sheet__tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.sheet__tiles li { grid-column: span 2; }
	.sheet__tiles:is(.sheet__tiles--n1, .sheet__tiles--n2, .sheet__tiles--n3) { grid-template-columns: repeat(var(--nutri-n), minmax(0, 1fr)); }
	.sheet__tiles:is(.sheet__tiles--n1, .sheet__tiles--n2, .sheet__tiles--n3) li { grid-column: auto; }
	.sheet__tiles--rest2 li:nth-last-child(-n + 2),
	.sheet__tiles--rest1 li:nth-last-child(-n + 4) { grid-column: span 3; }
}
.sheet__tiles li { min-width: 0; padding: 8px 4px; border: 1px solid var(--c-border); border-radius: 8px; text-align: center; }
.sheet__tiles li.is-carbs { background: #f1f4f8; }
.sheet__tiles b { display: block; font-size: 14px; color: #000; }
.sheet__tiles span { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--c-muted); }

.sheet__foot { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--c-border); }
.sheet__qr { flex-shrink: 0; width: 76px; height: 76px; }
.sheet__qr:empty { display: none; }
.sheet__qr svg { display: block; width: 100%; height: 100%; }
.sheet__foot-text { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--c-text); word-break: break-all; }
.sheet__foot-text b { font-size: 12.5px; color: #000; word-break: normal; }
.sheet__foot-muted { color: var(--c-muted); word-break: normal; }

/* Onderdelen uitzetten met de vinkjes in de balk. */
.print-page.no-photo [data-print-part="photo"],
.print-page.no-nutrition [data-print-part="nutrition"] { display: none; }
.print-page.no-photo .sheet__intro { grid-template-columns: 1fr; }

/* ---------- Papier ---------- */
@page { size: A4; margin: 0; }
@media print {
	body.print-view { background: #fff; }
	.print-bar, .print-hint, #wpadminbar { display: none !important; }
	.sheet { max-width: none; min-height: 100vh; margin: 0; box-shadow: none; }
	/* Scripts van derden (advertenties, chat, popups) niet op papier. */
	body.print-view > :not(.rcard) { display: none !important; }
}
