/* concert-spaziali.css · Sessione C-alpha · 27-apr-2026
 *
 * Stili companion append-only per:
 *   - .nx-card-spaziale (Mappa, Twin, Canvas-force) · modalità immersiva
 *   - Toolbar fluttuanti glass · ribbon laterali 56px · slot input centrale
 *   - Mini-event-card (eventi sistemici Pulse senza entità · marker Mappa/Twin)
 *
 * NON modifica concert.css né concert-modes.css né concert-cards-b6.css.
 */

/* ─── CARD-SPAZIALE FOUNDATION ──────────────────────────────────────── */
.nx-card-spaziale {
  position: fixed;
  inset: 0;
  /* z-index alto · sopra #nx-shell-root (z 30 fissato dalla wrap B.5.3) */
  z-index: 50;
  background: var(--nx-bg-deep, #050b1a);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Canvas hosts · viewport sotto header esteso 64px */
.nx-mappa-canvas-host,
.nx-twin-canvas-host {
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.nx-mappa-canvas-host canvas,
.nx-twin-canvas-host canvas {
  display: block;
  cursor: grab;
}
.nx-mappa-canvas-host canvas:active,
.nx-twin-canvas-host canvas:active {
  cursor: grabbing;
}

/* ─── TOOLBAR FLUTTUANTE (Mappa + Twin) ─────────────────────────────── */
.nx-mappa-toolbar,
.nx-twin-toolbar,
.nx-canvas-toolbar {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  z-index: 110;
  border-radius: 32px;
  max-width: 880px;
  width: calc(100% - 200px);
}

.nx-mappa-toolbar__zoom,
.nx-canvas-toolbar__zoom {
  font-size: 11px;
  color: var(--nx-cyan, #00d4ff);
  font-family: var(--nx-font-mono);
  background: rgba(0, 212, 255, 0.10);
  padding: 4px 10px;
  border-radius: 12px;
  flex-shrink: 0;
  min-width: 50px;
  text-align: center;
}

.nx-mappa-toolbar__search,
.nx-canvas-toolbar__search {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
}

.nx-mappa-toolbar__layers,
.nx-twin-toolbar__filters {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.nx-mappa-toolbar__home {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
}

.nx-twin-toolbar__time {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nx-twin-toolbar__slider {
  flex: 1;
  appearance: none;
  height: 4px;
  background: rgba(0, 212, 255, 0.18);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.nx-twin-toolbar__slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--nx-cyan, #00d4ff);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ─── RIBBON LATERALE 56px (collassato) ─────────────────────────────── */
.nx-mappa-ribbon,
.nx-twin-ribbon,
.nx-canvas-ribbon {
  position: absolute;
  top: 100px;
  bottom: 100px;
  width: 56px;
  background: rgba(8, 14, 28, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 6px;
}

.nx-mappa-ribbon,
.nx-twin-ribbon,
.nx-canvas-ribbon--right {
  right: 18px;
}

.nx-canvas-ribbon--left {
  left: 18px;
}

.nx-mappa-ribbon__item,
.nx-twin-ribbon__item,
.nx-canvas-ribbon__item {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--nx-text-secondary, #b0c0d8);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border 120ms ease, color 120ms ease;
}

.nx-mappa-ribbon__item:hover,
.nx-twin-ribbon__item:hover,
.nx-canvas-ribbon__item:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.20);
  color: var(--nx-cyan, #00d4ff);
}

.nx-canvas-ribbon__item--active {
  background: rgba(0, 212, 255, 0.14);
  border-color: var(--nx-cyan, #00d4ff);
  color: var(--nx-cyan, #00d4ff);
}

/* ─── SLOT INPUT IN BASSO CENTRO ────────────────────────────────────── */
.nx-mappa-slot-input,
.nx-twin-slot-input,
.nx-canvas-slot-input {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  border-radius: 18px;
  padding: 12px 16px;
  width: 720px;
  max-width: calc(100% - 200px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nx-mappa-slot-input input,
.nx-twin-slot-input input,
.nx-canvas-slot-input input {
  border-radius: 12px;
  font-size: 13px;
  padding: 8px 14px;
}

.nx-mappa-slot-input__chips,
.nx-twin-slot-input__chips,
.nx-canvas-slot-input__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nx-mappa-slot-input__chips .nx-chip-suggestion,
.nx-twin-slot-input__chips .nx-chip-suggestion,
.nx-canvas-slot-input__chips .nx-chip-suggestion {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.18);
  color: var(--nx-cyan, #00d4ff);
  cursor: pointer;
  transition: background 120ms ease;
}
.nx-mappa-slot-input__chips .nx-chip-suggestion:hover,
.nx-twin-slot-input__chips .nx-chip-suggestion:hover,
.nx-canvas-slot-input__chips .nx-chip-suggestion:hover {
  background: rgba(0, 212, 255, 0.14);
}

/* ─── CANVAS FORCE-DIRECTED VIEWPORT ────────────────────────────────── */
.nx-canvas-force {
  display: flex;
  flex-direction: column;
}

.nx-canvas-viewport {
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

#nx-canvas-svg {
  width: 100%;
  height: 100%;
  cursor: grab;
}
#nx-canvas-svg:active {
  cursor: grabbing;
}

.nx-canvas-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.nx-canvas-empty * { pointer-events: auto; }

.nxc-node circle {
  transition: stroke-width 120ms ease, fill-opacity 120ms ease;
}
.nxc-node:hover circle {
  stroke-width: 3.5;
  fill-opacity: 1;
}

/* ─── MINI EVENT CARD (eventi sistemici Pulse + marker Mappa/Twin) ─── */
.nx-mini-event-card {
  background: var(--nx-bg-elev-1, rgba(15, 22, 40, 0.92));
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nx-mini-event-card__body {
  padding: 16px 20px;
  flex: 1;
}

/* ─── CARD-EVENTO header overlay (alleggerito) ──────────────────────── */
[data-nx-card-spaziale] .nx-shell-header {
  position: relative;
  z-index: 30;
  background: rgba(5, 11, 26, 0.85);
  backdrop-filter: blur(10px);
}

/* ─── PERFORMANCE · disabilita animazioni heavy in mode immersiva ───── */
[data-nx-card-spaziale] .nx-orb {
  animation-duration: 4s;
}
