/* Widget do layout 3D da NAND3. As variaveis abaixo traduzem o tema do blog
   para os nomes que o script e o markup do visualizador usam. */
#n3-vis {
  --surface-1: var(--np-panel);
  --surface-2: var(--np-ground);
  --border: var(--np-hairline);
  --text-primary: var(--np-text);
  --text-secondary: var(--np-text-dim);

  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--np-void);
  border: 1px solid var(--np-hairline);
  border-radius: 4px;
  font-family: var(--np-mono);
}

#n3-vis .n3-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--np-text-dim);
}

#n3-vis button {
  padding: 4px 12px;
  background: var(--np-panel);
  border: 1px solid var(--np-hairline);
  border-radius: 3px;
  color: var(--np-text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

#n3-vis button:hover {
  border-color: var(--np-sodium);
  color: var(--np-sodium);
}

#n3-vis input[type="range"] { flex: 1; accent-color: var(--np-sodium); }
#n3-vis input[type="checkbox"] { accent-color: var(--np-sodium); }
#n3-vis label { display: inline-flex; align-items: center; gap: 4px; }

#n3-out { font-size: 15px; color: var(--np-sodium); margin-left: 8px; }
#n3-path { font-size: 13px; color: var(--np-text-dim); margin: 0 0 10px; }

#n3-wrap {
  position: relative;
  height: 500px;
  border-radius: 4px;
  background: var(--np-ground);
  overflow: hidden;
}

#n3-lbl {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: 12px;
}

#n3-vis .n3-legend { font-size: 12px; margin-top: 10px; }
#n3-vis .n3-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
}
#n3-vis .n3-swatch--dot { border-radius: 50%; }

/* O esquematico e desenhado com currentColor pra seguir o modo de impressao. */
.n3-schematic { width: 100%; height: auto; margin: 1.5rem 0; color: var(--np-text); }
.n3-schematic text { font-family: var(--np-mono); fill: currentColor; }

/* Tabela de dados densa (tabela verdade): digito monoespacado e linha baixa,
   em vez do espacamento de tabela de texto corrido. */
.truth-table { font-family: var(--np-mono); }
.truth-table th,
.truth-table td {
  padding: 0.3rem 0.9rem;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}
