/* css/tc-liste-standard.css - systemweiter Listenstandard (20.11.2026, Gesamtauftrag 2, Punkte 2/3/4/7/9).
   Gehoert zu js/tc-liste-standard.js. Wirkt nur auf Tabellen mit data-tc-liste (.tc-ls) bzw. auf Zeilen, die
   ohnehin per Zeilenklick navigieren (data-tc-zeile-url / data-ticket-url). Farben nur ueber Variablen
   (hell/dunkel); Hover setzt immer Hintergrund UND Schrift (memory: Hover-Kontrast-Regeln). */

/* ---------- Zeilenklick ---------- */
tr[data-tc-zeile-url] {
	cursor: pointer;
}
table.tc-ls > tbody > tr[data-tc-zeile-url]:hover > td,
table.tc-ls > tbody > tr[data-tc-zeile-url]:focus-within > td {
	background-color: color-mix(in srgb, var(--color-primary, #2F4592) 9%, var(--color-surface, #fff));
	color: var(--color-text);
}
tr[data-tc-zeile-url]:focus-visible {
	outline: 3px solid var(--color-fokus-ring, #2F4592);
	outline-offset: -3px;
}
/* Punkt 7: in navigierbaren Datenzeilen keine unterstrichenen Textlinks - die ganze Zeile ist der Link. */
tr[data-tc-zeile-url] a:not(.button):not([class*="button-"]):not(.tc-admin-aktion-link),
tr[data-ticket-url] a:not(.button):not([class*="button-"]):not(.tc-admin-aktion-link),
table.tc-ls > tbody > tr > td a.tc-ls-link {
	text-decoration: none;
	color: inherit;
}
tr[data-tc-zeile-url] a:not(.button):not([class*="button-"]):not(.tc-admin-aktion-link):focus-visible,
tr[data-ticket-url] a:not(.button):not([class*="button-"]):not(.tc-admin-aktion-link):focus-visible {
	outline: 2px solid var(--color-fokus-ring, #2F4592);
	outline-offset: 2px;
}
a.tc-ls-link {
	font-weight: 600;
}

/* ---------- Sortierung per Spaltenkopf ---------- */
table.tc-ls th.tc-ls-sortierbar {
	padding: 0;
}
table.tc-ls .tc-ls-sortknopf {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-height: 36px;
	padding: 6px 10px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: inherit;
	text-align: left;
	text-transform: inherit;
	letter-spacing: inherit;
	cursor: pointer;
}
table.tc-ls .tc-ls-sortknopf:hover {
	background-color: color-mix(in srgb, var(--color-primary, #2F4592) 12%, transparent);
	color: inherit;
	text-decoration: underline;
}
table.tc-ls .tc-ls-sortknopf:focus-visible {
	outline: 3px solid var(--color-fokus-ring, #2F4592);
	outline-offset: -3px;
}
.tc-ls-sortpfeil {
	flex: 0 0 auto;
	font-size: .8em;
	line-height: 1;
	opacity: .45;
}
.tc-ls-sortpfeil::before { content: "\2195"; }                   /* ↕ unsortiert */
th[data-tc-ls-richtung="asc"] .tc-ls-sortpfeil { opacity: 1; }
th[data-tc-ls-richtung="asc"] .tc-ls-sortpfeil::before { content: "\25B2"; }   /* ▲ */
th[data-tc-ls-richtung="desc"] .tc-ls-sortpfeil { opacity: 1; }
th[data-tc-ls-richtung="desc"] .tc-ls-sortpfeil::before { content: "\25BC"; }  /* ▼ */

/* serverseitig sortierte Koepfe (paginierte Listen, includes/tc_liste_standard.php) */
a.tc-ls-th-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
}
a.tc-ls-th-link:hover,
a.tc-ls-th-link:focus-visible {
	color: inherit;
	text-decoration: underline;
}

/* ---------- Aktiv / Inaktiv ---------- */
table.tc-ls tr.tc-ls-trenner > td {
	padding: 0;
	background-color: var(--color-background);
	border-top: 2px solid var(--color-border-strong);
}
table.tc-ls .tc-ls-trenner-knopf {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: 40px;
	padding: 6px 12px;
	border: 0;
	background: transparent;
	color: var(--color-text);
	font: inherit;
	font-size: .9rem;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}
table.tc-ls .tc-ls-trenner-knopf:hover {
	background-color: color-mix(in srgb, var(--color-primary, #2F4592) 10%, var(--color-background));
	color: var(--color-text);
}
table.tc-ls .tc-ls-trenner-knopf:focus-visible {
	outline: 3px solid var(--color-fokus-ring, #2F4592);
	outline-offset: -3px;
}
.tc-ls-trenner-pfeil::before {
	content: "\25B8"; /* ▸ */
	display: inline-block;
	transition: transform .15s ease;
}
.tc-ls-trenner-knopf[aria-expanded="true"] .tc-ls-trenner-pfeil::before {
	transform: rotate(90deg);
}
table.tc-ls.tc-ls-inaktiv-zu > tbody > tr.tc-ls-inaktiv {
	display: none;
}
/* abgeschwaecht, aber gut lesbar: gedaempfte Schrift (>= 4,5:1) statt Deckkraft */
table.tc-ls > tbody > tr.tc-ls-inaktiv,
table.ticket-list-view.tc-ls tr.tc-admin-row--inaktiv {
	opacity: 1;
}
table.tc-ls > tbody > tr.tc-ls-inaktiv > td {
	color: var(--color-text-muted);
	background-color: color-mix(in srgb, var(--color-background) 70%, var(--color-surface));
}
table.tc-ls > tbody > tr.tc-ls-inaktiv img {
	filter: grayscale(1);
	opacity: .7;
}

/* ---------- Ja/Nein-Symbole (z. B. Bewegungsgruende "Abrechnungsrelevant") ---------- */
.tc-ls-janein {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-weight: 700;
	line-height: 1;
}
.tc-ls-janein svg { width: 16px; height: 16px; }
.tc-ls-janein--ja {
	color: var(--color-success-dark, #1E6B2E);
	background-color: var(--color-success-subtle, #E3F4E6);
}
.tc-ls-janein--nein {
	color: var(--color-text-muted);
	background-color: transparent;
}

/* ---------- Punkt 3.2: roter Knopf "Löschen" unten rechts in der Bearbeitungsmaske ----------
   Semantische Klasse .tc-knopf-gefahr (Abstimmung mit dem systemweiten Button-Standard). Die Aktionsleiste
   (includes/tc_maske.php, tc_maske_aktionsleiste_html) setzt den Gefahrbereich bereits rechts. */
.tc-aktionsleiste-gefahr .tc-maske-gefahr.tc-maske-gefahr--knopf,
.tc-maske-aktionen .tc-maske-gefahr.tc-maske-gefahr--knopf,
.tc-maske-gefahr.tc-maske-gefahr--knopf.tc-knopf-gefahr {
	/* Integration ga-1121: Farben/Maße zentral aus css/tc-knoepfe.css (Punkte 5+6), Dunkelmodus ueber die Variablen */
	display: inline-flex;
	align-items: center;
	gap: var(--tc-knopf-abstand, 7px);
	min-height: var(--tc-knopf-hoehe, 40px);
	padding: 0 var(--tc-knopf-innen, 13px);
	border: 1px solid var(--tc-knopf-gefahr, #A61C22);
	border-radius: var(--tc-knopf-radius, 8px);
	background-color: var(--tc-knopf-gefahr, #A61C22);
	color: var(--tc-knopf-auf-farbe, #fff);
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.tc-aktionsleiste-gefahr .tc-maske-gefahr.tc-maske-gefahr--knopf:hover,
.tc-aktionsleiste-gefahr .tc-maske-gefahr.tc-maske-gefahr--knopf:focus-visible,
.tc-maske-aktionen .tc-maske-gefahr.tc-maske-gefahr--knopf:hover,
.tc-maske-aktionen .tc-maske-gefahr.tc-maske-gefahr--knopf:focus-visible,
.tc-maske-gefahr.tc-maske-gefahr--knopf.tc-knopf-gefahr:hover,
.tc-maske-gefahr.tc-maske-gefahr--knopf.tc-knopf-gefahr:focus-visible {
	background-color: var(--tc-knopf-gefahr-hover, #8A151A);
	border-color: var(--tc-knopf-gefahr-hover, #8A151A);
	color: var(--tc-knopf-auf-farbe, #fff);
	text-decoration: none;
}
.tc-maske-gefahr--knopf svg { width: var(--tc-knopf-icon, 16px); height: var(--tc-knopf-icon, 16px); flex: 0 0 auto; }
.tc-aktionsleiste-gefahr { margin-left: auto; }
.tc-ls-sortpfeil-server { font-size: .8em; line-height: 1; opacity: .45; }
th[data-tc-ls-richtung="asc"] .tc-ls-sortpfeil-server,
th[data-tc-ls-richtung="desc"] .tc-ls-sortpfeil-server { opacity: 1; }

/* Punkt 8: Symbol im Kennzeichen Monatlich/Einmalig (includes/tc_wwi_kond_ui.php, tc_kond_ui_art_html) */
.tc-kond-art { display: inline-flex; align-items: center; gap: 4px; }
.tc-kond-art svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* Punkt 3.2: Loeschen-Knopf ausserhalb der Aktionsleiste (z. B. Ueberlassungsart) - rot, rechts */
.tc-ls-loeschen-leiste { display: flex; justify-content: flex-end; }
.button.tc-knopf-gefahr,
a.button.tc-knopf-gefahr {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-knopf-abstand, 7px);
	background-color: var(--tc-knopf-gefahr, #A61C22);
	border-color: var(--tc-knopf-gefahr, #A61C22);
	color: var(--tc-knopf-auf-farbe, #fff);
	border-radius: var(--tc-knopf-radius, 8px);
}
.button.tc-knopf-gefahr:hover,
.button.tc-knopf-gefahr:focus-visible {
	background-color: var(--tc-knopf-gefahr-hover, #8A151A);
	border-color: var(--tc-knopf-gefahr-hover, #8A151A);
	color: var(--tc-knopf-auf-farbe, #fff);
}
.button.tc-knopf-gefahr svg { width: var(--tc-knopf-icon, 16px); height: var(--tc-knopf-icon, 16px); }
.tc-maske-aktionen > .tc-maske-gefahr--knopf,
.tc-maske-aktionen > .tc-maske-gefahr-gesperrt { margin-left: auto; }

/* 20.11.2026 (g21-listen2): gruppierte Listen - beim Sortieren werden die Zwischenueberschriften ausgeblendet
   (flache Liste), Klick 3 auf den Spaltenkopf stellt die Gruppierung wieder her. */
table.tc-ls-sortiert > tbody > tr.tc-ls-gruppe { display: none; }
