/* jh Add to Quote & Preisregeln - gemeinsame Positions-Tabelle
   (Angebotsseite, Mein Konto und Admin-Angebotsansicht). */

:root {
	--jh-qp-accent: #008b7c;
	--jh-qp-accent-dark: #026c5f;
	/* JÄGER Blau (v1.1.20): Tobias' Korrektur zu v1.1.19 - der Tabellenkopf
	   soll in JÄGER-BLAU stehen, nicht im türkisen "jh-qp-accent". Wert
	   entspricht der auf der Website bereits definierten Divi-Global-Farbe
	   "--color-primary" (live per getComputedStyle(document.documentElement)
	   geprüft: #417bb3 - dieselbe Farbe wird u.a. für die WPDM-Download-
	   Tabellenkopfzeile verwendet), NICHT frei geschätzt. Absichtlich als
	   eigene Variable statt "--jh-qp-accent" umzudefinieren, damit Buttons/
	   Bundle-Badges/Fokus-Rahmen weiterhin türkis bleiben - nur der
	   Tabellenkopf wechselt die Farbe. */
	--jh-qp-header-accent: #417bb3;
	--jh-qp-text: #555b60;
	--jh-qp-muted: #8a9299;
	--jh-qp-border: #e8ecef;
	--jh-qp-soft: #f7f9fa;
}

table.jh-qp-items-table.shop_table {
	width: 100%;
	margin: 0;
	border: 1px solid var(--jh-qp-border);
	border-spacing: 0;
	border-collapse: separate;
	border-radius: 6px 6px 0 0;
	table-layout: fixed;
	background: #fff;
	color: var(--jh-qp-text);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: none;
	overflow: hidden;
}

/* UX-Fix (v1.2.7/v1.2.8): auf der Angebotsanfrageliste (is-editable)
   entfallen "Preis"/"Angebotspreis"/"Summe" (siehe items-table.php,
   $show_price_columns) - es gibt dort noch kein Angebot, nur eine
   Anfrage, und "Summe" ist ohne die beiden Preis-Spalten ebenfalls
   bedeutungslos (Tobias: "warum aber immer noch Menge UND Summe?").
   Übrig bleiben Produkt/Menge/Löschen; die freigewordene Breite geht
   überwiegend an "Produkt" (Bilder/Name hatten zu wenig Platz). Falls
   hier ausnahmsweise doch mit Preis-Spalten gerendert wird
   (show_price_columns=true + editable), greifen ergänzend die
   Fallback-Breiten der is-readonly-Regeln weiter unten. */
table.jh-qp-items-table.shop_table.is-editable col.jh-qp-column-product { width: 70%; }
table.jh-qp-items-table.shop_table.is-editable col.jh-qp-column-price { width: 13%; }
table.jh-qp-items-table.shop_table.is-editable col.jh-qp-column-offered { width: 15%; }
table.jh-qp-items-table.shop_table.is-editable col.jh-qp-column-qty { width: 20%; }
table.jh-qp-items-table.shop_table.is-editable col.jh-qp-column-total { width: 17%; }
table.jh-qp-items-table.shop_table.is-editable col.jh-qp-column-remove { width: 10%; }

table.jh-qp-items-table.shop_table.is-readonly col.jh-qp-column-product { width: 42%; }
table.jh-qp-items-table.shop_table.is-readonly col.jh-qp-column-price { width: 14%; }
table.jh-qp-items-table.shop_table.is-readonly col.jh-qp-column-offered { width: 15%; }
table.jh-qp-items-table.shop_table.is-readonly col.jh-qp-column-qty { width: 13%; }
table.jh-qp-items-table.shop_table.is-readonly col.jh-qp-column-total { width: 16%; }

table.jh-qp-items-table.shop_table .jh-qp-item-offered-price {
	width: 100%;
	max-width: 90px;
	box-sizing: border-box;
}

/* BUGFIX/UX (v1.1.19): Tobias' Rückmeldung "sieht genauso scheiße aus wie
   davor, ohne Farbe" bezog sich konkret auf die Kopfzeile - sie war bisher
   weiß/unauffällig und hob sich nicht vom Rest der Seite ab ("orientier
   dich am Warenkorb"). Da der echte WooCommerce-Warenkorb für Tobias'
   Rolle immer leer bleibt (unser eigenes Plugin ersetzt "In den
   Warenkorb" überall durch "Auf die Anfrageliste" - live geprüft, auch
   ein direkter add-to-cart-Link wurde serverseitig blockiert), gibt es
   keine 1:1-Vorlage zum Nachbauen. Auf Tobias' Wunsch hin ("freie
   Gestaltung nach JÄGER-Farben") jetzt eine kräftige, farbige Kopfzeile
   in der bestehenden Akzentfarbe. */
table.jh-qp-items-table.shop_table thead,
table.jh-qp-items-table.shop_table thead tr,
table.jh-qp-items-table.shop_table thead th {
	background: var(--jh-qp-header-accent);
}

table.jh-qp-items-table.shop_table thead th {
	padding: 12px 22px;
	border: 0;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1.25px;
	line-height: 1.25;
	text-align: left;
	text-transform: none;
	vertical-align: middle;
}

table.jh-qp-items-table.shop_table thead th:last-child {
	text-align: center;
}

table.jh-qp-items-table.shop_table tbody td {
	padding: 23px 22px;
	border: 0;
	border-bottom: 1px solid var(--jh-qp-border);
	background: #fff;
	color: #70777d;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.25px;
	text-align: left;
	vertical-align: middle;
}

table.jh-qp-items-table.shop_table tbody tr:last-child > td {
	border-bottom: 0;
}

/* Leichte Zebra-Streifen (v1.1.19), Teil derselben "mehr Farbe"-Anfrage
   wie die Kopfzeile oben. Gleiche Spezifität wie die Bundle-Zeilen-Regeln
   weiter unten (jeweils 2 Klassen + 4 Elemente) - deren spätere Position
   in dieser Datei gewinnt bei Gleichstand automatisch gegen diese Regel,
   ein zusätzliches !important ist hier bewusst nicht nötig. */
table.jh-qp-items-table.shop_table tbody tr:nth-child(even) td {
	background: var(--jh-qp-soft);
}

.jh-qp-mobile-label {
	display: none;
}

.jh-qp-cell-value {
	display: inline-block;
	max-width: 100%;
}

.jh-qp-product-cell {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
}

.jh-qp-product-image {
	display: flex;
	flex: 0 0 76px;
	align-items: center;
	justify-content: center;
	width: 76px;
	min-height: 56px;
}

table.jh-qp-items-table.shop_table .jh-qp-product-image img {
	display: block;
	width: auto;
	max-width: 76px;
	height: auto;
	max-height: 76px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.jh-qp-product-details {
	min-width: 0;
}

.jh-qp-product-name,
.jh-qp-product-name a,
.jh-qp-bundle-name {
	color: #697178;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	text-decoration: none;
	word-break: break-word;
}

.jh-qp-product-name a:hover,
.jh-qp-product-name a:focus {
	color: var(--jh-qp-accent);
	text-decoration: underline;
}

.jh-qp-product-sku,
.jh-qp-col-sku,
.jh-qp-item-variation {
	margin-top: 10px;
	color: #9aa1a7;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.65px;
	line-height: 1.4;
}

.jh-qp-item-attributes {
	margin: 9px 0 0;
	padding: 0;
	list-style: none;
}

.jh-qp-item-attributes li {
	margin: 3px 0 0;
	padding: 0;
	color: #8a9299;
	font-size: 12px;
	line-height: 1.45;
	list-style: none;
}

.jh-qp-item-attributes strong {
	color: #60676d;
	font-weight: 600;
}

.jh-qp-money .woocommerce-Price-amount,
.jh-qp-money .woocommerce-Price-currencySymbol {
	color: inherit;
	font: inherit;
}

table.jh-qp-items-table.shop_table input.jh-qp-item-qty,
table.jh-qp-items-table.shop_table input.jh-qp-bundle-child-qty {
	display: block;
	width: 61px;
	height: 32px;
	min-height: 32px;
	max-width: 100%;
	margin: 0;
	padding: 3px 8px;
	box-sizing: border-box;
	border: 1px solid #d4dadd;
	border-radius: 4px;
	background: #fff;
	color: #4f555a;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	text-align: center;
	box-shadow: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

table.jh-qp-items-table.shop_table input.jh-qp-item-qty:hover,
table.jh-qp-items-table.shop_table input.jh-qp-bundle-child-qty:hover {
	border-color: #b8c1c6;
}

table.jh-qp-items-table.shop_table input.jh-qp-item-qty:focus,
table.jh-qp-items-table.shop_table input.jh-qp-bundle-child-qty:focus {
	border-color: var(--jh-qp-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 139, 124, 0.12);
}

/* UX-Fix (v1.2.7, Tobias' Feedback): das Löschen-Symbol wirkte als
   dezentes helles Blau kaum wie eine (destruktive) Löschen-Aktion und war
   ihm zu klein ("das sollte rot sein und vielleicht 'n Muggasäckele
   größer"). Farbe ist jetzt "Jh-Warnung-Rot" (#ed0219) aus der
   JÄGER-CI/CD-Farbpalette - dieselbe Farbe, die dort bereits für
   Warnungen steht - statt einer frei geschätzten Rot-Variante. */
table.jh-qp-items-table.shop_table button.jh-qp-remove-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #ed0219;
	font-family: Arial, sans-serif;
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
	appearance: none;
}

table.jh-qp-items-table.shop_table button.jh-qp-remove-item:hover,
table.jh-qp-items-table.shop_table button.jh-qp-remove-item:focus {
	background: #fdecec;
	color: #b90115;
	outline: none;
	transform: scale(1.04);
}

table.jh-qp-items-table.shop_table button.jh-qp-remove-item:focus-visible {
	box-shadow: 0 0 0 3px rgba(237, 2, 25, 0.2);
}

table.jh-qp-items-table.shop_table .jh-qp-col-remove {
	text-align: center;
}

/* Bundle-Kopfzeile */
table.jh-qp-items-table.shop_table tbody tr.jh-qp-bundle-parent-row > td {
	background: #f8fafb;
}

.jh-qp-bundle-parent-row {
	cursor: pointer;
	box-shadow: inset 4px 0 0 var(--jh-qp-accent);
	transition: background-color 160ms ease;
}

.jh-qp-bundle-parent-row:hover > td,
.jh-qp-bundle-parent-row:focus > td {
	background: #f1f7f6 !important;
}

.jh-qp-bundle-parent-row:focus {
	outline: 2px solid rgba(0, 139, 124, 0.3);
	outline-offset: -2px;
}

.jh-qp-bundle-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.jh-qp-bundle-toggle-icon {
	display: inline-flex;
	flex: 0 0 22px;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 3px;
	background: var(--jh-qp-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
}

.jh-qp-bundle-toggle-icon::before {
	content: "+";
}

.jh-qp-bundle-parent-row[aria-expanded="true"] .jh-qp-bundle-toggle-icon::before {
	content: "−";
}

.jh-qp-bundle-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 7px;
	border-radius: 3px;
	background: var(--jh-qp-accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.7px;
	line-height: 1.3;
	text-transform: uppercase;
}

.jh-qp-bundle-title {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
	flex-wrap: wrap;
}

.jh-qp-bundle-count {
	color: #92999f;
	font-size: 12px;
	font-weight: 400;
}

/* Bundle-Kindzeilen: eingerückt und standardmäßig eingeklappt. */
table.jh-qp-items-table.shop_table tbody tr.jh-qp-bundle-child-row > td {
	background: #fcfdfd;
}

.jh-qp-bundle-child-row .jh-qp-product-cell {
	padding-left: 24px;
}

.jh-qp-bundle-child-row.is-collapsed {
	display: none;
}

.jh-qp-quote-row.is-updating,
.jh-qp-items-table.is-updating {
	opacity: 0.52;
	pointer-events: none;
}

.jh-qp-admin-totals th {
	padding: 8px 10px;
}

@media (max-width: 768px) {
	table.jh-qp-items-table.shop_table,
	table.jh-qp-items-table.shop_table tbody {
		display: block;
		width: 100%;
		border: 0;
		background: transparent;
	}

	table.jh-qp-items-table.shop_table colgroup,
	table.jh-qp-items-table.shop_table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	table.jh-qp-items-table.shop_table tbody tr {
		display: block;
		width: 100%;
		margin: 0 0 14px;
		border: 1px solid var(--jh-qp-border);
		background: #fff;
		box-shadow: none;
	}

	table.jh-qp-items-table.shop_table tbody tr:last-child {
		margin-bottom: 0;
	}

	table.jh-qp-items-table.shop_table tbody td,
	table.jh-qp-items-table.shop_table tbody tr:last-child > td {
		display: grid;
		grid-template-columns: minmax(92px, 31%) minmax(0, 1fr);
		align-items: center;
		width: 100%;
		min-height: 47px;
		padding: 11px 14px;
		box-sizing: border-box;
		border: 0;
		border-bottom: 1px solid var(--jh-qp-border);
		text-align: left;
	}

	table.jh-qp-items-table.shop_table tbody tr > td:last-child {
		border-bottom: 0;
	}

	.jh-qp-mobile-label[hidden] {
		display: block !important;
		padding-right: 14px;
		color: #454a4e;
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.9px;
		line-height: 1.3;
	}

	.jh-qp-cell-value {
		display: block;
		min-width: 0;
	}

	.jh-qp-product-cell {
		gap: 14px;
	}

	.jh-qp-product-image {
		flex-basis: 64px;
		width: 64px;
	}

	table.jh-qp-items-table.shop_table .jh-qp-product-image img {
		max-width: 64px;
		max-height: 64px;
	}

	.jh-qp-product-name,
	.jh-qp-product-name a,
	.jh-qp-bundle-name {
		font-size: 13px;
	}

	.jh-qp-product-sku,
	.jh-qp-col-sku,
	.jh-qp-item-variation {
		margin-top: 7px;
		font-size: 12px;
	}

	table.jh-qp-items-table.shop_table input.jh-qp-item-qty,
	table.jh-qp-items-table.shop_table input.jh-qp-bundle-child-qty {
		margin: 0;
	}

	table.jh-qp-items-table.shop_table .jh-qp-col-remove {
		text-align: left;
	}

	table.jh-qp-items-table.shop_table button.jh-qp-remove-item {
		justify-self: start;
	}

	table.jh-qp-items-table.shop_table tbody tr.jh-qp-bundle-parent-row {
		border-left: 4px solid var(--jh-qp-accent);
	}

	table.jh-qp-items-table.shop_table tbody tr.jh-qp-bundle-parent-row > td {
		background: #f8fafb;
	}

	.jh-qp-bundle-heading {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.jh-qp-bundle-title {
		flex: 1 1 140px;
	}

	.jh-qp-bundle-child-row .jh-qp-product-cell {
		padding-left: 0;
	}

	table.jh-qp-items-table.shop_table tbody tr.jh-qp-bundle-child-row {
		width: calc(100% - 14px);
		margin-left: 14px;
		border-left: 3px solid #d5e9e6;
	}
}

@media (max-width: 480px) {
	table.jh-qp-items-table.shop_table tbody td,
	table.jh-qp-items-table.shop_table tbody tr:last-child > td {
		grid-template-columns: 82px minmax(0, 1fr);
		padding: 10px 12px;
	}

	.jh-qp-product-cell {
		align-items: flex-start;
		gap: 10px;
	}

	.jh-qp-product-image {
		flex-basis: 52px;
		width: 52px;
	}

	table.jh-qp-items-table.shop_table .jh-qp-product-image img {
		max-width: 52px;
		max-height: 52px;
	}
}
