/* Technicomp Variantentabelle (Live, technicomp.at)
   Aufbau wie auf Staging (Rollenware / Blattware, Kopfzeile, Mengenregler, Warenkorb-Symbol, kompakte Mobiltabelle),
   Farben und Schrift aus dem bestehenden Live-Design. Alles haengt an .tc-vt (Wrapper aus tc-vartable.php),
   die Werte stehen als lokale Variablen am Wrapper - auf Live gibt es das Token-System noch nicht.
   Quelle: C:\Arbeitsdaten\Novamira\technicomp-vartable-live\ */
.tc-vt {
	--tc-ink: #1b1c1d;
	--tc-ink-muted: #6b6d70;
	--tc-accent: #0881bc;
	--tc-accent-ink: #ffffff;
	--tc-soft: #e8f0f6;
	--tc-bg: #f6fafd;
	--tc-surface: #ffffff;
	--tc-line: #dddedf;
	--tc-line-strong: #8a8d91;
	--tc-radius-md: 4px;
	container-type: inline-size;
	width: 100%;
}

/* Titelzeile je Gruppe */
.tc-vt .tc-vt-heading { display: flex; align-items: baseline; gap: 8px; margin: 32px 0 12px; padding: 0 0 0 12px; font-family: inherit; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--tc-ink); }
.tc-vt .tc-vt-heading:first-child { margin-top: 0; }
.tc-vt .tc-vt-count { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; color: var(--tc-ink-muted); }
.tc-vt .tc-vt-count::before { content: "\b7\a0"; }

/* Tabelle */
.tc-vt .enable_responsive_wrap { background: var(--tc-surface); border: 1px solid var(--tc-line); border-radius: var(--tc-radius-md); overflow: hidden; }
.tc-vt table.vartable { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.tc-vt table.vartable thead th { padding: 12px 16px; background: var(--tc-soft); border: 0; border-bottom: 1px solid var(--tc-line); text-align: left; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--tc-ink); }
.tc-vt table.vartable tbody td { padding: 12px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--tc-line); vertical-align: middle; text-align: left; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--tc-ink); }
.tc-vt table.vartable tbody tr:last-child td { border-bottom: 0; }
.tc-vt table.vartable tbody tr:nth-child(2n) td { background: var(--tc-bg); }
.tc-vt table.vartable tbody tr:hover td { background: var(--tc-soft); }
.tc-vt table.vartable td.skucol,
.tc-vt table.vartable td.attribute_pa_format,
.tc-vt table.vartable td.tc-col-m2,
.tc-vt table.vartable td.pricecol { white-space: nowrap; }
.tc-vt table.vartable td.pricecol { font-weight: 600; }

/* Warenkorb-Symbol */
.tc-vt table.vartable td.cartcol form { margin: 0; }
.tc-vt table.vartable .cartcol button { display: inline-flex; align-items: center; justify-content: center; width: 52px; min-width: 0; height: 40px; margin: 0; padding: 0; background: var(--tc-accent); color: var(--tc-accent-ink); border: 0; border-radius: var(--tc-radius-md); box-shadow: none; cursor: pointer; transition: opacity .15s; }
.tc-vt table.vartable .cartcol button:hover { opacity: .85; }
.tc-vt table.vartable .cartcol button:focus-visible { outline: 2px solid var(--tc-ink); outline-offset: 2px; }
.tc-vt table.vartable .cartcol button span { display: none; }
.tc-vt table.vartable .cartcol button svg { width: 22px; height: 22px; margin: 0; }

/* Mengenregler (Gruppe aus tc-vartable.js): Minus | Zahl | Plus */
.tc-vt .tc-qty { display: inline-flex; align-items: center; border: 1px solid var(--tc-line); border-radius: var(--tc-radius-md); background: var(--tc-surface); overflow: hidden; vertical-align: middle; }
.tc-vt .tc-qty:focus-within { border-color: var(--tc-accent); }
.tc-vt .tc-qty__btn { display: flex; align-items: center; justify-content: center; width: auto; min-width: 0; height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--tc-ink-muted); cursor: pointer; line-height: 0; }
.tc-vt .tc-qty__btn--plus { color: var(--tc-ink); }
.tc-vt .tc-qty__btn:hover { color: var(--tc-accent); background: none; }
.tc-vt .tc-qty__btn svg { width: 11px; height: 11px; stroke-width: 2.5; stroke-linecap: round; }
.tc-vt .tc-qty > .tc-qty__btn--minus { order: 0; }
.tc-vt .tc-qty > input.qty { order: 1; width: 36px; min-width: 22px; height: 40px; line-height: 40px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: center !important; font-family: inherit; font-size: 14px; color: var(--tc-ink); -moz-appearance: textfield; appearance: textfield; }
.tc-vt .tc-qty > .tc-qty__btn--plus { order: 2; }
.tc-vt .tc-qty > input.qty:focus { outline: none; box-shadow: none; }
.tc-vt .tc-qty > input.qty::-webkit-outer-spin-button,
.tc-vt .tc-qty > input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Schmale Spalte am Desktop (auf Live steht die Tabelle neben der Infobox, rund 640 px): engere Zellen, kompakter Regler. */
@media (min-width: 768px) {
	@container (max-width: 819px) {
		.tc-vt table.vartable thead th,
		.tc-vt table.vartable tbody td { padding: 10px 5px; }
		.tc-vt table.vartable td.attribute_pa_vpe { white-space: nowrap; }
		.tc-vt table.vartable thead th:first-child,
		.tc-vt table.vartable tbody td:first-child { padding-left: 12px; }
		.tc-vt table.vartable thead th:last-child,
		.tc-vt table.vartable tbody td:last-child { padding-right: 8px; }
		.tc-vt .tc-qty__btn { padding: 0 7px; }
		.tc-vt .tc-qty > input.qty { width: 28px; }
		.tc-vt table.vartable .cartcol button { width: 44px; }
	}
	/* Tablet / kleines Fenster: die Spalte neben der Infobox wird zu schmal fuer acht Spalten - stufenweise ausblenden. */
	@container (max-width: 619px) {
		.tc-vt table.vartable th.vartable_sku, .tc-vt table.vartable td.skucol,
		.tc-vt table.vartable th.tc-col-breite, .tc-vt table.vartable td.tc-col-breite { display: none; }
	}
	@container (max-width: 459px) {
		.tc-vt table.vartable th.tc-col-m2, .tc-vt table.vartable td.tc-col-m2 { display: none; }
	}
}

/* Mobil (bis 767 px): echte, kompakte Tabelle, eine Zeile je Ausfuehrung:  Format | VPE | Preis EUR | Menge | Warenkorb.
   Art.-Nr., Breite und EUR/m2 entfallen. Abweichung von Staging (13.11.2026): Spaltenbreiten nach Inhalt statt fest, damit das Format nicht umbricht. */
@media (max-width: 767px) {
	.tc-vt .tc-vt-heading { font-size: 20px; line-height: 26px; }
	/* Die Tabelle selbst ist das Grid, Zeilen sind durchlaessig (display: contents): so richten sich die Spalten nach dem Inhalt
	   aller Zeilen. Format und Preis bekommen ihre volle Breite (kein Umbruch), VPE nimmt den Rest und bricht notfalls um. */
	.tc-vt table.vartable.enable_responsive { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content 90px 53px; /* Menge 84 + 2x3, Warenkorb 44 + 3 + 6 */ width: 100%; min-width: 0; max-width: 100%; }
	.tc-vt table.vartable.enable_responsive thead,
	.tc-vt table.vartable.enable_responsive tbody,
	.tc-vt table.vartable.enable_responsive tr { display: contents; }
	.tc-vt table.vartable.enable_responsive th,
	.tc-vt table.vartable.enable_responsive td {
		display: flex; align-items: center; float: none; width: auto; min-width: 0; max-width: none; height: auto; clear: none; margin: 0; padding: 0 3px !important;
		box-sizing: border-box; text-align: left; white-space: normal; border: 0 !important;
	}
	.tc-vt table.vartable.enable_responsive th { min-height: 40px; background: var(--tc-soft) !important; }
	.tc-vt table.vartable.enable_responsive td { min-height: 60px; background: var(--tc-surface) !important; border-bottom: 1px solid var(--tc-line) !important; }
	.tc-vt table.vartable.enable_responsive tbody tr:nth-child(2n) td { background: var(--tc-bg) !important; } /* Zebra wie am Desktop (Staging: mobil alle Zeilen weiss) */
	.tc-vt table.vartable.enable_responsive tbody tr:last-child td { border-bottom: 0 !important; }
	.tc-vt table.vartable.enable_responsive th.pa-format,
	.tc-vt table.vartable.enable_responsive td.attribute_pa_format { padding-left: 12px !important; white-space: nowrap; }
	.tc-vt table.vartable.enable_responsive th.vartable_cart,
	.tc-vt table.vartable.enable_responsive td.cartcol { padding-right: 6px !important; }
	.tc-vt table.vartable.enable_responsive td::before { content: none; display: none; }
	.tc-vt table.vartable.enable_responsive td span { display: inline; }
	/* entfallen mobil */
	.tc-vt table.vartable.enable_responsive th.vartable_sku, .tc-vt table.vartable.enable_responsive td.skucol,
	.tc-vt table.vartable.enable_responsive th.tc-col-breite, .tc-vt table.vartable.enable_responsive td.tc-col-breite,
	.tc-vt table.vartable.enable_responsive th.tc-col-m2, .tc-vt table.vartable.enable_responsive td.tc-col-m2 { display: none; }
	/* Preis rechtsbuendig, Waehrung steht im Kopf ("Preis EUR") */
	.tc-vt table.vartable.enable_responsive th.tc-col-preis,
	.tc-vt table.vartable.enable_responsive td.pricecol { justify-content: flex-end; text-align: right !important; white-space: nowrap; }
	.tc-vt table.vartable.enable_responsive th.tc-col-menge,
	.tc-vt table.vartable.enable_responsive td.qtycol { justify-content: center; text-align: center !important; }
	.tc-vt table.vartable.enable_responsive td.pricecol .woocommerce-Price-currencySymbol { display: none; }
	.tc-vt table.vartable.enable_responsive th.tc-col-preis::after { content: "\a0\20ac"; }
	/* Menge 84 x 44: inneres Grid 28 / 1fr / 28 */
	.tc-vt table.vartable td.qtycol .tc-qty { display: grid; grid-template-columns: 28px 1fr 28px; width: 84px; height: 44px; border-color: var(--tc-line-strong); }
	.tc-vt table.vartable td.qtycol .tc-qty__btn { width: 28px; height: 44px; padding: 0; }
	.tc-vt table.vartable td.qtycol .tc-qty input.qty { width: 100%; min-width: 0; height: 44px; line-height: 44px; font-size: 16px; }
	/* Warenkorb: Symbol-Button 44 x 44 */
	.tc-vt table.vartable td.cartcol form { display: flex; margin: 0; }
	.tc-vt table.vartable td.cartcol input[type="hidden"] { display: none; }
	.tc-vt table.vartable td.cartcol button { width: 44px !important; height: 44px !important; min-width: 44px; padding: 0 !important; }
	.tc-vt table.vartable td.cartcol button span { display: none !important; }
	.tc-vt table.vartable td.cartcol button svg { width: 20px; height: 20px; }
}
