/* FILTER911 — compact workspace chrome. Load last, after the wide-screen CSS.
 * Presentation-only: hidden nodes remain available to existing repaint handlers.
 * Table columns, filters, pagination, source inspection and detail data are intact.
 */

/* Remove redundant actions, page headings, KPI blocks and table-title/help rows.
 * The detail heading is only the FIRST child: its second .page-actions stays usable.
 */
.workspace-wide [data-export],
.workspace-wide [data-refresh],
.workspace-wide .page-head:not(.original-detail-controls),
.workspace-wide .original-detail-controls > div:first-child:not(.page-actions),
.workspace-wide #kpiWrap,
.workspace-wide #dynKpiWrap,
.workspace-wide #customKpiWrap,
.workspace-wide .original-panel > .panel-head,
.workspace-wide .original-panel > .original-hint {
  display: none !important;
}

/* Keep the approved 54px topbar and all five navigation tabs; reclaim only gaps. */
.workspace-wide .content {
  padding-top: 6px;
}

.workspace-wide .screen-tabs {
  margin-bottom: 6px;
}

/* Idle/loading/cache/error metadata is plain text, not another rectangle.
 * Do not target source-panel links or the BB source-record inspection controls.
 */
.workspace-wide .data-status.compact-status {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  height: auto;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 10.5px;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: normal;
  text-overflow: clip;
}

.workspace-wide .data-status.compact-status > span {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.workspace-wide .data-status.compact-status:empty,
.workspace-wide .data-status.compact-status a,
.workspace-wide .data-status.compact-status button {
  display: none !important;
}

/* Increase the real table viewport, retaining local scrolling on both axes.
 * Existing desktop percentage columns/mobile full-table widths and sticky headers
 * continue to come from main-wide.css and screens-wide.css unchanged.
 */
.workspace-wide .original-panel > .original-scroll {
  max-height: max(240px, calc(100vh - 190px));
  max-height: max(240px, calc(100dvh - 190px));
  overflow: auto;
}

@media (max-width: 720px) {
  /* Let Arabic warnings and ar-SA timestamps wrap without clipping or truncation. */
  .workspace-wide .data-status.compact-status {
    gap: 2px 6px;
  }

  .workspace-wide .data-status.compact-status > span {
    flex-basis: 100%;
  }
}

/* Only displayed when the selected source has no usable records. */
.workspace-wide .source-error-detail {
  max-width: 700px;
  margin: 8px auto;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.workspace-wide .empty [data-retry-source] {
  display: inline-flex;
  margin-top: 8px;
}

/* Raw-value footers removed; keep pagination reachable above the Preview footer. */
.workspace-wide.view-bb .content,
.workspace-wide.view-stockcolumns .content { padding-bottom: 72px; }
.workspace-wide.view-bb #dynBody tr,
.workspace-wide.view-stockcolumns #stockColumnsBody tr { cursor: default; }
