= default-subprocess($pending-background:#aaa, $pending-color:#555, $processing-background:#55f, $processing-color:white, $completed-background:#5b5, $completed-color:black, $rejected-background:#f55, $rejected-color:black)
  &.pending
    background-color: $pending-background
    color: $pending-color
    a
      color: $pending-color
  &.processing, &.active
    background-color: $processing-background
    color: $processing-color
    a
      color: $processing-color
  &.completed, &.all_completed
    background-color: $completed-background
    color: $completed-color
    a
      color: $completed-color
  &.rejected, &.any_rejected
    background-color: $rejected-background
    color: $rejected-color
    a
      color: $rejected-color
  &.overdue
    background-color: orange
    color: #fa0
    color: black
.display-badge
  +radius($global-rounded)
  padding: 3px 8px
  cursor: pointer
  display: inline-block
  margin-left: 5px
  margin-bottom: 3px
  .badge-name
  .human-state
    padding-left: 4px
    display: none
  +default-subprocess

  &.workflow_instance
    &.unplanned
      background-color: #aaa
      color: #555
    &.planned
      background-color: #aaa
      color: #555

// Show the state name in stead of scenario badge for badges prefixed in
// the dom with class state
.state
  .display-badge
    .badge-name
      display: none
    .human-state
      display: inline-block
pre.badge-info-text
  +panel
  max-height: 200px
  overflow-x: scroll
  white-space: pre-wrap
