/* The furniture every screen puts around its content: the page header — icon,
 * title, subtitle, actions — and the block a view shows when it is still
 * reading, could not read, or read fine and there is nothing.
 *
 * In `shared/` because a data space's own documents need them too. The portal's
 * components import this file; a hand-written page links it from `/shared/`.
 * Colours chain to the published palette in `/shared/theme.css` for the same
 * reason the footer's do: `--primary` and its neighbours are the bundle's
 * tokens, and a page that never runs the bundle would otherwise get an
 * unresolved `var()`, which is an invalid declaration rather than a default.
 */

.gs-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.gs-page-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius, 10px);
  background: var(--primary, var(--theme-primary, #0A2A45));
  color: var(--on-primary, #ffffff);
  font-size: 20px;
  font-weight: 700;
}

.gs-page-heading {
  flex: 1;
  min-width: 0;
}

.gs-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary, var(--theme-primary, #0A2A45));
  line-height: 1.3;
}

.gs-page-subtitle {
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-muted, var(--theme-text-muted, #64748b));
}

.gs-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* What a block says when it has nothing to show: still reading, could not read,
   or read fine and there is nothing. Seven views said it in their own words and
   their own stylesheet; this is the one place it is said now.

   Not scoped to a page — like every component under `sections/components/`, its
   class names carry the `gs-` prefix instead. */
.gs-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  border-radius: var(--radius, 10px);
}

.gs-state-icon {
  font-size: 44px;
  color: var(--text-muted, var(--theme-text-muted, #64748b));
  opacity: 0.55;
}

.gs-state-error .gs-state-icon {
  color: var(--danger, #dc2626);
  opacity: 0.75;
}

.gs-state-msg {
  color: var(--text-muted, var(--theme-text-muted, #64748b));
  font-size: 14px;
  margin: 0;
}

/* Inside an expandable panel, where the surrounding table already carries the
   chrome and 48px of padding reads as a hole. */
.gs-state.is-compact {
  gap: 10px;
  padding: 32px 20px;
  border-radius: 0;
  border: 0;

}
.gs-state.is-compact .gs-state-icon { font-size: 36px; }
.gs-state.is-compact .gs-state-msg { font-size: 13px; }

/* Alone on a page that has no card of its own. */
.gs-state.is-plain {
  gap: 14px;
  padding: 56px 0;
  border: 0;
  background: none;
}

/* The portal gets its surface from MUI's Paper; a hand-written page has no
   Paper, so it asks for the same ground and rule explicitly. */
.gs-state.is-surface {
  background: var(--surface, var(--theme-bg-alt, #ffffff));
  border: 1px solid var(--border, var(--theme-border-light, #e2e8f0));
}
