:root {
  --tasks-group-progress-height: 5px;
  --tasks-status-bar-height: 8px;
  --sorting-icon-size: 8px;
  --task-status-bar-transition-duration: 250ms;
}

.nextflow-engine-tasks {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.nextflow-engine-tasks .nextflow-processes {
  max-height: 33%;
  flex-shrink: 0;
  display: flex;
}

.nextflow-engine-tasks .nextflow-tasks {
  flex: 1;
  overflow: auto;
  padding: 5px 0;
}

.nextflow-engine-tasks > *:not(:last-child) {
  margin-bottom: 5px;
}

.nextflow-engine-tasks .nextflow-processes .nextflow-processes-list {
  flex: 1;
  padding: 5px;
}

.nextflow-engine-tasks .nextflow-processes .nextflow-processes-chart {
  flex-shrink: 0;
  width: 40%;
  padding: 5px 0 5px 5px;
}

.tasks-groups {
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.tasks-groups .tasks-group-list-header {
  flex-shrink: 0;
  padding: 5px 0;
  display: flex;
  align-items: center;
}

.tasks-groups .tasks-group-list {
  flex: 1;
  overflow: auto;
}

.tasks-group {
  margin: 0;
  padding: 10px 0 5px;
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
}

.tasks-group + .tasks-group {
  margin-top: 5px;
}

.tasks-group {
  cursor: pointer;
}

.tasks-group .tasks-group-info {
  flex: 1;
  margin-right: 5px;
}

.tasks-group .tasks-group-active-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: end;
}

.tasks-group .tasks-group-active-indicator .indicator {
  width: 2px;
  height: 0;
  opacity: 0;
  transition: opacity 250ms ease, height 250ms ease;
  background: currentColor;
}

.tasks-group.active .tasks-group-header .tasks-group-name {
  font-weight: bold;
}

.tasks-group.active .tasks-group-active-indicator .indicator {
  opacity: 1;
  height: 100%;
}

.tasks-group .tasks-group-header {
  display: flex;
  align-items: center;
}

.tasks-group .tasks-group-header .tasks-group-name {
  flex: 1;
  margin-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: min(150px, 33%);
}

.tasks-group .tasks-group-header .tasks-group-stats {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.tasks-group .tasks-group-header .tasks-group-stats-entry + .tasks-group-stats-entry::before {
  content: ' / ';
  white-space: pre;
  margin-left: 5px;
}

.tasks-group-progress {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--tasks-group-progress-height);
  overflow: hidden;
}

.tasks-group-status-progress {
  height: var(--tasks-group-progress-height);
  transition: width var(--task-status-bar-transition-duration) ease, padding var(--task-status-bar-transition-duration) ease;
  padding: 0 2px;
  overflow: hidden;
}

.tasks-group-status-progress .tasks-group-status-progress-bar {
  width: 100%;
  height: 100%;
  background: currentColor;
  border-radius: var(--tasks-group-progress-height);
  border: 1px solid currentColor;
}

.tasks-statuses {
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 5px;
}

.tasks-statuses .tasks-statuses-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 5px;
  line-height: 24px;
}

.tasks-statuses .tasks-statuses-container {
  flex: 1;
  overflow: auto;
}

.tasks-statuses .tasks-status {
  display: flex;
  align-items: center;
}

.tasks-status-count-bar {
  display: block;
  min-width: 100px;
  width: 100%;
  height: var(--tasks-status-bar-height);
  border-radius: calc(var(--tasks-status-bar-height) / 1.5);
}

.tasks-status-count-bar-fill {
  display: block;
  height: var(--tasks-status-bar-height);
  border-radius: calc(var(--tasks-status-bar-height) / 1.5);
  border: none;
  background: currentColor;
  transition: width var(--task-status-bar-transition-duration) ease;
}

.tasks-status-count-bar-fill.non-empty {
  min-width: var(--tasks-status-bar-height);
  border: 1px solid currentColor;
}

.tasks-statuses .tasks-statuses-table {
  min-width: 100%;
}

.tasks-statuses .tasks-statuses-table td {
  padding: 2px 5px;
}

.tasks-statuses .tasks-statuses-table td:first-child {
  padding: 2px 5px 2px 0;
}

.nf-task-status-icon {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  font-size: x-small;
  padding: 2px 3px;
  line-height: 1;
}

.task-details-modal-body {
  height: calc(99vh - 220px);
  overflow: auto;
}
