/*
 * Bumblebee Nährwerte – Darstellung im Bumblebee-CI.
 * Schriften werden nur per Name verwendet (Figtree, Fraunces); eingebunden werden sie
 * lokal über die Website (z. B. Plugin „Fonts Plugin“), nicht über dieses Plugin.
 * Alle Klassen beginnen mit „bbnw-“, damit nichts mit Theme oder anderen Plugins kollidiert.
 */

.bbnw {
	--bbnw-pflaume: #4b2a5c;
	--bbnw-hummelgelb: #f5d12a;
	--bbnw-flieder: #ba9bc4;
	--bbnw-himbeere: #b0305a;
	--bbnw-sahne: #fff9ef;
	--bbnw-flieder-hell: #f3eaf5;
	--bbnw-tinte: #2a2230;
	--bbnw-gedaempft: #6a5e70;
	--bbnw-linie: #e6dae8;
	--bbnw-weiss: #ffffff;

	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin: 12px 0 32px;
	padding: 24px;
	max-width: 720px;
	background: var(--bbnw-weiss);
	border: 1px solid var(--bbnw-linie);
	border-radius: 20px;
	color: var(--bbnw-tinte);
	font-family: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}

.bbnw *,
.bbnw *::before,
.bbnw *::after {
	box-sizing: border-box;
}

/* Optionale Beschriftung (nur Block), z. B. „pro Portion“ oder „GESAMT“ */
.bbnw .bbnw-beschriftung {
	flex: 1 0 100%;
	margin: 0 0 -8px;
	font-weight: 700;
	font-size: 16px;
	color: var(--bbnw-pflaume);
}

/* Diagramm mit Kalorien in der Mitte */
.bbnw-diagramm {
	position: relative;
	flex: 0 0 auto;
	width: 200px;
	height: 200px;
	margin: 0 auto;
}

.bbnw .bbnw-logo {
	/* Wasserzeichen: mittig im Ring, unverzerrt, nur Deckkraft (12 %), keine Einfärbung. */
	position: absolute;
	top: 50%;
	left: 50%;
	width: 58%;
	height: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transform: translate(-50%, -50%);
	opacity: 0.12;
	pointer-events: none;
	user-select: none;
}

.bbnw-ring {
	display: block;
	width: 100%;
	height: 100%;
}

.bbnw-ring-grund {
	stroke: var(--bbnw-linie);
}

.bbnw-ring-teil--eiweiss {
	stroke: var(--bbnw-pflaume);
}

.bbnw-ring-teil--kohlenhydrate {
	stroke: var(--bbnw-hummelgelb);
}

.bbnw-ring-teil--fett {
	stroke: var(--bbnw-flieder);
}

.bbnw .bbnw-kcal {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	text-align: center;
	color: var(--bbnw-pflaume);
	pointer-events: none;
}

.bbnw-kcal-ca {
	font-size: 13px;
	/* Pflaume statt Gedämpft: bleibt auch über dem Wasserzeichen über 8 : 1. */
	color: var(--bbnw-pflaume);
}

.bbnw-kcal-zahl {
	font-family: Fraunces, Georgia, "Times New Roman", serif;
	font-weight: 700;
	font-size: 30px;
	line-height: 1.1;
	font-variant-numeric: lining-nums tabular-nums;
	font-variation-settings: "SOFT" 100, "WONK" 1;
}

.bbnw-kcal-einheit {
	margin-top: 2px;
	font-size: 14px;
	font-weight: 700;
	color: var(--bbnw-pflaume);
}

/* Werte rechts bzw. unter dem Diagramm */
.bbnw-daten {
	flex: 1 1 280px;
	min-width: 0;
}

.bbnw .bbnw-kacheln {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
}

.bbnw-kachel {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 12px 10px 10px;
	background: var(--bbnw-sahne);
	border-radius: 14px;
	border-top: 6px solid var(--bbnw-linie);
	text-align: center;
}

/* Theme färbt alle Rahmen in Beiträgen grau (.single .wrapmain article *): darum !important */
.bbnw .bbnw-kachel--eiweiss {
	border-top-color: var(--bbnw-pflaume) !important;
}

.bbnw .bbnw-kachel--kohlenhydrate {
	border-top-color: var(--bbnw-hummelgelb) !important;
}

.bbnw .bbnw-kachel--fett {
	border-top-color: var(--bbnw-flieder) !important;
}

.bbnw .bbnw-kachel-name {
	/* Füllt freie Höhe, damit Zahlen auch bei umbrochenem „Kohlen-hydrate“ auf einer Linie stehen. */
	flex: 1 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--bbnw-tinte);
	hyphens: manual;
}

.bbnw .bbnw-kachel-wert {
	margin: 2px 0 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--bbnw-pflaume);
}

.bbnw .bbnw-zahl {
	font-family: Fraunces, Georgia, "Times New Roman", serif;
	font-weight: 700;
	font-size: 24px;
	line-height: 1.2;
	font-variant-numeric: lining-nums tabular-nums;
	font-variation-settings: "SOFT" 100, "WONK" 1;
}

.bbnw .bbnw-kachel-anteil {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--bbnw-gedaempft);
}

/* Skaldeman-Wert */
.bbnw-skaldeman {
	margin-top: 12px;
	padding: 10px 14px;
	background: var(--bbnw-flieder-hell);
	border-radius: 14px;
	color: var(--bbnw-pflaume);
}

.bbnw .bbnw-skaldeman-zeile {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	font-weight: 700;
}

.bbnw-skaldeman-zahl {
	font-family: Fraunces, Georgia, "Times New Roman", serif;
	font-size: 22px;
	font-variant-numeric: lining-nums tabular-nums;
}

.bbnw-info {
	margin: 2px 0 0;
	font-size: 14px;
}

.bbnw-info summary {
	/* Klickfläche mindestens 24 px hoch (WCAG 2.2, 2.5.8). */
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 3px 0;
	cursor: pointer;
	color: var(--bbnw-himbeere);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	list-style: none;
}

.bbnw-info summary::-webkit-details-marker {
	display: none;
}

.bbnw-info summary::after {
	/* „+“/„–“ nur optisch; zweite Zeile mit leerem Alternativtext, damit Screenreader es nicht vorlesen. */
	content: "\00a0+";
	content: "\00a0+" / "";
}

.bbnw-info[open] summary::after {
	content: "\00a0–";
	content: "\00a0–" / "";
}

.bbnw-info summary:focus-visible {
	outline: 2px solid var(--bbnw-himbeere);
	outline-offset: 2px;
	border-radius: 4px;
}

.bbnw .bbnw-info p {
	margin: 6px 0 2px;
	color: var(--bbnw-tinte);
}

.bbnw .bbnw-info .bbnw-info-geschichte {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--bbnw-linie);
	font-style: italic;
}

/* Herkunft unten rechts */
.bbnw .bbnw-herkunft {
	flex: 1 0 100%;
	margin: -12px 0 -8px;
	text-align: right;
	font-size: 12px;
	line-height: 1.2;
	color: var(--bbnw-gedaempft);
}

/* Prüfhinweis, nur für eingeloggte Redakteurinnen */
.bbnw .bbnw-pruefhinweis {
	margin: 8px 0 0;
	padding: 6px 10px;
	border-left: 4px solid var(--bbnw-himbeere);
	background: var(--bbnw-sahne);
	font-size: 13px;
	color: var(--bbnw-tinte);
}

/* Schmale Bildschirme */
@media (max-width: 480px) {
	.bbnw {
		padding: 16px;
		gap: 16px;
	}

	.bbnw-diagramm {
		width: 170px;
		height: 170px;
	}

	.bbnw-kcal-zahl {
		font-size: 26px;
	}

	.bbnw .bbnw-kacheln {
		gap: 6px;
	}

	.bbnw-kachel {
		padding: 10px 6px 8px;
	}

	.bbnw .bbnw-kachel-name {
		font-size: 13px;
	}

	.bbnw .bbnw-zahl {
		font-size: 20px;
	}
}

@media print {
	.bbnw {
		break-inside: avoid;
		border-color: #999;
	}
}

/* Theme-Festigung (8.11.2026): Werte in einer Reihe, auch wenn das Theme Text links/16px setzt */
.wrapmain article .bbnw .bbnw-kachel { text-align: center !important; }
.wrapmain article .bbnw .bbnw-kachel-name { flex: 0 0 auto !important; min-height: 2.5em !important; display: flex !important; align-items: center !important; justify-content: center !important; text-align: center !important; font-size: 14px !important; line-height: 1.25 !important; margin: 0 0 4px !important; }
.wrapmain article .bbnw .bbnw-kachel-wert { font-size: 15px !important; line-height: 1.3 !important; text-align: center !important; margin: 0 !important; }
.wrapmain article .bbnw .bbnw-kachel-wert .bbnw-zahl { font-size: 22px !important; }
.wrapmain article .bbnw .bbnw-kachel-anteil { font-size: 13px !important; line-height: 1.3 !important; white-space: nowrap !important; text-align: center !important; margin: 2px 0 0 !important; }
