/* === Grundlayout === */
html, body {
  min-width: max-content;
}

body {
  margin: 1em;
  font-family: monospace;
  font-size: 16px;
}


header {
  position: sticky;
  left:  1em;
  width: calc(100vw - 3.5em);
  margin-bottom: 1em;
}

input {
  width: 100%;
  padding: 0.5em;
}


/* === Tabellenstruktur === */
table {
  width: 100%;
  border-spacing: 0;
}

th, td {
  padding: 0.75em;
  border-bottom: 1px solid black;
  text-align: left;
  max-width: 200px;
  vertical-align: top;
}

/* === Tabellenkopf === */
th {
  position: sticky;
  top: 0;
  background-color: #ddd;
  cursor: pointer;
  z-index: 3;
}

th::after {
  content: "▼";
  margin-left: 0.5em;
  color: #aaa;
}

/* Sortier-Indikatoren */
th.asc::after {
  content: "▲";
  color: #000;
}

th.desc::after {
  content: "▼";
  color: #000;
}

/* Nicht-sortierbare Spalten */
th.no-sort {
  cursor: default;
}

th.no-sort::after {
  content: "";
}

/* Erste Spalte fixieren */
th:first-child {
  left: 0;
  z-index: 4;
}

td:first-child {
  position: sticky;
  left: 0;
  background-color: #ffffff;
  border-width: 0 1px 1px 0;
  border-color: #000000;
  border-style: solid;
  z-index: 2;
}

tr:nth-child(even) td:first-child {
  background-color: #dddddd;
}

tr:nth-child(even){
  background-color: #dddddd;
}

/* === Bilddarstellung === */
.abbildungen {
  display: flex;
  gap: 0.5em;
}

.abbildungen img {
  width: 10em;
  height: 10em;
  object-fit: contain;
}

.abbildungen img.clickable {
  cursor: pointer;
}


/* === Overlay-Grundfläche === */
#imageOverlay {
  position: fixed;
  inset: 0;                  /* top/right/bottom/left = 0 */
  background: rgba(255,255,255,1);
  display: none;
  z-index: 1000;
}

/* === Schließen-Button === */
#overlayClose {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  background: none;
  border: none;
  color: black;
  cursor: pointer;
  z-index: 1010;
}

/* === Container für die Bilder === */
#overlayContent {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 100vh;
  width: 100%;
  display: flex;             /* Flexbox für Bilder nebeneinander */
  gap: 20px;                 /* Abstand zwischen Bildern */
  overflow-x: auto;          /* horizontales Scrollen */
  overflow-y: hidden;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1005;
}

/* Bilder im Overlay */
#overlayContent img {
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;            /* verhindert, dass Bilder schrumpfen */
}
