/* Minimal chrome for the Workbench2 feasibility slice. This is a product
   shell, not a Leptos demo -- deliberately plain rather than themed. */

:root {
  color-scheme: light dark;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
}

.shell {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.experimental-banner {
  background: #7a2e0e;
  color: #fff;
  text-align: center;
  font-weight: 600;
  padding: 0.5rem 1rem;
  letter-spacing: 0.02em;
}

/* Identity sign-in bar -- additive and independent of the rest of the shell (see app.rs's own
   "Identity OAuth (PKCE) sign-in status" comment); not styled to match any panel below. */
.auth-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
}

.auth-status {
  color: #444;
  font-size: 0.9rem;
}

.auth-sign-in,
.auth-sign-out {
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
}

h1 {
  font-size: 1.4rem;
}

.lede {
  color: #555;
  max-width: 60ch;
}

.open-file {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1.5rem 0;
}

.hint {
  color: #666;
  font-style: italic;
}

.status-ok {
  color: #1a7a3a;
}

.status-err {
  color: #b3261e;
  white-space: pre-wrap;
}

.summary .file-name {
  font-weight: 600;
}

.grouping {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

table {
  border-collapse: collapse;
  font-size: 0.9rem;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

th,
td {
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  text-align: left;
}

.grouping-mode-picker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.grouping-mode-picker button[aria-pressed="true"] {
  font-weight: 600;
  outline: 2px solid #555;
}

.attribute-row,
.stage-property-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0;
}

.attribute-row label {
  min-width: 8rem;
}

.property-inspector,
.grouping-modes {
  margin: 1.5rem 0;
}

/* Part 3: left-side navigation tree + right-side Inspector panel. Wraps
   -- rather than replaces -- the flat "Group elements by" table above it
   (`.grouping-modes`) and the pre-existing `.property-inspector` section
   (relocated into `.inspector-pane` unchanged). `flex-wrap` so a narrow
   viewport stacks the two panes instead of overflowing `.shell`'s
   `max-width` horizontally. */
.workbench-layout {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.nav-tree-pane {
  flex: 1 1 20rem;
  min-width: 16rem;
  max-height: 32rem;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 0.75rem;
}

.inspector-pane {
  flex: 2 1 28rem;
  min-width: 20rem;
}

.inspector-pane .property-inspector {
  margin: 0;
}

.tree-mode-picker {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.nav-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.nav-tree li {
  margin: 0.1rem 0;
}

.tree-toggle,
.tree-leaf {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  text-align: left;
  font: inherit;
  width: 100%;
}

.tree-toggle {
  font-weight: 600;
}

.tree-toggle:hover,
.tree-leaf:hover {
  background: rgba(127, 127, 127, 0.15);
}

/* Multi-element bulk-edit selection: a ctrl/cmd-clicked leaf (see
   `on_toggle_tree_selection` in src/app.rs) gets a visibly distinct
   background/outline from a plain single-selected leaf, which has no
   special styling of its own -- there is nothing to compare it against on
   the tree itself, only in the Inspector pane. */
.tree-leaf.selected {
  background: rgba(46, 125, 50, 0.18);
  outline: 1px solid rgba(46, 125, 50, 0.6);
  outline-offset: -1px;
}

.bulk-edit-panel {
  margin: 0 0 1.5rem;
  padding: 0.75rem;
  border: 1px solid #ccc;
}

.bulk-edit-errors {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

.global-id {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: #666;
}

.quantity-sets,
.material-summary {
  margin: 0.75rem 0;
}

.material-layers {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
}

.viewer {
  margin-top: 2rem;
}

canvas {
  display: block;
  max-width: 100%;
  border: 1px solid #ccc;
  background: #111;
}

canvas[hidden] {
  display: none;
}

.derived-zone-experiment {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #ccc;
}

.derived-zone-controls,
.l2d-controls,
.l2d-region-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.l2d-config {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 32rem;
  margin: 0.75rem 0;
}

.l2d-config input {
  padding: 0.3rem 0.5rem;
}

.derived-zone-evidence {
  margin: 0.75rem 0;
}

.derived-zone-panel,
.l2d-panel {
  margin: 1rem 0 2rem;
}
