/* ======================= DYNAMIC-TABLE ======================= */
/* Design-Variablen für Buttons - ALLE ANPASSUNGEN AN EINER STELLE */
:root {
	/* Tabelle-Mindest-Größe  */
	--table-min-height: 450px;
	--table-max-height: 630px;

	/* Abstand der Tabelle om Bildschirmrand Oben  */
	--table-distance-top: 60px;

 	/* Button-Größe */
  	--button-width: 20px;
	--button-height: 20px;
	--button-min-width: 20px;
	--button-padding: 2px;
	--button-border-radius: 4px;
  
  	/* Button-Farben */
  	--button-border-color: rgba(200, 220, 250, 0.2);
  	--button-bg-hover: rgba(200, 220, 250, 0.2);
  	--button-border-hover: rgba(200, 220, 250, 0.6);
  	--button-disabled-bg: rgba(100, 100, 100, 0.1);
  	--button-disabled-border: rgba(150, 150, 150, 0.3);
  
  	/* Icon-Größe */
  	--icon-width: 16px;
  	--icon-height: 16px;
  
  	/* Abstände */
 	--button-gap: 10px;
  	--container-padding-left: 4px;
  	--container-padding-right: 4px;
  
  	/* Hover-Effekte */
  	--button-transition: all 0.2s ease;
  	--icon-transform: scale(1.1);
}
/* Container */
.listTableContainer {
	position: relative;
  	top: var(--table-distance-top);
  	background: rgba(10, 12, 25, 1.0);
  	/*border: 1px groove rgba(60, 60, 100, 1.0);*/
  	border-radius: 4px;
  	overflow: hidden;
  	min-height: var(--table-min-height);
  	height: 100%;
  	max-height: var(--table-max-height);
}

/* Wrapper für fixierten Header */
.table-wrapper {
  	display: flex;
  	flex-direction: column;
  	overflow: hidden;
  	min-height: var(--table-min-height);
  	height: 100%;
  	border: 1px groove rgba(60, 60, 100, 1.0);
}

.dynamic-table-header {
  	flex-shrink: 0;
  	display: flex;
  	background-color: rgba(30, 37, 75, 1.0);
  	color: rgba(200, 200, 250, 1.0);
  	border-bottom: 1px solid rgba(60, 60, 100, 1.0);
  	font-weight: bold;
  	text-align: left;
  	 min-width: fit-content; /* Wichtig */
  width: fit-content; /* Wichtig */
}

.dynamic-table-body {
  	display: flex;
  	flex-direction: column;
  	overflow-x: auto;
  	overflow-y: auto;
  	flex-grow: 1;
  	min-width: fit-content; /* Wichtig */
}

/* Grundlegende Formatierung für die dynamische Tabelle */
.dynamic-table {
  	display: flex;
  	flex-direction: column;
  	background-color: transparent;
  	color: rgba(200, 200, 250, 1.0);
  	font-family: 'Lato', Arial;
  	font-size: 10px;
  	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  	margin: 0 auto;
  	width: 100%;
  	min-width: fit-content;
  	min-height: var(--table-min-height);
  	height: 100%;
}

.table-cell {
  	box-sizing: border-box;
  	padding: 4px; /* Konsistent mit JavaScript */
  	border-right: 1px groove rgba(200, 220, 250, 0.2);
}

.dynamic-table-header .table-cell {
  	white-space: nowrap;
  	overflow: hidden;
  	text-overflow: ellipsis;
  	display: flex;
  	align-items: center; /* ← Vertikale Zentrierung */
  	min-height: 20px;
}

/* Datenzeilen */
.table-row {
  	display: flex;
  	border-bottom: 1px groove rgba(200, 220, 250, 0.1);
  	transition: background-color 0.2s ease;
  	min-width: fit-content; /* Wichtig: erlaubt horizontales Scrollen */
  	width: fit-content; /* Wichtig: flexibel an Inhalt anpassen */
}

.table-row:nth-child(even) {
  	background-color: rgba(200, 200, 250, 0.08);
}

.table-row:hover {
  	background-color: rgba(220, 220, 250, 0.12);
}

/* Letzte Zelle ohne rechten Rahmen */
.dynamic-table-header .table-cell:last-child,
.table-row .table-cell:last-child {
  	border-right: none;
}

/* Zellen in den Datenzeilen */
.table-row .table-cell {
  	white-space: nowrap;
  	overflow: hidden;
  	text-overflow: ellipsis;
  	display: flex;
  	align-items: center; /* ← Vertikale Zentrierung */
  	min-height: 20px; /* Mindesthöhe für vertikale Zentrierung */
}

/* Cross-Zellen zentrieren */
.table-cell .cross-value {
  	display: flex;
  	align-items: center;
  	justify-content: center;
  	font-family: 'Lato', Arial;
  	font-weight: bold;
 	color: rgba(250, 60, 120, 1.0);
}

/* Zentrierte oder rechtsbündige Textausrichtung */
.text-center {
 	text-align: center;
}

.text-right {
  	text-align: right;
}

.text-left {
  	text-align: left;
}

.table-cell.text-left {
  	justify-content: flex-start;
}

.table-cell.text-center {
  	justify-content: center;
}

.table-cell.text-right {
  	justify-content: flex-end;
}

/* Farbwerte für colorcode-box */
.ccYellow {background: rgba(200, 200, 0, 1);}
.ccRed {background: rgba(200, 0, 0, 1);}
.ccGreen {background: rgba(0, 200, 0, 1);}
.ccBlue {background: rgba(50, 50, 200, 1);}
.ccGrey {background: rgba(100, 100, 100, 1);}
.ccMagenta {
	background: rgba(200, 0, 200, 1);
	color: rgba(100, 0, 10, 1) !important;
	animation: blinkBox 2s ease-in-out infinite;
}
.ccCyan {
	background: rgba(0, 200, 200, 1);
	color: rgba(0, 100, 100, 1) !important;
	animation: blinkBox 2s ease-in-out infinite;
}
.ccWhiteRed {
	background: rgba(200, 200, 200, 1);
	color: rgba(250, 0, 0, 1) !important;
}
.farbcodeBox {
	display: block;
	height: 12px;
	width: 55px;
	font-weight: bold;
	text-align: center;

	border-radius: 2px;
  	font-size: 8px;
  	line-height: 12px;
}

/* Button-Container mit CSS-Abständen */
.button-container {
  	display: flex;
  	/*justify-content: flex-end;*//* justify-content wird jetzt per JavaScript gesetzt */
  	gap: var(--button-gap);/* ← Hier kannst du den Abstand zwischen Buttons anpassen */
  	padding-left: var(--container-padding-left); /* ← Hier kannst du den Abstand zum Zellenrand anpassen */
  	padding-right: var(--container-padding-right); /* ← Hier kannst du den Abstand zum Zellenrand anpassen */
  	width: 100%;
  	min-width: fit-content;
  	box-sizing: border-box;
  	align-items: center; /* ← Button-Container vertikal zentrieren */
  	min-height: calc(var(--button-height) + 10px);
}

/* Einzelne Buttons mit CSS-Formatierung */
.table-button {
  	background: none;
  	border: 1px solid rgba(200, 220, 250, 0.3);
  	padding: var(--button-padding);/* ← Hier kannst du den Button-Innenabstand anpassen */
  	cursor: pointer;
  	border-radius: var(--button-border-radius);
  	transition: var(--button-transition);
  	width: var(--button-width);
  	height: var(--button-height);
  	min-width: var(--button-min-width);
  	display: flex;
  	align-items: center;
  	justify-content: center;
  	box-sizing: border-box;
}

.table-button:hover {
  	background-color: rgba(200, 220, 250, 0.2);
 	border-color: rgba(200, 220, 250, 0.6);
}

/* Button-Icons */
.list-button-icon {
  	width: var(--icon-width);
  	height: var(--icon-height);
  	display: block;
  	margin: 0 auto;
  	cursor: pointer;
  	transition: transform 0.1s ease;
}

.list-button-icon:hover {
  	transform: scale(1.1);
}

/* Deaktivierte Buttons */
.button-disabled {
  	opacity: 0.5;
  	cursor: not-allowed !important;
  	background-color: var(--button-disabled-bg) !important;
  	border-color: var(--button-disabled-border) !important;
}

.button-disabled .list-button-icon {
  	opacity: 0.5;
  	cursor: not-allowed !important;
  	transform: none !important; /* Hover-Effekt deaktivieren */
}

/* Hover-Effekt nur für aktive Buttons */
.table-button:not(.button-disabled):hover {
  	background-color: var(--button-bg-hover);
  	border-color: var(--button-border-hover);
}

.table-button:not(.button-disabled) .list-button-icon:hover {
  	transform: var(--icon-transform);
}

/* Status Icons */
.list-status-icon {
	width: 10px;
	height: 10px;
	cursor: pointer;
	transition: transform 0.1s ease;
}
.list-status-icon:hover {
	transform: scale(1.1);
}
/* ====================================================== */

/* No-Data Zeile - VOLLE BREITE */
.no-data {
  color: rgba(200, 0, 0, 1.0);
  background: rgba(50, 0, 0, 1.0);
  animation: blink 2s ease-in-out infinite;
  text-align: center;
  padding: 15px;
  font-weight: bold;
  border-radius: 2px;
 /* margin: 10px;*/
  /* WICHTIG: Volle Breite erzwingen */
  width: 100% !important;
  min-width: 100% !important;
  flex: 1; /* Nimmt verfügbaren Platz */
  box-sizing: border-box;
}

/* Spezielle Behandlung für No-Data im Scroll-Container */
.table-row.no-data-row {
  width: 100% !important;
  min-width: 100% !important;
}

.table-row.no-data-row .no-data {
  width: 100% !important;
  min-width: 100% !important;
}