/* GB Editor shell — design tokens + shared header styling. Loaded by
   every page; per-page CSS adds page-specific rules on top via the
   --token vars below. */

:root {
  --bg: #1a1a1a;
  --fg: #e0e0e0;
  --accent: #86c06c;
  --panel: #2a2a2a;
  --border: #444;

  /* Collision class swatches. Walkable is the default and isn't painted
     on the canvas, so its swatch is a neutral gray to read as "no
     overlay". These live in shell.css (not per-page) so the Portals
     page can reuse the collision palette in B2b without re-defining. */
  --collision-walkable:       rgba(200, 200, 200, 0.25);
  --collision-unwalkable:     rgba(255,  30,  30, 0.70);
  --collision-ladder:         rgba( 60, 140, 255, 0.65);
  --collision-ladder-top:     rgba(120, 200, 255, 0.65);
  --collision-cloud:          rgba(255, 215,  60, 0.55);
  --collision-slope-up-left:  rgba(180, 100, 220, 0.65);
  --collision-slope-up-right: rgba(100, 200, 120, 0.65);
  --portal-fill:              rgba(220,  60, 220, 0.80);

  --shell-header-h: 44px;
}

* { box-sizing: border-box; }

/* Override the UA `[hidden] { display: none }` rule's low priority so
   any author CSS that sets `display:` doesn't accidentally win over
   the `hidden` attribute. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Shared header (.gb-shell-*) ====================================
   Injected by header.js into <div id="gb-shell-header-mount"></div>
   on every page. Page-level CSS should not target .gb-shell-* — the
   shell owns its layout. */

.gb-shell-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  height: var(--shell-header-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.gb-shell-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.gb-shell-title:hover { text-decoration: underline; }

.gb-shell-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.gb-shell-tab {
  color: var(--fg);
  text-decoration: none;
  padding: 6px 14px;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  border-radius: 3px 3px 0 0;
}

.gb-shell-tab:hover { background: #333; }

.gb-shell-tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  cursor: default;
}

.gb-shell-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.gb-shell-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #f0c060;     /* amber — matches the "dirty" semantics used elsewhere */
}

.gb-shell-pending-dot { font-size: 8px; line-height: 1; }
.gb-shell-pending-count { font-weight: 600; }

.gb-shell-apply,
.gb-shell-auth {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 5px 14px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
}

.gb-shell-apply { color: var(--accent); border-color: var(--accent); }
.gb-shell-apply:hover { background: rgba(134, 192, 108, 0.12); }
.gb-shell-apply:disabled { opacity: 0.5; cursor: wait; }

.gb-shell-auth:hover { background: #333; }
