/* ========================
   Allgemeines Layout
   ======================== */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;

  display: flex;
  flex-direction: column;
  min-height: 100vh;     /* statt fix 100vh – erlaubt längere Seiten */
  overflow-y: auto;      /* Seite scrollbar machen */
}

header {
  flex-shrink: 0;
  padding: 1em;
  background: #fff;
  z-index: 20;
  border-bottom: 2px solid black;
}

}

main {
  flex-grow: 1;
  overflow: visible;     /* Inhalte können über Viewport hinausgehen */
}

/* ========================
   Tabellenlayout
   ======================== */
.table-wrapper {
  height: 100%;
  overflow-y: auto;
  padding: 0 1em 1em 1em;
  margin: 0;
  position: relative;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid black;
  margin: 0;
  padding: 0;
}

thead th {
  position: sticky;
  top: 0;
  background-color: #e0e0e0;
  font-weight: bold;
  font-style: italic;
  z-index: 10;
  border-top: 2px solid black;
  box-shadow: inset 0 -2px 0 0 black;
  border-right: 1px solid black;
  box-sizing: border-box;
}

thead th:last-child {
  border-right: none;
}

td, th {
  padding: 5px;
  border-top: 1px solid black;
  border-bottom: 1px solid black;
  border-right: 1px solid black;
}

td:last-child, th:last-child {
  border-right: none;
}

/* Linkfarbe für Download */
a[download] {
  color: blue;
  text-decoration: underline;
}

/* Hinweis bei fehlender Datei */
.no-file {
  color: red;
  font-style: italic;
}

/* Farbkennzeichnung für Risiko-/TOM-Spalten */
.td-gruen {
  background-color: #c6efce;
}

.td-gelb {
  background-color: #fff2cc;
}

.td-rot {
  background-color: #f8cbad;
}

/* ========================
   Formularbereich (Suchmaske)
   ======================== */

/* Container für Suchmaske und ggf. FAQ */
.form-help-container {
  display: flex;
  flex-direction: column;       /* vertikale Anordnung */
  align-items: flex-start;      /* linksbündig */
  margin: 0.5em 2em 0 2em;      /* Abstand oben und seitlich */
  background-color: white;
  z-index: 10;
  max-width: 700px;             /* optionale Maximalbreite */
}

/* Formularstruktur ohne inneres Padding */
form > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

/* Eingabefelder */
input[type="text"] {
  background-color: #f0f0f0;
  padding: 0.4em;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
  width: 100%;
}

/* Rote Schrift für blockierte Zeilen */
.row-blocked {
  color: red;
}

/* ========================
   FAQ-Bereich (unter dem Formular)
   ======================== */
.faq-below-form {
  margin-top: 1.5em;            /* Abstand zur Suchmaske */
  width: 100%;
  background-color: white;
  border-top: none;
  border-radius: 0;
  position: relative;
  z-index: 5;
}

/* Panel-Ausrichtung */
.faq-panel {
  width: 100%;
}

/* Scrollbereich für viele FAQ-Einträge */
.faq-scroll {
  max-height: 60vh;             /* bei langen FAQ wird nur dieser Bereich scrollbar */
  overflow-y: auto;
  margin-top: 0.5em;
  padding-right: 4px;

  scrollbar-width: auto;
  scrollbar-color: #555 #e0e0e0;

  outline: 1px solid #ccc;
  box-shadow: inset 0 0 6px #ccc;
}

/* Scrollbar-Styling (moderne Browser) */
.faq-scroll::-webkit-scrollbar {
  width: 12px;
}

.faq-scroll::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 6px;
}

.faq-scroll::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 6px;
  border: 3px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

.faq-scroll::-webkit-scrollbar-thumb:hover {
  background-color: #333;
}

/* Einzelne FAQ-Elemente als "Karten" */
.faq-scroll details {
  margin-bottom: 1em;
  border: 1px solid #ddd;
  padding: 0.5em;
  border-radius: 4px;
  background: #fafafa;
}

/* Zusammenfassung im FAQ */
.faq-scroll summary {
  cursor: pointer;
}

/* Antworttext im FAQ */
.faq-scroll p {
  margin-bottom: 0;
  line-height: 1.4;
}

/* Kopfzeilenbild */
.header-img {
  max-height: 50vh;   /* maximale Höhe: 50% des Viewports */
  max-width: 100%;    /* maximale Breite: 100% des Containers */
  height: auto;       /* Höhe proportional */
  width: auto;        /* Breite proportional */
  display: block;
  margin-bottom: 1em;
}

/* ========================
   Buttons nebeneinander
   ======================== */
.button-container {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end; /* rechtsbündig */
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.button-container button {
  display: inline-flex !important;
  width: auto !important;
}