/* Tables fit their available panel width, including the embedded Cloud console. */
#page,.route-page,.panel,details.panel,.table-wrap,.table-scroll { min-width:0; max-width:100%; }
.table-wrap,.table-scroll,.responsive-table-container { container-type:inline-size; width:100%; }
.responsive-table-container table.responsive-table { width:100%; min-width:0; table-layout:fixed; }
.responsive-table th,.responsive-table td { overflow-wrap:anywhere; white-space:normal; min-width:0; }
.responsive-table td>* { max-width:100%; }
.responsive-table .actions { min-width:0; margin:0; flex-wrap:wrap; }
.responsive-table .button,.responsive-table button,.responsive-table .status,.responsive-table .plate { white-space:normal; overflow-wrap:anywhere; max-width:100%; }
.responsive-table button { flex-shrink:1; }
.responsive-table small { display:block; }
.row-actions { min-width:0; }
.row-actions>summary,.record-details>summary { cursor:pointer; color:var(--accent,var(--accent)); font-size:13px; padding:5px 0; }
.row-actions[open]>summary { margin-bottom:6px; }
.row-actions .actions { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; }
.row-actions .button { width:100%; justify-content:flex-start; text-align:left; }
.session-vehicle { display:grid; gap:8px; min-width:0; }
.session-vehicle>div { min-width:0; }
.responsive-table .session-plate { white-space:nowrap; overflow-wrap:normal; font-size:clamp(12px,1.3cqw,15px); }
.session-photos { display:flex; flex-wrap:wrap; gap:8px; }
.session-photos figure { margin:0; }
.session-photos figcaption { color:var(--muted); font-size:11px; }
.session-photos .thumbnail { display:block; }
.record-details dl { margin:6px 0; font-size:12px; }
.record-details dt { color:var(--muted,var(--muted)); }
.record-details dd { margin:0 0 6px; overflow-wrap:anywhere; }
.session-state { display:flex; flex-direction:column; align-items:flex-start; gap:5px; }
.session-debt-help { margin:10px 0; color:var(--muted,var(--muted)); font-size:12px; }
.toolbar,.page-header,.pagination { min-width:0; }
.toolbar button,.toolbar .button { white-space:normal; max-width:100%; }
.topbar { background:var(--panel); }
@container (max-width:1100px) {
  .responsive-table-container table.responsive-wide { display:block; }
  .responsive-wide thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .responsive-wide tbody { display:block; width:100%; }
  .responsive-wide tbody>tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 16px; padding:14px; border-bottom:1px solid var(--line,var(--line)); }
  .responsive-wide tbody>tr>td { display:block; border:0; padding:0; }
  .responsive-wide td[data-label]:not([data-label=""])::before { content:attr(data-label); display:block; font-size:11px; font-weight:600; color:var(--muted,var(--muted)); margin-bottom:4px; }
  .responsive-wide .cell-wide { grid-column:1/-1; }
}
@container (max-width:700px) {
  .responsive-table-container table.responsive-table { display:block; }
  .responsive-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .responsive-table tbody { display:block; width:100%; }
  .responsive-table tbody>tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:12px; border-bottom:1px solid var(--line,var(--line)); }
  .responsive-table tbody>tr>td { display:block; border:0; padding:0; }
  .responsive-table td[data-label]:not([data-label=""])::before { content:attr(data-label); display:block; font-size:11px; font-weight:600; color:var(--muted,var(--muted)); margin-bottom:4px; }
  .responsive-table .cell-wide,.responsive-table td:has(.row-actions),.responsive-table td:has(.session-vehicle) { grid-column:1/-1; }
  .row-actions .actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container (max-width:320px) {
  .responsive-table tbody>tr { grid-template-columns:minmax(0,1fr); }
  .row-actions .actions { grid-template-columns:minmax(0,1fr); }
}
/* All 24 hours remain visible, grouped into labelled rows. */
.traffic-heatmap { overflow:visible; container-type:inline-size; }
.traffic-heatmap .heatmap-row { min-width:0; grid-template-columns:repeat(12,minmax(0,1fr)); gap:5px; margin:12px 0; }
.traffic-heatmap .heatmap-row:first-child { display:none; }
.heatmap-row>b { grid-column:1/-1; text-align:left; }
.heatmap-cell { min-width:0; overflow-wrap:anywhere; }
.heatmap-cell::before { content:attr(data-hour); display:block; font-size:9px; opacity:.8; }
@container (max-width:700px) { .traffic-heatmap .heatmap-row { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@container (max-width:380px) { .traffic-heatmap .heatmap-row { grid-template-columns:repeat(4,minmax(0,1fr)); } }

.responsive-table-container .responsive-table td:has(>.row-actions)[data-label]::before { content:none; }

/* Group actions and editable table cells must also shrink with the column. */
.responsive-table-container #groupRows .actions { min-width:0; max-width:100%; flex-wrap:wrap; }
.responsive-table td input:not([type=checkbox]):not([type=radio]),.responsive-table td select,.responsive-table td textarea { min-width:0; max-width:100%; width:100%; }
