/* Bloco Botões — editor e resumo no canvas */
/* Prefixo obrigatório: .fbloco-botoes- */

/* ── Editor (corpo do modal) ──────────────────────────── */

.fbloco-botoes-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Botão "Treine o Agente" */
.fbloco-botoes-treinar {
  width: 100%;
  padding: 11px 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: #ef4444;
  border: none;
  border-radius: 10px;
  cursor: not-allowed;
  opacity: 0.85;
  letter-spacing: 0.01em;
}
.fbloco-botoes-treinar:hover { opacity: 1; }

/* ── Campos Título / Subtítulo ────────────────────────── */

.fbloco-botoes-campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fbloco-botoes-campo-rotulo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Barra de formatação */
.fbloco-botoes-barra {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: var(--panel-bg-hover);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.fbloco-botoes-barra-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.fbloco-botoes-barra-btn:hover {
  background: var(--border);
  color: var(--text);
  border-color: var(--border-strong);
}

/* Estilo visual de cada botão de formato */
.fbloco-botoes-barra-negrito { font-weight: 900; }
.fbloco-botoes-barra-italico { font-style: italic; }
.fbloco-botoes-barra-riscado { text-decoration: line-through; }
.fbloco-botoes-barra-mono    { font-family: monospace; letter-spacing: -0.02em; }

/* Select de variáveis */
.fbloco-botoes-vars {
  margin-left: auto;
  height: 26px;
  padding: 0 6px;
  font: inherit;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
}
.fbloco-botoes-vars:hover { border-color: var(--border-strong); color: var(--text); }

/* Textarea */
.fbloco-botoes-textarea {
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s;
}
.fbloco-botoes-textarea:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.18);
}

/* ── Lista de botões ──────────────────────────────────── */

.fbloco-botoes-lista-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fbloco-botoes-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fbloco-botoes-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--panel-bg-hover);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.fbloco-botoes-item-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 46px;
}

.fbloco-botoes-item-inp {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}
.fbloco-botoes-item-inp:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.15);
}
.fbloco-botoes-item-inp::placeholder { color: var(--text-muted); opacity: 0.7; }

.fbloco-botoes-item-lixo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.fbloco-botoes-item-lixo:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Link "Adicionar novo botão" */
.fbloco-botoes-adicionar {
  align-self: flex-start;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #ec4899;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.12s;
}
.fbloco-botoes-adicionar:hover { opacity: 1; text-decoration: underline; }

/* ── Bloco "Sem interação" ────────────────────────────── */

.fbloco-botoes-sem-int {
  padding: 12px 14px;
  background: var(--panel-bg-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fbloco-botoes-sem-int-cab {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.fbloco-botoes-sem-int-chk {
  width: 15px;
  height: 15px;
  accent-color: #ec4899;
  cursor: pointer;
  flex-shrink: 0;
}

.fbloco-botoes-sem-int-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.fbloco-botoes-sem-int-seta {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
}

.fbloco-botoes-sem-int-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Resumo no canvas ─────────────────────────────────── */

.fbloco-botoes-resumo-titulo {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fbloco-botoes-resumo-linha {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 0;
}

.fbloco-botoes-resumo-vazio {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
