/* Trust Badges — schwebendes Badge + Info-Panel.
   Aufbau/Maße nach dem minimierten Original-Trustbadge (68×112 Pille mobil,
   Desktop minimal größer). Sternfarbe über --tb-star-color steuerbar. */

/* Auf Blank-Canvas-Seiten (ShopForge) gibt es kein Theme-Reset — box-sizing
   explizit setzen, damit die Maße überall identisch sind. */
.tb-badge,
.tb-badge *,
.tb-panel,
.tb-panel * {
	box-sizing: border-box;
}

/* Eigener, moderner Font-Stack: Canvas-Seiten laden keine Theme-Schrift,
   ohne diese Regel fiele der Browser dort auf Serifen (Times) zurück.
   Inter greift, wo das Theme es lädt — sonst die System-UI-Schrift. */
.tb-badge,
.tb-panel {
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Badge (weiße Pille unten links) — Basis = Desktop, Mobile-Maße per MQ
   -------------------------------------------------------------------------- */

.tb-badge {
	position: fixed;
	left: 12px;
	bottom: 12px;
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	width: 78px;
	padding: 8px 5px 14px;
	background: #fff;
	border-radius: 78px;
	cursor: pointer;
	box-shadow:
		1px 1px 2px rgba(0, 0, 0, 0.15),
		3px 3px 8px rgba(0, 0, 0, 0.15),
		inset -0.5px -0.5px 0.5px rgba(255, 255, 255, 0.3),
		inset -0.6px -0.6px 0.5px rgba(50, 50, 50, 0.2),
		inset -1px -1px 1px rgba(0, 0, 0, 0.2),
		inset 1px 1px 1px rgba(0, 0, 0, 0.1);
	transition: opacity 0.2s ease, transform 0.2s ease,
		visibility 0s linear 0.2s;
}

/* Solange das Panel offen ist, verschwindet das Badge
   (das Panel erscheint an derselben Stelle, wie beim Original). */
body.tb-panel-open .tb-badge {
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.tb-badge__seal {
	display: block;
	width: 60px;
	height: 60px;
}

.tb-badge__score {
	margin-top: 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: #000;
}

/* --------------------------------------------------------------------------
   Sterne (graue Reihe + farbige Überlagerung, per Breite beschnitten)
   -------------------------------------------------------------------------- */

.tb-stars {
	position: relative;
	display: block;
	margin-top: 8px;
	line-height: 0;
}

.tb-stars__row {
	display: inline-flex;
	gap: 2px;
	white-space: nowrap;
}

.tb-stars__row svg {
	flex: none;
	width: 12px;
	height: 11px;
}

.tb-stars__row--off {
	color: #d9d9d9;
}

.tb-stars__row--on {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	color: var(--tb-star-color, #db6b22);
}

/* --------------------------------------------------------------------------
   Panel (öffnet per Klick aufs Badge)
   -------------------------------------------------------------------------- */

.tb-panel {
	position: fixed;
	left: 10px;
	bottom: 10px;
	z-index: 9995;
	width: min(320px, calc(100vw - 20px));
	padding: 15px;
	background: #fff;
	border-radius: 8px;
	color: #000;
	font-size: 14px;
	line-height: 17px;
	box-shadow:
		1px 1px 2px rgba(0, 0, 0, 0.15),
		3px 3px 8px rgba(0, 0, 0, 0.15),
		inset -0.5px -0.5px 0.5px rgba(255, 255, 255, 0.3),
		inset -0.6px -0.6px 0.5px rgba(50, 50, 50, 0.2),
		inset -1px -1px 1px rgba(0, 0, 0, 0.2),
		inset 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.tb-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 8px;
	margin-bottom: 12px;
	border-bottom: 3px solid #ffdc0f;
}

.tb-panel__domain {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 18px;
	color: #344054;
	overflow-wrap: anywhere;
}

.tb-panel__close {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: -2px -4px 0 0;
	padding: 0;
	background: none;
	border: none;
	color: #344054;
	cursor: pointer;
}

.tb-panel__card {
	padding: 10px;
	background: #fff;
	border-radius: 8px;
	box-shadow:
		0 8px 17px rgba(0, 0, 0, 0.1),
		0 2px 5px rgba(0, 0, 0, 0.06),
		0 1px 2px rgba(0, 0, 0, 0.04),
		0 0 1px rgba(0, 0, 0, 0.03);
}

.tb-panel__card + .tb-panel__card {
	margin-top: 10px;
}

.tb-panel__title {
	margin: 2px 0 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 17px;
	color: #000;
}

.tb-panel__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tb-panel__row img,
.tb-panel__row svg {
	flex: none;
	display: block;
}

.tb-panel__row p {
	margin: 0;
	font-size: 14px;
	line-height: 17px;
	color: #000;
}

.tb-panel__rating {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Große Sterne im Panel (18×17 wie im Original) */
.tb-stars--lg {
	margin-top: 0;
}

.tb-stars--lg .tb-stars__row {
	gap: 2.5px;
}

.tb-stars--lg .tb-stars__row svg {
	width: 18px;
	height: 17px;
}

.tb-panel__score {
	font-size: 14px;
	font-weight: 700;
	color: #000;
}

.tb-panel__count {
	margin: 5px 0 0;
	font-size: 12px;
	line-height: 17px;
	color: #000;
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

/* Mobile/Tablet: kompakte Pille mit den exakten Maßen des Originals
   (68px breit, Siegel 52px). */
@media (max-width: 999.98px) {
	.tb-badge {
		left: 10px;
		bottom: 10px;
		width: 68px;
		padding: 7px 4px 12px;
		border-radius: 68px;
	}

	.tb-badge__seal {
		width: 52px;
		height: 52px;
	}

	.tb-badge__score {
		font-size: 14px;
	}

	.tb-badge .tb-stars {
		margin-top: 7px;
	}

	.tb-badge .tb-stars__row {
		gap: 1.5px;
	}

	.tb-badge .tb-stars__row svg {
		width: 10.6px;
		height: 10px;
	}

	/* Falls das Theme unten eine Sticky-Kasse-Leiste einblendet
	   (ShopForge-Cart), weicht das Badge ihr aus. */
	body:has(.sfcart-sticky.is-visible) .tb-badge {
		opacity: 0;
		visibility: hidden;
		transform: translateY(8px);
		pointer-events: none;
		transition: opacity 0.2s ease, transform 0.2s ease;
	}
}

/* Desktop: Panel minimal größer und an der Badge-Position ausgerichtet */
@media (min-width: 1000px) {
	.tb-panel {
		left: 12px;
		bottom: 12px;
		width: 340px;
	}
}

/* ShopForge-Funnel-Seiten (Canvas) haben eine eigene Sticky-Kaufleiste unten —
   das Badge weicht ihr aus, solange sie sichtbar ist (alle Viewports). */
body:has(.fnl-stickybar.is-visible) .tb-badge {
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --------------------------------------------------------------------------
   Position rechts (per Einstellung; Doppelklasse für sichere Spezifität
   gegenüber den left-Regeln in Basis und Media-Queries)
   -------------------------------------------------------------------------- */

.tb-badge.tb-badge--right,
.tb-panel.tb-panel--right {
	left: auto;
	right: 12px;
}

.tb-panel.tb-panel--right {
	right: 12px;
}

@media (max-width: 999.98px) {
	.tb-badge.tb-badge--right,
	.tb-panel.tb-panel--right {
		right: 10px;
	}
}
