/* Demonstrações de transições, áudio e ritmo, e corte (js/demos2.js), por cima
   do kit do painel (editor.css). Tudo aqui começa com "nxe-". */

.nxe-trans [hidden], .nxe-ritmo [hidden], .nxe-corte [hidden] { display: none !important; }
.nxe-trans .nx-col, .nxe-ritmo .nx-col, .nxe-corte .nx-col { overflow: visible; }
.nxe-auto { color: var(--nx-tinta-suave); font-family: var(--nx-mono); font-size: 11px; }

/* ------------------------------------------------------------ transições */
/* À esquerda o palco 9:16 com as cenas em vídeo; à direita o painel do editor. */
.nxe-trans-corpo { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; align-items: start; padding: 20px var(--nx-lado) 24px; }
.nxe-trans-palco { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nxe-trans-palco .nx-dica { margin: 0; }
.nxe-palco { --nx-visor-largura: 100%; width: 100%; aspect-ratio: 9 / 16; background: #000; align-self: center; }
.nxe-cam { position: absolute; inset: 0; will-change: transform, opacity, filter; backface-visibility: hidden; }
.nxe-cam > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.nxe-clarao { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.nxe-etiqueta {
  position: absolute; z-index: 4; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62); border: 1px solid var(--nx-borda);
  color: var(--nx-tinta); font: 700 12px/1.2 var(--nx-fonte); letter-spacing: 0.03em;
}
.nxe-agora { margin: 0; display: grid; gap: 2px; min-height: 44px; text-align: center; }
.nxe-agora > span { font-size: 12px; color: var(--nx-tinta-suave); }
.nxe-agora > b { font-size: 20px; font-weight: 800; color: var(--nx-verde); text-shadow: 0 0 12px rgba(57, 255, 106, 0.35); }
.nxe-tocar { align-self: center; }
.nxe-trans .nx-toggle > button { min-height: 32px; }
.nxe-trans .nx-rotulo-acao .nx-mini-btn { text-transform: none; letter-spacing: 0; }
.nxe-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.nxe-campo-linha { margin: 0; white-space: nowrap; }
.nxe-cenas-n { flex: 0 1 200px; }

/* a fileira de emendas: cena → cena e a transição que o rodízio pôs ali */
.nxe-fileira { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; }
.nxe-emenda {
  appearance: none; margin: 0; min-width: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: 38px; padding: 6px 8px;
  border: 1px solid var(--nx-borda); border-radius: 9px;
  background: rgba(0, 0, 0, 0.3); color: var(--nx-tinta-suave);
  font: 600 12px/1.2 var(--nx-fonte); text-align: left; cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}
.nxe-emenda:hover { border-color: var(--nx-borda-forte); color: var(--nx-tinta); }
.nxe-emenda[aria-pressed="true"] { border-color: var(--nx-verde); background: var(--nx-verde-fundo); color: var(--nx-verde); }
.nxe-emenda-cenas { display: inline-flex; align-items: center; gap: 3px; }
.nxe-emenda-cenas > b {
  display: grid; place-items: center; width: 20px; height: 24px; border-radius: 5px;
  background: linear-gradient(160deg, #2a3340, #171d24); border: 1px solid rgba(233, 243, 235, 0.18);
  color: var(--nx-tinta); font: 800 11px/1 var(--nx-fonte);
}
.nxe-emenda-cenas > i { width: 8px; height: 2px; background: currentColor; opacity: 0.6; }
.nxe-emenda-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nxe-emenda-ordem {
  display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--nx-verde); color: #050705; font: 800 11px/1 var(--nx-mono);
}

/* a janela "Transições nas suas cenas" (Ver nas minhas cenas) */
.nxe-dlg { margin: 16px 0 0; border: 1px solid var(--nx-borda-forte); border-radius: 12px; background: #0a120c; overflow: hidden; }
.nxe-dlg-cabeca { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--nx-borda); }
.nxe-dlg-titulo { font-size: 15px; font-weight: 800; color: var(--nx-verde); }
.nxe-dlg-de { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--nx-borda); font-size: 11px; color: var(--nx-tinta-suave); white-space: nowrap; }
.nxe-dlg-nota { margin: 10px 14px 0; }
.nxe-dlg > [data-cartoes] { padding: 12px 14px 14px; }
.nxe-dlg .nx-grade-grupo { margin: 12px 0 8px; }
.nxe-dlg .nx-grade-grupo:first-child { margin-top: 0; }
.nxe-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.nxe-cartao {
  appearance: none; margin: 0; position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 5px 5px 7px;
  border: 1px solid var(--nx-borda); border-radius: 10px;
  background: rgba(0, 0, 0, 0.3); color: var(--nx-tinta-suave);
  font: 500 11.5px/1.2 var(--nx-fonte); text-align: center; cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}
.nxe-cartao:hover, .nxe-cartao:focus-visible { border-color: var(--nx-borda-forte); color: var(--nx-tinta); }
.nxe-cartao[aria-pressed="true"] { border-color: var(--nx-verde); background: var(--nx-verde-fundo); color: var(--nx-verde); box-shadow: inset 0 0 0 1px rgba(57, 255, 106, 0.18); }
.nxe-cartao-quadro {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px;
  background: linear-gradient(180deg, #131f17, #070c08); box-shadow: inset 0 0 0 1px rgba(57, 255, 106, 0.1);
}
.nxe-cartao-play {
  position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  border: 1px solid var(--nx-verde-dim); background: rgba(0, 0, 0, 0.35); z-index: 5;
}
.nxe-cartao-play::after { content: ""; position: absolute; left: 11px; top: 8px; border-left: 10px solid var(--nx-verde); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.nxe-cartao-quadro.nxe-tocando .nxe-cartao-play { display: none; }
.nxe-cartao-nome { display: block; min-height: 2.4em; overflow-wrap: anywhere; }
.nxe-cartao > .nx-trans-ordem { top: 9px; right: 9px; transform: none; z-index: 6; }

@container nx-janela (max-width: 820px) {
  .nxe-trans-corpo { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .nxe-palco { width: min(100%, 250px); }
  .nxe-cenas-n { flex-basis: 230px; }
}
@container nx-janela (max-width: 560px) {
  .nxe-trans-corpo { padding: 14px; }
}
@container nx-janela (max-width: 470px) {
  .nxe-palco { width: min(100%, 216px); }
  .nxe-trans .nx-trans { padding-left: 8px; padding-right: 30px; }
  .nxe-cartoes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .nxe-dlg-de { display: none; }
}

/* --------------------------------------------------------- áudio e ritmo */
.nxe-ritmo .nx-janela-corpo { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.nxe-ritmo .nx-col > .nx-cartao-audio:last-of-type { margin-bottom: 0; }
.nxe-ajuste-valor { display: grid; place-items: center; }
.nxe-ritmo .nx-cartao-audio > .nx-toggle > button { min-height: 32px; }
.nxe-ritmo .nx-fichas-cena { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }

.nxe-fila {
  margin: 0 0 10px; padding: 12px;
  border: 1px solid var(--nx-borda-forte); border-radius: 12px;
  background: linear-gradient(180deg, rgba(57, 255, 106, 0.1), rgba(0, 0, 0, 0.4));
}
.nxe-fila-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.nxe-fila-titulo { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nx-verde); }
.nxe-fila-selo { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--nx-borda); font-size: 11px; color: var(--nx-tinta-suave); white-space: nowrap; }
.nxe-fila-pasta { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 0 6px; }
.nxe-fila-nome { font-size: 12px; color: var(--nx-tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nxe-fila-cenas { display: flex; flex-wrap: wrap; gap: 4px; }
.nxe-fila-cena {
  display: grid; justify-items: center; gap: 1px; width: 42px; padding: 3px 0 4px;
  border: 1px solid var(--nx-borda); border-radius: 7px; background: rgba(0, 0, 0, 0.35);
  transition: border-color 150ms ease, background-color 150ms ease;
}
.nxe-fila-cena > b { font-size: 11px; font-weight: 800; color: var(--nx-tinta); }
.nxe-fila-cena > i { font-style: normal; font-size: 10px; line-height: 1.15; color: var(--nx-tinta-suave); font-variant-numeric: tabular-nums; }
.nxe-fila-cena.nxe-foco { border-color: var(--nx-verde); background: var(--nx-verde-fundo); }
.nxe-fila-cena.nxe-foco > i { color: var(--nx-verde); }
.nxe-fila-cena.nxe-segue { border-style: dashed; }
.nxe-fila .nx-dica { margin-top: 8px; }

.nxe-bib { display: flex; flex-direction: column; gap: 6px; }
.nxe-bib-conta { font-size: 12px; color: var(--nx-tinta-suave); font-variant-numeric: tabular-nums; }
.nxe-bib-lista { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--nx-borda); border-radius: 10px; background: rgba(0, 0, 0, 0.3); }
.nxe-bib-item { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 4px 8px; border-radius: 7px; font-size: 13px; color: var(--nx-tinta); cursor: default; }
.nxe-bib-item:has(input) { cursor: pointer; }
.nxe-bib-item:has(input):hover { background: rgba(57, 255, 106, 0.06); }
.nxe-bib-item input { accent-color: var(--nx-verde); width: 16px; height: 16px; margin: 0; flex: none; cursor: pointer; }
.nxe-bib-nome { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nxe-bib-vez { display: grid; place-items: center; flex: none; min-width: 18px; height: 18px; border-radius: 999px; background: var(--nx-verde); color: #050705; font: 800 11px/1 var(--nx-mono); }
.nxe-exemplo { margin-top: 10px; }

@container nx-janela (max-width: 760px) {
  .nxe-ritmo .nx-janela-corpo { grid-template-columns: minmax(0, 1fr); }
}
@container nx-janela (max-width: 470px) {
  .nxe-fila-pasta { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 10px; }
  .nxe-ritmo .nx-cena-editor-campos { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .nxe-ritmo .nx-cartao-audio { padding: 12px 10px 14px; }
}

/* ----------------------------------------------------------------- corte */
.nxe-corte-corpo { padding: 18px var(--nx-lado); }
.nxe-regra { min-height: 2.9em; margin-top: 10px; }
.nxe-tl-bloco { margin: 14px 0 12px; padding: 12px; border: 1px solid var(--nx-borda); border-radius: 12px; background: rgba(0, 0, 0, 0.35); }
.nxe-tl-cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; font-size: 12px; color: var(--nx-tinta-suave); }
.nxe-tl-cabeca > b { font-size: 17px; font-weight: 800; color: var(--nx-tinta); font-variant-numeric: tabular-nums; }
.nxe-tl-cabeca > b.nxe-verde { color: var(--nx-verde); text-shadow: 0 0 10px rgba(57, 255, 106, 0.35); }
.nxe-tl {
  position: relative; height: 46px; overflow: hidden;
  border: 1px solid var(--nx-borda); border-radius: 8px;
  background: repeating-linear-gradient(90deg, rgba(57, 255, 106, 0.05) 0 1px, transparent 1px 12.8205%), rgba(10, 18, 11, 0.85);
}
.nxe-pal {
  position: absolute; top: 9px; bottom: 9px; border-radius: 3px;
  background: linear-gradient(180deg, #5dff8a, var(--nx-verde-dim));
  box-shadow: inset -1px 0 0 rgba(4, 20, 10, 0.75);
  transition: left 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nxe-fora {
  position: absolute; top: 0; bottom: 0; z-index: 2;
  display: grid; place-items: center; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(255, 77, 77, 0.34) 0 5px, rgba(255, 77, 77, 0.14) 5px 10px);
  border-left: 1px dashed rgba(255, 130, 130, 0.9); border-right: 1px dashed rgba(255, 130, 130, 0.9);
  animation: nxe-surge 260ms ease-out;
}
.nxe-fora > em { font: 700 10px/1 var(--nx-mono); font-style: normal; color: #ffd0d0; text-shadow: 0 1px 2px #000; }
@keyframes nxe-surge { from { opacity: 0; } to { opacity: 1; } }
.nxe-regua { position: relative; height: 16px; margin: 3px 0 10px; }
.nxe-regua > span { position: absolute; top: 0; transform: translateX(-50%); font: 400 10px/16px var(--nx-mono); color: var(--nx-tinta-suave); }
.nxe-regua > span:first-child { transform: none; }
.nxe-tl-depois { background: rgba(10, 18, 11, 0.5); border-style: dashed; }
.nxe-tl-cheio {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px;
  background: rgba(57, 255, 106, 0.1); box-shadow: inset 0 0 0 1px var(--nx-borda-forte);
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nxe-emenda-tl { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; z-index: 2; background: #ffd76b; box-shadow: 0 0 6px rgba(255, 215, 107, 0.7); border-radius: 2px; }

.nxe-roteiro { margin: 0 0 12px; font-size: 14px; line-height: 2.1; color: var(--nx-tinta); }
.nxe-pausa {
  display: inline-block; padding: 0 6px; border-radius: 6px; vertical-align: 1px;
  border: 1px solid var(--nx-borda); background: rgba(0, 0, 0, 0.35);
  font: 600 11px/18px var(--nx-mono); color: var(--nx-tinta-suave); white-space: nowrap;
}
.nxe-pausa.nxe-cortada { border-color: rgba(255, 130, 130, 0.6); background: rgba(255, 77, 77, 0.14); color: #ffd0d0; }
.nxe-pausa.nxe-cortada > s { color: #ff9a9a; }

.nxe-placar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.nxe-placar > div { display: grid; gap: 2px; padding: 9px 10px; border: 1px solid var(--nx-borda); border-radius: 10px; background: rgba(0, 0, 0, 0.3); }
.nxe-placar b { font-size: 19px; font-weight: 800; color: var(--nx-verde); font-variant-numeric: tabular-nums; }
.nxe-placar span { font-size: 12px; color: var(--nx-tinta-suave); }
.nxe-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: 12px; color: var(--nx-tinta-suave); }
.nxe-legenda > span { display: inline-flex; align-items: center; gap: 6px; }
.nxe-legenda i { width: 14px; height: 10px; border-radius: 2px; }
.nxe-l-fala { background: var(--nx-verde); }
.nxe-l-fora { background: repeating-linear-gradient(135deg, rgba(255, 77, 77, 0.6) 0 3px, rgba(255, 77, 77, 0.2) 3px 6px); border: 1px dashed rgba(255, 130, 130, 0.9); }
.nxe-legenda i.nxe-l-emenda { width: 2px; height: 12px; background: #ffd76b; }

@container nx-janela (max-width: 560px) {
  .nxe-corte-corpo { padding: 12px 14px; }
  .nxe-tl-bloco { padding: 10px; }
  .nxe-regua > span:nth-child(even) { display: none; }
  .nxe-placar b { font-size: 16px; }
  .nxe-placar > div { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .nxe-pal, .nxe-tl-cheio, .nxe-emenda, .nxe-fila-cena, .nxe-cartao { transition: none; }
  .nxe-fora { animation: none; }
}
