/* IFTA records stay within the page; every mobile value retains its label. */
.ifta-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
.ifta-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  white-space: normal;
}
.ifta-table th,
.ifta-table td {
  min-width: 0;
  padding: 12px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.ifta-table td .button,
.ifta-table td .table-button {
  max-width: 100%;
  white-space: normal;
}
.ifta-table td[data-label="Actions"] > * + * { margin-top: 4px; }
@media (max-width: 1023px) {
  .ifta-table { display: block; }
  .ifta-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .ifta-table tbody { display: block; width: 100%; }
  .ifta-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    padding: 16px;
    border-top: 1px solid var(--ui-line, #3b4861);
  }
  .ifta-table tbody tr:first-child { border-top: 0; }
  .ifta-table td {
    display: block;
    padding: 0;
    border: 0;
    font-size: 14px;
    line-height: 1.5;
  }
  .ifta-table td:first-child,
  .ifta-table td[data-label="Actions"] { grid-column: 1 / -1; }
  .ifta-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--ui-muted, #b0bbcd);
    font-size: 12px;
    font-weight: 600;
  }
  .ifta-table td[data-label="Actions"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
  }
  .ifta-table td[data-label="Actions"]::before { flex-basis: 100%; }
  .ifta-table td[data-label="Actions"] > * + * { margin-top: 0; }
}
