/* ========================================== */
/* Grundlayout für Tab Container              */
/* ========================================== */
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
*,
*::before,
*::after { box-sizing: border-box; }

.tab_container {
  margin: 5% 3%;
}

@media screen and (min-width: 240px) and (max-width: 319px) {
  .tab_container {
    margin: 3%;
    font-size: 0.4em; /* etwas kleiner für Smartphones */
  }
}

@media screen and (min-width: 320px) and (max-width: 479px) {
  .tab_container {
    margin: 3%;
    font-size: 0.6em; /* etwas kleiner für Smartphones */
  }
}

@media screen and (min-width: 480px) and (max-width: 767px) {
  .tab_container {
    margin: 3%;
    font-size: 0.7em;
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  .tab_container {
    margin: 3%;
    font-size: 0.8em;
  }
}

@media screen and (min-width: 992px) and (max-width: 1119px) {
  .tab_container {
    margin: 3%;
    font-size: 0.9em;
  }
}

@media screen and (min-width: 1200px) {
  .tab_container {
    margin: 2em;
    font-size: 1em;
  }
}

/* ========================================== */
/* Responsive Table                           */
/* ========================================== */
.responsive-table {
  width: 100%;
  margin-bottom: 1em;
  border-spacing: 0;
  border-collapse: collapse;
  background-color: white;
}

@media screen and (max-width: 319px) {
  .responsive-table {
    font-size: 0.6em; /* kleinere Schrift auf kleinen Smartphones */
  }
}

@media screen and (min-width: 320px) and (max-width: 479px) {
  .responsive-table {
    font-size: 0.8em; /* kleinere Schrift auf kleinen Smartphones */
  }
}

@media screen and (min-width: 480px) and (max-width: 767px) {
  .responsive-table {
    font-size: 0.9em;
  }
}

@media screen and (min-width: 768px) {
  .responsive-table {
    font-size: 1em;
  }
}

/* ========================================== */
/* Tabellenkopf                               */
/* ========================================== */
.responsive-table thead {
  background-color: rgba(29, 150, 178, 1);
  color: white;
}

.responsive-table thead th {
  border: 1px solid rgba(29, 150, 178, 1);
  padding: 0.6em;
  text-align: center;
  font-weight: 500;
}

.responsive-table thead th:first-of-type {
  text-align: left;
}

/* ========================================== */
/* Tabellenkörper                             */
/* ========================================== */
.responsive-table tbody tr:nth-child(odd) {
  background-color: #ffffff; /* weiß */
}

.responsive-table tbody tr:nth-child(even) {
  background-color: #d2d1d1; /* leichtes Grau */
}

.responsive-table tbody th,
.responsive-table tbody td {
  border: 1px solid rgba(29, 150, 178, 0.2);
  padding: 0.4em;
  text-align: left;
  vertical-align: middle;
}
@media (max-width: 767px) {
  /* Blockdarstellung der Zeilen für mobile Ansicht */
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tbody tr {
    display: block;
    margin-bottom: 0.8em;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }

  /* Jede Zelle ist eine Flexbox: Label links, Wert rechts */
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 0.45em 0.6em;
    border: none;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    white-space: nowrap;        /* bleibt in einer Zeile */
    overflow: hidden;
    text-overflow: ellipsis;    /* falls zu lang, „…“ */
  }

  /* Labels (links in der Zelle) */
  .responsive-table td[data-title]:before {
    content: attr(data-title);
    display: inline-block;
    flex: 0 0 auto;
    font-size: 0.85em;          /* Lesbar auf iPhone */
    color: rgba(94, 93, 82, 0.75);
    font-weight: 500;
    margin-right: 0.5em;
    white-space: nowrap;        /* kein Umbruch */
  }

  /* Werte (rechts) */
  .responsive-table td span {
    flex: 1 1 auto;
    text-align: right;
    font-size: 0.9em;
    white-space: nowrap;
  }

  /* Abwechselnde Zeilenfarben */
  .responsive-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
  }

  .responsive-table tbody tr:nth-child(even) {
    background-color: #f7f7f7;
  }
}
/* ========================================== */
/* Tabellenunterschrift und Fußzeile          */
/* ========================================== */
.responsive-table caption {
  margin-bottom: 1em;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  color: rgba(29, 150, 178, 1);
}

@media (min-width: 320px) {
  .responsive-table caption {
    font-size: 1.3em;
  }
}

.responsive-table tfoot {
  font-size: 0.85em;
  font-style: italic;
  text-align: right;
  color: #555;
}

@media (min-width: 992px) {
  .responsive-table tfoot {
    font-size: 0.9em;
  }
}
