/* Bewertungs-Karussell (Startseite) und Newsletter-Popup - Entwurf 31.10.2026.
   Eigene Datei statt Block in style.css: beide Teile sind neu, haengen an keinem Bestandsselektor und
   sollen sich einzeln zurueckbauen lassen (Link in main.jsp raus = weg). Alle Selektoren mit eigenem
   Praefix (.xb-, .xnl-, #xlt-bewertungen), damit nichts in den Bestand greift. */

:root {
	--xlt-blau: #0090e3;
	--xlt-blau-dunkel: #0071b3;
	--xlt-stern: #e97c25;
	--xlt-text: #1d1d1f;
	--xlt-grau: #5f6368;
	--xlt-rand: #e3e6ea;
}

/* ---------- Bewertungs-Karussell ---------- */
/* Flacher Streifen (SG 31.10.2026: erst „viel zu breit“ -> 1000 px, dann „halb so“ hoch -> ~140 statt 286 px):
   Sterne, Datum und Haken in einer Zeile, Text hoechstens zwei Zeilen (voller Text im Tooltip), kein „Mehr lesen“. */
#xlt-bewertungen {
	width: min(1000px, calc(100% - 40px));
	margin: 24px auto 20px;
	min-height: 140px;               /* Platz halten, bis die Daten da sind (kein Springen der Seite) */
	color: var(--xlt-text);
	font-size: 14px;
	box-sizing: border-box;
}
#xlt-bewertungen *, #xlt-bewertungen *::before, #xlt-bewertungen *::after { box-sizing: border-box; }
#xlt-bewertungen.xb-bereit { min-height: 0; }

.xb-ueberschrift {
	text-align: center;
	font-size: 18px;
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--xlt-text);
}
.xb-reihe {
	display: flex;
	align-items: stretch;
	gap: 10px;
}
.xb-note {
	flex: 0 0 170px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 8px 10px;
	border: 1px solid var(--xlt-rand);
	border-radius: 8px;
	background: #fff;
	color: var(--xlt-text);
	text-decoration: none;
	text-align: center;
}
.xb-note:hover { border-color: var(--xlt-blau); text-decoration: none; color: var(--xlt-text); }
.xb-note-zeile { display: flex; align-items: baseline; gap: 6px; }
.xb-note-zahl { font-size: 20px; font-weight: 700; line-height: 1.1; }
.xb-note-text { font-size: 14px; }
.xb-note-quelle { font-size: 11px; color: var(--xlt-grau); line-height: 1.3; }

.xb-sterne { position: relative; display: inline-block; line-height: 0; white-space: nowrap; }
.xb-sterne svg { width: 14px; height: 14px; margin-right: 1px; }
.xb-sterne-gross svg { width: 18px; height: 18px; margin-right: 1px; }
.xb-sterne-leer svg { fill: #d9dce1; }
.xb-sterne-voll { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; }
.xb-sterne-voll svg { fill: var(--xlt-stern); }

.xb-pfeil {
	flex: 0 0 26px;
	align-self: center;
	height: 36px;
	border: 0;
	background: none;
	padding: 0;
	cursor: pointer;
	color: var(--xlt-text);
}
.xb-pfeil svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.xb-pfeil:disabled { opacity: .25; cursor: default; }
.xb-pfeil:not(:disabled):hover { color: var(--xlt-blau); }

.xb-spur {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.xb-spur::-webkit-scrollbar { display: none; }
.xb-spur:focus-visible { outline: 2px solid var(--xlt-blau); outline-offset: 3px; }

.xb-karte {
	flex: 0 0 calc((100% - 20px) / 3);
	scroll-snap-align: start;
	padding: 8px 12px;
	border: 1px solid var(--xlt-rand);
	border-radius: 8px;
	background: #fff;
	margin: 0;
}
.xb-karte-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.xb-datum { color: var(--xlt-grau); font-size: 12px; }
.xb-haken { width: 16px; height: 16px; fill: #1565c0; display: block; margin-left: auto; }
.xb-titel { display: none; }
.xb-text {
	margin: 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.xb-mehr { display: none !important; }
.xb-hinweis {
	margin: 6px 0 0;
	text-align: center;
	font-size: 11px;
	color: var(--xlt-grau);
}
.xb-hinweis a { color: var(--xlt-blau); }

@media (max-width: 1024px) {
	.xb-karte { flex-basis: calc((100% - 10px) / 2); }
	.xb-note { flex-basis: 150px; }
}
@media (max-width: 767px) {
	#xlt-bewertungen { width: auto; margin: 18px 16px; min-height: 170px; }
	.xb-ueberschrift { font-size: 17px; margin-bottom: 8px; }
	.xb-reihe { flex-wrap: wrap; gap: 8px; }
	.xb-note { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 6px 10px; gap: 2px 8px; }
	.xb-note-quelle br { display: none; }
	.xb-pfeil { display: none; }
	.xb-spur { flex-basis: 100%; gap: 8px; }
	.xb-karte { flex-basis: 82%; }
}

/* ---------- Startseiten-Hero kompakt (Desktop) ---------- */
/* SG 31.10.2026: auf dem Bildschirm sieht man nur Frosch und Marken, keine Bewertungen. Gemessen bei 1536x730
   (Full-HD mit 125 %): Hero 420 px = 58 % der sichtbaren Hoehe; HQ-Patronen 219, TonerPartner 264, druckerzubehoer
   260 px. Jetzt 260 px: Titel, Satz und Suchkarte kompakter, Frosch weiter rechts im Bild. Gleiche Selektoren wie
   responsive.css/style.css (startseite-breite) mit html-Praefix; diese Datei laedt danach und gewinnt. Mobil unveraendert. */
@media (min-width: 1025px) {
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto > .container-fluid { height: 260px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-bild img { object-position: 0% 30%; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-inhalt { gap: 6px; padding: 14px 28px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto h1 { font-size: 30px; line-height: 36px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-claim { max-width: 640px; font-size: 16px; line-height: 22px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-karte { margin-top: 6px; padding: 12px 14px; gap: 8px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-karte-titel { font-size: 12px; line-height: 14px; }
}

/* Handy (SG 31.10.2026 „Handy straffen“): Hero war 586 px (Bild 240 + Text/Suche 346), Markenkacheln 408 px in zwei
   Spalten, Bewertungen erst ab 1.069 px. Bild 240 -> 120 px, Text und Suchkarte enger, Marken in drei Spalten
   (Sprite mit Prozent-Hintergrund skaliert mit, Seitenverhaeltnis der Kachel bleibt). */
@media (max-width: 768px) {
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-bild,
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-bild img { height: 120px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-bild img { object-position: 58% 28%; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-inhalt { padding: 12px 16px 14px; gap: 4px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto h1 { font-size: 22px; line-height: 26px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-claim { font-size: 14px; line-height: 19px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-karte { margin-top: 6px; padding: 10px 12px; gap: 8px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto .hero-karte-titel { font-size: 11px; line-height: 13px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto #product-dropdowns form .content { gap: 8px; }
	html body[data-controller="site"][data-action="index"] #product-selection.hero-foto #product-dropdowns .chzn-single { min-height: 40px; }
	html body[data-controller="site"][data-action="index"] #top-vendors ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	html body[data-controller="site"][data-action="index"] #top-vendors li { width: auto; height: auto; }
	html body[data-controller="site"][data-action="index"] #top-vendors li a { width: 100%; height: auto; aspect-ratio: 171 / 59; }
}

/* ---------- Newsletter-Popup ---------- */
/* Shopfarben: Weiss, helles Grau, Markenblau #0090e3; Bildband mit dem Baumfrosch aus dem Startseiten-Hero */
body.xnl-offen { overflow: hidden; }
/* das Trustbadge traegt z-index 2147483647 und laege sonst ueber dem Dialog */
body.xnl-offen [id^="trustbadge-container"] { display: none !important; }
.xnl-schatten {
	position: fixed;
	inset: 0;
	z-index: 100000;                 /* ueber Kopf, Slide-in-Korb und Trustbadge */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(20, 28, 38, .5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility 0s linear .25s;
	color: var(--xlt-text);
	font-size: 15px;
}
.xnl-schatten *, .xnl-schatten *::before, .xnl-schatten *::after { box-sizing: border-box; }
.xnl-schatten.xnl-sichtbar { opacity: 1; visibility: visible; transition: opacity .25s ease; }
.xnl-box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(620px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
	transform: translateY(14px) scale(.98);
	transition: transform .25s ease;
}
.xnl-sichtbar .xnl-box { transform: none; }

.xnl-bild {
	position: relative;
	flex: 0 0 auto;
	height: 210px;
	background-color: #9cc35a;
	background-size: cover;
	background-position: 72% 40%;
	border-radius: 14px 14px 0 0;
}
.xnl-zu {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	cursor: pointer;
	color: #333;
	padding: 8px;
	z-index: 2;
}
.xnl-zu:hover { background: #fff; color: var(--xlt-blau); }
.xnl-zu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* Gutschein-Marke auf dem unscharfen Gruen links neben dem Frosch */
.xnl-marke {
	position: absolute;
	left: 24px;
	top: 50%;
	transform: translateY(-50%) rotate(-2deg);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 14px 20px 16px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
	border-left: 6px solid var(--xlt-blau);
}
.xnl-marke-titel { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--xlt-grau); font-weight: 700; }
.xnl-marke-gross { font-size: 56px; font-weight: 800; line-height: 1; color: var(--xlt-blau); letter-spacing: -1.5px; margin: 4px 0 2px; }
.xnl-marke-klein { font-size: 14.5px; font-weight: 600; color: var(--xlt-text); }

.xnl-inhalt { padding: 26px 34px 26px; }
.xnl-inhalt h2 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; color: var(--xlt-text); }
.xnl-text { margin: 0 0 18px; line-height: 1.5; color: #3c4043; font-size: 15.5px; }
.xnl-text strong { color: var(--xlt-text); }
.xnl-form label { display: block; font-size: 13.5px; margin-bottom: 6px; color: var(--xlt-grau); }
.xnl-zeile { display: flex; gap: 10px; }
.xnl-form input[type=email] {
	flex: 1 1 auto;
	min-width: 0;
	height: 50px;
	margin: 0;
	padding: 0 14px;
	font-size: 16px;                 /* 16 px: iOS zoomt sonst beim Antippen */
	border: 1px solid #c8cdd3;
	border-radius: 8px;
	box-shadow: none;
	background: #fff;
	color: var(--xlt-text);
}
.xnl-form input[type=email]:focus { border-color: var(--xlt-blau); outline: 3px solid rgba(0, 144, 227, .18); outline-offset: 0; }
.xnl-form input[aria-invalid=true] { border-color: #c62828; }
.xnl-fehler { display: block; min-height: 18px; margin: 4px 0 0; font-size: 13px; color: #c62828; }
.xnl-los, .xnl-weiter {
	flex: 0 0 auto;
	height: 50px;
	padding: 0 22px;
	border: 0;
	border-radius: 8px;
	background: var(--xlt-blau);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s;
	white-space: nowrap;
}
.xnl-los:hover, .xnl-weiter:hover { background: var(--xlt-blau-dunkel); }
.xnl-recht { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--xlt-grau); }
.xnl-recht a { color: var(--xlt-grau); text-decoration: underline; }

.xnl-danke h2 { margin-bottom: 14px; }
.xnl-code-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 12px 12px 18px;
	border: 2px dashed var(--xlt-blau);
	border-radius: 10px;
	background: #eef7fd;
}
.xnl-code { font: 800 26px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; color: var(--xlt-text); user-select: all; }
.xnl-kopieren {
	height: 40px;
	padding: 0 16px;
	border: 1px solid var(--xlt-blau);
	border-radius: 8px;
	background: #fff;
	color: var(--xlt-blau);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}
.xnl-kopieren:hover { background: var(--xlt-blau); color: #fff; }
.xnl-hinterlegt { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-weight: 600; color: #1e7e34; }
.xnl-hinterlegt svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.xnl-bestaetigen { margin: 0 0 18px; line-height: 1.5; color: #3c4043; font-size: 14.5px; }
.xnl-weiter { width: 100%; }

/* Mobil: Leiste von unten statt Vollbild (Googles Regel gegen aufdringliche Interstitials) */
@media (max-width: 767px) {
	.xnl-schatten { align-items: flex-end; padding: 0; }
	.xnl-box {
		width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		transform: translateY(100%);
	}
	.xnl-bild { height: 128px; border-radius: 16px 16px 0 0; background-position: 78% 40%; }
	.xnl-marke { left: 14px; padding: 8px 14px 10px; border-left-width: 5px; }
	.xnl-marke-titel { font-size: 10px; }
	.xnl-marke-gross { font-size: 36px; }
	.xnl-marke-klein { font-size: 12.5px; }
	.xnl-zu { top: 10px; right: 10px; }
	.xnl-inhalt { padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
	.xnl-inhalt h2 { font-size: 20px; }
	.xnl-text { font-size: 14.5px; margin-bottom: 12px; }
	.xnl-zeile { flex-direction: column; gap: 8px; }
	/* Bootstrap gibt Eingabefeldern eine feste Breite; in der Spalte deshalb ausdruecklich 100 % */
	.xnl-form input[type=email] { flex: 0 0 auto; width: 100%; }
	.xnl-los { width: 100%; }
	.xnl-code { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
	.xnl-schatten, .xnl-box { transition: none; }
}
