/* ------------------------------------------------------------------
 * VGL – Vergleichstabelle (vgl/compare-table)
 * Farben: Theme (Link-/Button-Farbe); Badge-/Spaltenfarben aus dem Block
 * ------------------------------------------------------------------ */
.vgl-ct {
	--vgl-ct-min: 140px; /* Mindestbreite einer Produktspalte */
	--vgl-ct-label: 170px;
	--vgl-ct-line: #e3e6ea;
	--vgl-ct-soft: #f7f8f9;
	--vgl-ct-link: var(--theme-link-initial-color, var(--wp--preset--color--primary, #1e73be));
	--vgl-ct-btn: var(--vgl-ct-button, var(--theme-button-background-initial-color, var(--wp--preset--color--primary, #2e7d1f)));
	margin: 1.5em 0;
	border: 1px solid var(--vgl-ct-line);
	background: #fff;
	font-size: 15px;
	line-height: 1.4;
}
.vgl-ct button {
	font: inherit;
	cursor: pointer;
}
.vgl-ct svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -5px;
}

/* Kopfleiste */
.vgl-ct__bar {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid var(--vgl-ct-line);
}
.vgl-ct__updated {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	padding: 14px 16px;
	border-right: 1px solid var(--vgl-ct-line);
	white-space: nowrap;
}
.vgl-ct__count {
	flex: 1 1 auto;
	align-self: center;
	min-width: 0;
	padding: 14px 16px;
}
.vgl-ct__toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 18px;
	border: 0;
	border-left: 1px solid var(--vgl-ct-line);
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: none;
	color: inherit;
	white-space: nowrap;
}
.vgl-ct__toggle[aria-expanded="true"] {
	border-bottom-color: currentColor;
}
.vgl-ct__nav {
	display: none;
	border-left: 1px solid var(--vgl-ct-line);
}
.vgl-ct.is-paged .vgl-ct__nav {
	display: flex;
}
.vgl-ct__prev,
.vgl-ct__next {
	width: 64px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--vgl-ct-link);
	font-size: 30px !important;
	line-height: 1;
}
.vgl-ct__next:not(:disabled) {
	background: color-mix(in srgb, var(--vgl-ct-link) 10%, #fff);
}
.vgl-ct__prev:disabled,
.vgl-ct__next:disabled {
	color: #c3c7cc;
	cursor: default;
}

/* Filter */
.vgl-ct__filters {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid var(--vgl-ct-line);
}
.vgl-ct__filters[hidden] {
	display: none;
}
.vgl-ct__selects {
	display: grid;
	flex: 1 1 auto;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.vgl-ct__select {
	display: block;
	margin: 0;
	border-right: 1px solid var(--vgl-ct-line);
}
.vgl-ct__select select {
	width: 100%;
	height: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0 34px 0 16px;
	border: 0;
	border-radius: 0;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
	color: inherit;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}
.vgl-ct__reset {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: none;
	color: #8a9097;
	font-size: 13px !important;
	white-space: nowrap;
}
.vgl-ct.is-filtered .vgl-ct__reset {
	color: var(--vgl-ct-link);
}

/* Tabelle */
.vgl-ct__wrap {
	overflow: hidden;
	touch-action: pan-y;
}
.vgl-ct__wrap[hidden] {
	display: none;
}
.vgl-ct__table {
	width: 100%;
	margin: 0 !important;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
}
.vgl-ct__table th,
.vgl-ct__table td {
	padding: 10px 8px;
	border: 0;
	border-bottom: 1px solid var(--vgl-ct-line);
	vertical-align: middle;
	text-align: center;
	background-clip: padding-box;
}
.vgl-ct__label {
	width: var(--vgl-ct-label);
	padding-left: 16px !important;
	background: #fff;
	font-size: 14px;
	font-weight: 700;
	text-align: left !important;
}
.vgl-ct__row:nth-child(even) > * {
	background-color: var(--vgl-ct-soft);
}
.vgl-ct__cell {
	border-left: 1px solid var(--vgl-ct-line) !important;
	overflow-wrap: anywhere;
}
/* Spalte mit Auszeichnung: in der Badge-Farbe getönt und umrandet */
.vgl-ct__cell.has-col {
	border-left: 1px solid var(--vgl-ct-col) !important;
	border-right: 1px solid var(--vgl-ct-col) !important;
	background-color: color-mix(in srgb, var(--vgl-ct-col) 9%, #fff) !important;
}
.vgl-ct__row:nth-child(even) > .vgl-ct__cell.has-col {
	background-color: color-mix(in srgb, var(--vgl-ct-col) 14%, #fff) !important;
}
/* Feste Kopfzeile mit dem Produktnamen */
.vgl-ct__row--head > * {
	padding-top: 12px;
	padding-bottom: 12px;
}
.vgl-ct__row--head .vgl-ct__name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}
.vgl-ct__row--section > th {
	padding-top: 14px;
	padding-bottom: 14px;
	background: #fff !important;
	font-size: 15px;
}
.vgl-ct__row--badge > * {
	padding: 0 !important;
	border-bottom: 0 !important;
	border-left-color: transparent !important;
	background: #fff !important;
	vertical-align: bottom !important;
}
.vgl-ct__badge {
	display: block;
	padding: 8px 6px;
	background: var(--vgl-ct-badge, var(--vgl-ct-link));
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

/* Zelleninhalte */
/* Bild auf den Platz der Zelle begrenzen. Imagify setzt die Klasse ggf. auf ein <picture>
   und legt das <img> hinein – daher auch das innere Bild begrenzen. */
.vgl-ct__img,
.vgl-ct__img img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 130px;
	margin: 0 auto;
	object-fit: contain;
}
picture.vgl-ct__img {
	width: 100%;
}
.vgl-ct__name {
	color: var(--vgl-ct-link);
	font-weight: 600;
	text-decoration: none;
}
.vgl-ct__stars {
	position: relative;
	display: inline-block;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 1px;
}
.vgl-ct__stars-bg {
	color: #d5d9de;
}
.vgl-ct__stars-fg {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #f5a623;
}
.vgl-ct__reviews {
	display: block;
	margin-top: 4px;
	color: var(--vgl-ct-link);
	font-size: 14px;
	text-decoration: none;
}
.vgl-ct__offer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 4px;
	border-radius: 3px;
	background: var(--vgl-ct-btn);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
}
.vgl-ct__shop {
	padding: 2px 8px;
	border-radius: 2px;
	background: #fff;
	color: #111;
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.vgl-ct__price {
	flex: 1 1 auto;
	padding-right: 4px;
	text-align: right;
	white-space: nowrap;
}
.vgl-ct__yes,
.vgl-ct__no {
	display: block;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.1;
}
.vgl-ct__yes {
	color: #2e9e2e;
}
.vgl-ct__no {
	color: #d32f2f;
}
.vgl-ct__note {
	display: block;
	font-size: 13px;
}
.vgl-ct__na {
	color: #9aa0a6;
}
.vgl-ct__list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	text-align: left;
}
.vgl-ct__list li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 26px;
}
.vgl-ct__list li::before {
	content: "✓";
	position: absolute;
	top: 1px;
	left: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #4caf50;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.vgl-ct__list--cons li::before {
	content: "✗";
	background: #e53935;
}
.vgl-ct__button {
	display: block;
	padding: 12px 8px;
	border-radius: 3px;
	background: var(--vgl-ct-btn);
	background-image: linear-gradient(rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12));
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: filter 0.2s ease;
}
.vgl-ct__button:hover,
.vgl-ct__offer:hover {
	filter: brightness(0.9);
}
/* Hinweis-Sternchen an der Zeilenbeschriftung + Infofenster */
.vgl-ct {
	position: relative;
}
.vgl-ct__info {
	display: inline;
	margin: 0 0 0 1px;
	padding: 0 2px;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--vgl-ct-link);
	font-size: inherit !important;
	font-weight: 700;
	line-height: 1;
	vertical-align: baseline;
	cursor: help;
}
.vgl-ct__info:focus-visible {
	outline: 2px solid var(--vgl-ct-link);
	outline-offset: 1px;
}
.vgl-ct__tip {
	position: absolute;
	z-index: 30;
	width: 300px;
	max-width: calc(100% - 16px);
	padding: 14px 16px;
	border: 1px solid var(--vgl-ct-line);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
	color: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
}
.vgl-ct__tip[hidden] {
	display: none;
}
.vgl-ct__empty {
	margin: 0;
	padding: 24px 16px;
	text-align: center;
}
.vgl-ct .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Tablet: Leiste umbrechen */
@media (max-width: 900px) {
	.vgl-ct__bar {
		flex-wrap: wrap;
	}
	.vgl-ct__count {
		flex-basis: 100%;
		order: 3;
		border-top: 1px solid var(--vgl-ct-line);
	}
	.vgl-ct__updated {
		flex: 1 1 auto;
	}
}
/* Handy: 2 Produkte nebeneinander, schmale Beschriftung, Wischen zum Blättern */
@media (max-width: 600px) {
	.vgl-ct {
		--vgl-ct-min: 118px;
		--vgl-ct-label: 96px;
		font-size: 14px;
	}
	.vgl-ct__updated,
	.vgl-ct__count {
		padding: 10px 12px;
	}
	.vgl-ct__toggle {
		padding: 0 12px;
	}
	.vgl-ct__prev,
	.vgl-ct__next {
		width: 48px;
	}
	.vgl-ct__filters {
		flex-direction: column;
	}
	.vgl-ct__selects {
		grid-template-columns: 1fr 1fr;
	}
	.vgl-ct__select {
		border-bottom: 1px solid var(--vgl-ct-line);
	}
	.vgl-ct__reset {
		justify-content: flex-end;
		padding: 10px 12px;
	}
	.vgl-ct__label {
		padding-left: 10px !important;
		font-size: 12px;
		overflow-wrap: break-word;
		-webkit-hyphens: auto;
		hyphens: auto;
	}
	.vgl-ct__table th,
	.vgl-ct__table td {
		padding: 8px 6px;
	}
	.vgl-ct__img,
	.vgl-ct__img img {
		max-height: 90px;
	}
	.vgl-ct__offer {
		flex-direction: column;
	}
	.vgl-ct__price {
		padding: 0;
		text-align: center;
	}
}
