/*
  PORQUE EXISTE: editor central — abas limpas, estado vazio com marca,
  tipografia mono legível para código.
*/
.editor-abas {
  display: flex; align-items: stretch;
  min-height: 40px; border-bottom: 1px solid var(--borda);
  background: color-mix(in srgb, var(--fundo-painel) 70%, transparent);
  padding-left: 0;
  overflow: hidden;
}
.abas-trilho { flex: 1; min-width: 0; display: flex; overflow-x: auto; }
.abas-acoes { flex-shrink: 0; }

.btn-abrir-side {
  flex-shrink: 0;
  border-radius: 0 !important;
  border: none !important;
  border-right: 1px solid var(--borda) !important;
  background: transparent !important;
  font-size: 18px !important;
  font-weight: 700;
  color: var(--texto-fraco) !important;
}
.btn-abrir-side[aria-pressed="true"] {
  color: var(--texto) !important;
  background: var(--fundo-hover) !important;
}

.btn-fechar-side {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  min-height: 32px;
  font-size: 16px;
  font-weight: 700;
}

.aba {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; max-width: 180px;
  border-right: 1px solid var(--borda);
  color: var(--texto-fraco); font-size: 12px; cursor: pointer;
  transition: color var(--trans), background var(--trans);
  white-space: nowrap;
  overflow: hidden;
}
.aba > span:not(.sujo) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.aba:hover { color: var(--texto); background: var(--fundo-hover); }
.aba.ativa {
  color: var(--texto);
  background: var(--fundo-editor);
  box-shadow: inset 0 -2px 0 var(--destaque);
}
.aba .icone-arq { width: 12px; height: 12px; }
.aba .sujo { color: var(--aviso); font-size: 10px; }
.aba .fechar-aba { width: 22px; height: 22px; opacity: 0.5; }
.aba:hover .fechar-aba { opacity: 1; }

.editor-migalha {
  padding: 7px 14px; font-size: 11px;
  color: var(--texto-apagado); font-family: var(--fonte-mono);
  border-bottom: 1px solid transparent;
}

.editor-corpo { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.editor-vazio {
  flex: 1; display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--texto-fraco); padding: 32px; line-height: 1.6;
  background: var(--fundo-editor);
}
.editor-vazio p { max-width: 280px; font-size: 14px; }

.editor-texto {
  flex: 1; width: 100%; border: none; outline: none; resize: none;
  background: transparent; color: var(--texto);
  font-family: var(--fonte-mono); font-size: 13px;
  padding: 14px 16px; line-height: 1.55; tab-size: 2;
}
.editor-texto:focus { outline: none; }
