/* ==================== RESPONSIVE TABLES & CONTENT ==================== */

/**
 * Fix Bootstrap 3 .table-responsive regression:
 * Bootstrap 3 forces 'white-space: nowrap' on all th/td inside .table-responsive
 * at viewports <= 767px. This breaks regular content and layout tables by preventing
 * natural multiline text wrapping.
 */
@media (max-width: 767px) {
  .table-responsive > .table > thead > tr > th,
  .table-responsive > .table > tbody > tr > th,
  .table-responsive > .table > tfoot > tr > th,
  .table-responsive > .table > thead > tr > td,
  .table-responsive > .table > tbody > tr > td,
  .table-responsive > .table > tfoot > tr > td {
    white-space: normal;
  }

  /* Remove forced outer border box on mobile unless table explicitly uses .table-bordered */
  .table-responsive {
    border: none;
  }

  .table-responsive > .table-bordered {
    border: 1px solid #ddd;
  }
}

/**
 * Fix table cell image collapsing:
 * When .img-responsive (max-width: 100%) is injected into an unconstrained <td>
 * in auto-layout tables, the browser computes min-content width as 0 and squashes
 * the image cell against adjacent text cells. Allowing natural max-width inside
 * table cells preserves the intended image dimensions while keeping table scrollable.
 */
.table td img,
.table th img,
.panel-body table td img,
.inhalt table td img,
.table-responsive table td img {
  max-width: none;
  height: auto;
}
