/* ════════════════════════════════════════════════════════════════════════
   spatial.css — multi-scale zoom hierarchy (overview cards, camera, HUD)
   ────────────────────────────────────────────────────────────────────────
   Pairs with workspace.css. The camera transform on .ws-scene and the card
   transforms are written inline per animation frame by spatial-navigator.js
   (spring physics), so this file deliberately puts NO CSS transition on
   `transform` — only on opacity/colour, which the springs don't drive.
   Token-themed; extra Jarvis HUD glow gated at the bottom.
   ════════════════════════════════════════════════════════════════════════ */

/* The scene is the zoomable plane that holds the panels; .ws-canvas is the
   static viewport that clips it. Panels are absolutely positioned in here. */
.ws-scene {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform, opacity;
}

/* L3/L4: the focused panel pops; its neighbours recede but stay visible. */
.ws-scene.ws-focus-mode .ws-panel {
  opacity: 0.32;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.ws-scene.ws-focus-mode .ws-panel.is-spatial-focus {
  opacity: 1;
  pointer-events: auto;
}
.ws-panel.is-spatial-focus {
  box-shadow: 0 0 0 1px var(--gold), 0 12px 40px rgba(0,0,0,0.34);
}

/* ── Overview (L0 stack / L1 constellation) ──────────────────────────────────── */

.spatial-overview {
  position: absolute;
  inset: 44px 0 0 0;            /* below the toolbar */
  z-index: 25;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 35%, var(--gold-soft), transparent 70%),
    var(--bg);
}
.spatial-overview[hidden] { display: none; }

.spatial-cards {
  position: absolute;
  inset: 0;
}

.mode-card {
  position: absolute;
  top: 0; left: 0;
  width: 240px;
  height: 158px;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  will-change: transform;
  box-shadow: 0 8px 26px rgba(0,0,0,0.22);
  transition: border-color var(--speed), box-shadow var(--speed);
}
.mode-card:hover { border-color: var(--gold); box-shadow: 0 12px 34px rgba(0,0,0,0.30); }
.mode-card.is-active { border-color: var(--gold); }

.mode-card-preview {
  position: relative;
  flex: 1;
  background:
    linear-gradient(var(--border-light) 1px, transparent 1px) 0 0 / 100% 16px,
    var(--bg-warm);
  overflow: hidden;
}
.mini-panel {
  position: absolute;
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 3px;
  opacity: 0.85;
}
.mini-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-card-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
.mode-card-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mode-card-count {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.mode-card-del {
  font-size: 12px;
  color: var(--text-dim);
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.mode-card-del:hover { background: var(--red-soft); color: var(--red); }

.mode-card-new {
  align-items: center;
  justify-content: center;
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.mode-card-new .mode-card-plus {
  font-size: 34px;
  color: var(--text-dim);
  line-height: 1;
}
.mode-card-new:hover .mode-card-plus { color: var(--gold); }
.mode-card-new .mode-card-meta { border: none; }

/* ════════════════════════════════════════════════════════════════════════
   Jarvis accents
   ════════════════════════════════════════════════════════════════════════ */
:root[data-theme="jarvis"] .mode-card:hover,
:root[data-theme="jarvis"] .mode-card.is-active {
  box-shadow: 0 0 0 1px rgba(63,208,255,0.4), 0 12px 34px rgba(63,208,255,0.18);
}
:root[data-theme="jarvis"] .ws-panel.is-spatial-focus {
  box-shadow: 0 0 0 1px rgba(63,208,255,0.5), 0 12px 44px rgba(63,208,255,0.22);
}
