/* concert-d-alpha-cleanup.css · Sessione D-alpha · 28-apr-2026
 *
 * Stili cleanup Blocco 0:
 *   0.1 · Canvas nodi · cursor pointer + hover effect
 *   0.3 · Mode bar header · uniformazione tipografica
 *   0.4 · User dropdown logout
 */

/* ─── 0.1 · CANVAS NODI · CURSOR + HOVER ───────────────────────────── */
[data-nx-canvas-node] {
  cursor: pointer !important;
  transition: transform 140ms ease;
}
[data-nx-canvas-node]:hover circle {
  filter: drop-shadow(0 0 8px var(--nx-cyan, #00d4ff));
  fill-opacity: 1;
  stroke-width: 3;
}
[data-nx-canvas-node]:hover text {
  fill: var(--nx-text-primary, #e8eaf0) !important;
  font-weight: 600;
}

/* ─── 0.3 · MODE BAR HEADER · UNIFORMAZIONE ─────────────────────────── */
/* I 6+1 mode buttons devono avere stile coerente sia in NxShell header
   (SVG icons via nx-shell.js _renderHeader) sia in NxModes header
   (text labels via _headerHtml · ora rimpiazzati dinamicamente con SVG
   da nx-d-alpha-cleanup.js). */
.nx-shell-modes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.nx-shell-mode-btn {
  width: 36px;
  height: 32px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, border 120ms ease, color 120ms ease;
  color: var(--nx-text-muted, #6b7a92);
  /* Garantisce che il text label inline (se presente prima dell'iniezione SVG)
     sia comunque size 0 · poi cleanup.js lo sostituisce con SVG */
  font-size: 0 !important;
}

.nx-shell-mode-btn svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  font-size: initial;
}

.nx-shell-mode-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--nx-text-primary, #e8eaf0);
}

.nx-shell-mode-btn--active {
  background: rgba(0, 212, 255, 0.10) !important;
  border-color: rgba(0, 212, 255, 0.30) !important;
  color: var(--nx-cyan, #00d4ff) !important;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.15);
}

.nx-shell-modes__divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

/* RBAC override · keep .nx-rbac-disabled · ma fix overlay con icon stile B */
.nx-shell-mode-btn.nx-rbac-disabled {
  opacity: 0.35 !important;
}

/* ─── 0.4 · USER DROPDOWN ──────────────────────────────────────────── */
.nx-shell-profile {
  cursor: pointer;
  transition: opacity 140ms ease;
  user-select: none;
}
.nx-shell-profile:hover {
  opacity: 0.85;
}

.nx-user-dropdown {
  border-radius: 14px;
  overflow: hidden;
  padding: 6px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 22, 40, 0.96);
  backdrop-filter: blur(16px);
  animation: nx-dropdown-in 160ms ease-out;
}

@keyframes nx-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nx-user-dropdown__head {
  padding: 12px 14px 10px 14px;
}
.nx-user-dropdown__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--nx-text-primary, #e8eaf0);
  margin-bottom: 2px;
}
.nx-user-dropdown__email {
  font-size: 11px;
  color: var(--nx-text-muted, #6b7a92);
  font-family: var(--nx-font-mono);
  margin-bottom: 8px;
}
.nx-user-dropdown__role {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nx-user-dropdown__sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 0;
}
.nx-user-dropdown__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--nx-text-secondary, #b0c0d8);
  text-align: left;
  transition: background 100ms ease, color 100ms ease;
}
.nx-user-dropdown__item:hover {
  background: rgba(0, 212, 255, 0.06);
  color: var(--nx-text-primary, #e8eaf0);
}
.nx-user-dropdown__item--danger:hover {
  background: rgba(255, 61, 113, 0.08);
  color: var(--nx-danger-soft, #ff3d71);
}
.nx-user-dropdown__icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  opacity: 0.7;
}
.nx-user-dropdown__hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--nx-text-muted, #6b7a92);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── DOCUMENTI · STRIPE COLOR + ROW STYLE ─────────────────────────── */
.nx-stripe-documento {
  border-left: 4px solid var(--nx-d-documento, #C9C49B);
}
:root {
  --nx-d-documento: #C9C49B;
}

.nx-doc-row {
  cursor: pointer;
}
.nx-doc-row:hover {
  background: rgba(0, 212, 255, 0.05);
  transform: translateX(2px);
}

/* ─── L.AI.LA ANSWER · CITAZIONI (RAG + Web) ───────────────────────── */
.nx-laila-answer__disclaimer {
  font-size: 10px;
  color: var(--nx-warning, #FFB800);
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 4px 8px;
  background: rgba(255, 184, 0, 0.06);
  border-left: 2px solid var(--nx-warning, #FFB800);
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.nx-laila-citations {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nx-laila-citation {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  color: var(--nx-text-secondary, #b0c0d8);
  text-decoration: none;
  transition: background 120ms ease;
}
.nx-laila-citation:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.20);
  color: var(--nx-cyan, #00d4ff);
}

.nx-laila-citation__icon {
  font-size: 14px;
  flex-shrink: 0;
}
.nx-laila-citation__title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
