/* Tables — scroll when wide/tall; truncate long cell text with hover title */

.table-wrap {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table.data,
table.timing-results-sheet,
table.timing-data {
  width: max-content;
  min-width: 100%;
}

table.col-resize-table {
  table-layout: fixed;
}

table.col-resize-table th.col-resize-th {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.col-resize-grip {
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}

.col-resize-grip::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  right: 2px;
  width: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.15s;
}

.col-resize-grip:hover::after,
body.col-resize-active .col-resize-grip::after {
  background: rgba(0, 210, 190, 0.75);
}

body.col-resize-active {
  cursor: col-resize;
  user-select: none;
}

table.col-resize-table th,
table.col-resize-table td {
  max-width: none;
}

table.data th,
table.data td,
table.timing-results-sheet th,
table.timing-results-sheet td,
table.timing-data th,
table.timing-data td {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Fuel coloured rows — keep gradient, still ellipsize long values */
#fuel-table tbody tr td {
  max-width: 220px;
}

#fuel-table .fuel-status {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Allow deliberate multi-line cells */
table.data td.wrap,
table.data th.wrap,
table.timing-results-sheet td.wrap {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Live timing message text can wrap inside scroll area */
.lt-msg-text {
  white-space: normal;
  word-break: break-word;
  max-width: none;
}

table.timing-results-sheet .lt-msg-text {
  white-space: normal;
  max-width: 480px;
}
