/* Stream B, ticket T7: QR records, Snapshots, Unmatched routes. Variant-scoped rules only.
   The shared report grammar in engvision.css draws the lead, panels and table
   wrapper; this file adds only what these three routes need on top. */

[data-design="engvision"] .ev-rec .ev-lead__headline { text-wrap: balance; }

/* Records tables. Row labels read as body text, not as column heads. */
[data-design="engvision"] .ev-rec-table thead th { padding-top: 0; padding-bottom: 0; height: var(--ev-control-height); }
[data-design="engvision"] .ev-rec-table tbody th,
[data-design="engvision"] .ev-rec-table tbody td { padding-top: var(--ev-space-1); padding-bottom: var(--ev-space-1); }
[data-design="engvision"] .ev-rec-table tbody th {
  min-height: var(--ev-control-height);
  border-bottom: 1px solid var(--ev-rule);
  color: var(--ev-text);
  font-size: var(--ev-type-table);
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}
[data-design="engvision"] .ev-rec-table tbody tr:last-child th { border-bottom: 0; }
[data-design="engvision"] .ev-rec-table .num,
[data-design="engvision"] .ev-rec-nowrap { white-space: nowrap; }
[data-design="engvision"] .ev-rec-text { min-width: 8rem; }
[data-design="engvision"] .ev-rec-table .ev-rec-action-cell { padding-top: 0; padding-bottom: 0; }

/* The row label stays in view while the figures scroll sideways beside it. */
[data-design="engvision"] .ev-rec-table thead th:first-child,
[data-design="engvision"] .ev-rec-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ev-surface);
}
[data-design="engvision"] .ev-rec-table tbody th:first-child:focus-within { z-index: 2; }
/* TI review: the open snapshot's row is marked by a full fill across the
   row and aria-current="true", not a second badge beside "Latest". */
[data-design="engvision"] .ev-rec-table tbody tr.ev-rec-row--selected > * { background: var(--ev-surface-sunk); }

[data-design="engvision"] .ev-rec-sub {
  display: block;
  margin: var(--ev-space-1) 0 0;
  color: var(--ev-muted);
  font-size: var(--ev-type-small);
  font-weight: 500;
}
[data-design="engvision"] .ev-rec-flag { display: block; margin: var(--ev-space-1) 0 0; }
[data-design="engvision"] .ev-rec-muted { color: var(--ev-muted); font-weight: 500; }

/* QR records and Unmatched: one ruled search row above the register, a 46px
   labelled input. iOS zooms the page on input focus below 16px, so the field
   text is 16px even though body copy elsewhere is smaller. */
[data-design="engvision"] .ev-rec-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--ev-space-3) var(--ev-space-4);
  padding: var(--ev-space-4) var(--ev-panel-padding);
  border-bottom: 1px solid var(--ev-rule);
}
[data-design="engvision"] .ev-rec-field {
  min-width: 0;
  flex: 1 1 16rem;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: var(--ev-space-1);
}
[data-design="engvision"] .ev-rec-field__label { color: var(--ev-text-2); font-size: var(--ev-type-small); font-weight: 600; }
[data-design="engvision"] .ev-rec-field__input {
  width: 100%;
  min-width: 0;
  min-height: var(--ev-input-height);
  padding: 0 var(--ev-space-3);
  background: var(--ev-surface);
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius-control);
  color: var(--ev-text);
  font-size: 16px;
}
[data-design="engvision"] .ev-rec-controls__count {
  margin: 0 0 0 auto;
  padding: 0 0 var(--ev-space-3);
  color: var(--ev-muted);
  font-size: var(--ev-type-meta);
  font-variant-numeric: tabular-nums;
}

/* Unmatched's search sits above the cause groups rather than inside a panel,
   so it gets its own bordered row with the same field styling. */
[data-design="engvision"] .ev-rec-search-row {
  padding: var(--ev-space-4) var(--ev-panel-padding);
  margin: 0 0 var(--ev-grid-gap);
  background: var(--ev-surface);
  border: 1px solid var(--ev-rule);
  border-radius: var(--ev-radius-panel);
}
[data-design="engvision"] .ev-rec-search-row .ev-rec-field { max-width: 26rem; }

[data-design="engvision"] .ev-rec-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ev-space-3);
  padding: var(--ev-space-3) var(--ev-panel-padding);
  border-top: 1px solid var(--ev-rule);
}
[data-design="engvision"] .ev-rec-pager__count { margin: 0; color: var(--ev-muted); font-size: var(--ev-type-meta); font-variant-numeric: tabular-nums; }
[data-design="engvision"] .ev-rec-pager__buttons { display: flex; gap: var(--ev-space-2); }
[data-design="engvision"] .ev-rec-button {
  min-height: var(--ev-control-height);
  display: inline-flex;
  align-items: center;
  padding: 0 var(--ev-space-4);
  background: var(--ev-surface);
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius-control);
  color: var(--ev-emphasis);
  font-size: var(--ev-type-body);
  font-weight: 600;
  cursor: pointer;
}
[data-design="engvision"] .ev-rec-button:disabled { border-color: var(--ev-rule); color: var(--ev-muted); cursor: default; }

@media (max-width: 520px) {
  [data-design="engvision"] .ev-rec-controls,
  [data-design="engvision"] .ev-rec-pager { padding-left: var(--ev-panel-padding-compact); padding-right: var(--ev-panel-padding-compact); }
  [data-design="engvision"] .ev-rec-field { flex-basis: 100%; max-width: none; }
  [data-design="engvision"] .ev-rec-controls__count { margin: 0; padding: 0; }
  [data-design="engvision"] .ev-rec-search-row { padding: var(--ev-space-4) var(--ev-panel-padding-compact); }
}
