/* block-tree.css — árvore hierárquica de blocos (painel esquerdo, Nível 2/3).
   Valores base seguem a paleta de app-shell.css/blocks.css. */

.nv-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.nv-tree-row:hover {
    background: var(--bg-hover);
}

.nv-tree-row.selected {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.15);
}

.nv-tree-row.dragging {
    opacity: 0.6;
}

.nv-tree-row.drag-over {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.12);
}

/* Nível 3 (célula): borda esquerda tracejada, sem drag handle (a ordem é a
   da própria grelha, nunca reordenável manualmente). */
.nv-tree-row--l3 {
    border-left: 2px dashed var(--l3-accent, #7a6a9c);
}

.nv-tree-chevron {
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.nv-tree-chip {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.nv-tree-chip--l2 {
    background: var(--accent);
}

.nv-tree-chip--l3 {
    background: var(--l3-accent, #7a6a9c);
}

.nv-tree-label {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nv-tree-count {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nv-tree-add,
.nv-tree-delete {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.nv-tree-add:hover {
    background: var(--accent);
    color: white;
}

.nv-tree-delete:hover {
    background: var(--danger);
    color: white;
}

#blockTreeAddRoot {
    width: 100%;
    margin-top: 8px;
}
