:root {
	--bg: #f5f5f5;
	--text: #222;
	--accent: #2d5524;
	--border: #ddd;
	--table-header-bg: #eee;
}

body {
	margin: 0;
	padding: 1.5rem;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: var(--bg);
	color: var(--text);
}

main {
	max-width: 1200px;
	margin: 0 auto;
}

h1 {
	text-align: center;
	margin-bottom: 1.5rem;
}

.search-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 2rem;
	gap: 0.9rem;
}

.search-input {
	width: 100%;
	max-width: 250px;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	border: 1px solid var(--border);
	font-size: 0.9rem;
	text-align: center;
}

.tables-container {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.table-section {
	background: #fff;
	border-radius: 6px;
	border: 1px solid var(--border);
	padding: 1rem 1.5rem;
}

.table-section h2 {
	margin-top: 0;
	margin-bottom: 0.75rem;
	font-size: 1.5rem;
	color: var(--accent);
}

.table-description {
	font-size: 0.85rem;
	color: #000;             /* schwarz */
	margin-top: -0.3rem;     /* enger an H2 */
	margin-bottom: 0.8rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	/*table-layout: fixed; /* NEU: fixe Spaltenbreiten */
	table-layout: auto; /* NEU: auto Spaltenbreiten */
}

thead {
	background: var(--table-header-bg);
}

th, td {
	padding: 0.2rem 0.3rem;
	//border-bottom: 1px solid var(--border);
	//min-width: fit-content;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;          /* NEU */
	text-overflow: ellipsis;   /* NEU */
}

/* 1. Spalte: Rang */
table th:nth-child(1),
table td:nth-child(1) {
	width: 3rem;        /* schmal, reicht für 1–3-stellige Ränge */
	text-align: left;
}

/* 2. Spalte: Name */
table th:nth-child(2),
table td:nth-child(2) {
	width: 12rem;       /* Name bekommt Platz */
	text-align: left;
	
	/* solange table = layout = auto und nicht fixed, funktioniert die Kürzung der Spalte nicht */
	white-space: nowrap;   /* Inhalte bleiben in einer Zeile */
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ab 3. Spalte: Werte (Teiler, Serien etc.) */
table th:nth-child(n+3),
table td:nth-child(n+3) {
	text-align: left;  /* Zahlen schön bündig */
	width: 2.5rem;     /* verhindert abgeschnittene Überschriften */
	
	/* solange table = layout = auto und nicht fixed, funktioniert die Kürzung der Spalte nicht */
	white-space: nowrap;   /* Inhalte bleiben in einer Zeile */
	overflow: hidden;
	text-overflow: ellipsis;
}

/* letzte Spalte: */
table th:last-child,
table td:last-child {
	text-align: left;  /* Zahlen schön bündig */
	width: auto;     /* verhindert abgeschnittene Überschriften */
}

tr.highlight td {
	background: var(--gold);
	font-weight: 600;
}

tr:nth-child(even):not(.highlight) td {
	background: #fafafa;
}

@media (max-width: 644px) {
  /* table { font-size: 0.65rem; } */
  
  table th:nth-child(n+4), table td:nth-child(n+4) { display: none;       }
  table th:last-child    , table td:last-child     { display: table-cell; }
}

#showSize {
  color: var(--black);
  text-decoration: none;
}


@media print {
  /* 1. Seitenformat: Hochformat mit automatischer Skalierung */
  @page {
    size: auto;
    margin: auto;
  }
  
  a:after { content: none !important; /* zurücksetzen */ }
  
  /* 1.1 Tabellenumrandung entfernen */
  .tables-container {
	  gap: 0;
  }
  
  /* 1.2 Tabellenumrandung entfernen */
  .table-section {
		background: #fff;
		border: 0px hidden;
		/*page-break-inside: avoid;
		break-inside: avoid;
		page-break-before: auto;
		break-before: auto;*/
	}

  /* 2. Tabellen: volle Breite, keine Spaltenausblendung */
  table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    /*page-break-inside: avoid;
	break-inside: avoid;*/
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  th, td {
	min-width: fit-content;
    border: none !important;
    padding: 6px 10px !important;
    font-size: 11pt;
    word-wrap: break-word;
    white-space: normal !important;
  }

  /* 3. Verhindere Seitenumbruch mitten in der Tabelle */
  /*tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }*/

  /* 4. Sichtbarkeit: Alle Spalten sichtbar */
  th, td {
    display: table-cell !important;
    visibility: visible !important;
  }

  /* 5. Allgemeine Druckoptimierung */
  body {
    background: none !important;
    color: #000 !important;
    font-family: Arial, sans-serif;
  }
  
  /* abwechselnde Zeilenhervorhebung */
  tr:nth-child(even):not(.highlight) td {
    background: #fafafa !important;
  }
  /*tr:nth-child(odd):not(.highlight) td {
    background: #ffffff !important;
  }*/

  /* 7. Alles andere ausblenden (Navigation, Footer etc.) */
  /*header, footer, nav, aside, .cookiebanner, .no-print {
    display: none !important;
    visibility: hidden !important;
  }*/
}





/* Basis: goldener Text + leichter Glanz */
.gold-shine{
  color: var(--gold);
  font-weight: 700;
  text-shadow:
    0 0 0.6px rgba(255,255,255,.35),
    0 0 8px rgba(240,200,73,.25);
}

/* Animierter “Glanzstrich” über dem Text (dezent) */
.gold-shine-anim{
  position: relative;
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  text-shadow:
    0 0 0.6px rgba(255,255,255,.35),
    0 0 10px rgba(240,200,73,.25);
}

.gold-shine-anim::after{
  content:"";
  position:absolute;
  inset:-0.15em -0.25em;       /* etwas größer als der Text */
  pointer-events:none;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.0) 40%,
    rgba(255,255,255,0.65) 50%,
    rgba(255,255,255,0.0) 60%,
    transparent 100%
  );
  mix-blend-mode: screen;       /* wirkt wie Glanz */
  transform: translateX(-120%);
  animation: goldSweep 2.8s ease-in-out infinite;
}

@keyframes goldSweep{
  0%, 35%   { transform: translateX(-120%); opacity: 0; }
  45%       { opacity: .9; }
  65%       { transform: translateX(120%);  opacity: .2; }
  100%      { transform: translateX(120%);  opacity: 0; }
}

/* Optional: reduziert Animation bei System-Einstellung */
@media (prefers-reduced-motion: reduce){
  .gold-shine-anim::after{ animation: none; opacity: .25; transform: translateX(0); }
}
