/* Pipeline Bar — fixed bottom bar showing active pipeline progress.
 * Visible on every page. Hidden when no active pipeline.
 * Kolory: tokeny nowego wyglądu z zapasem = dzisiejszy ciemny kolor (SAAS/PLAN_nowy_wyglad.md §4). */

#lf-pipeline-bar {
  position: fixed;
  bottom: 28px; /* above terminal header (~28px tall) */
  left: 0;
  right: 0;
  z-index: 9950; /* above terminal (9900) */
  background: var(--bg2, #242424);
  border-top: 1px solid var(--border, #2a2a2a);
  padding: 10px 20px;
  display: none; /* shown by JS when active pipeline */
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text, #e5e5e5);
  box-shadow: var(--shadow, 0 -2px 12px rgba(0, 0, 0, 0.3));
}

#lf-pipeline-bar.visible {
  display: flex;
}

/* Steps row */
.pipeline-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--bg3, #2e2e2e);
  color: var(--text-muted, #888);
  transition: background 0.2s, color 0.2s;
}

.pipeline-step.completed {
  background: color-mix(in srgb, var(--green, #4caf50) 15%, transparent);
  color: var(--green-text, #4caf50);
}

.pipeline-step.current {
  background: var(--accent-soft, rgba(74, 158, 255, 0.2));
  color: var(--accent-text, #4a9eff);
  font-weight: 600;
}

.pipeline-step.error {
  background: color-mix(in srgb, var(--danger, #ef5350) 15%, transparent);
  color: var(--danger-text, #ef5350);
}

.pipeline-arrow {
  color: var(--text-muted, #555);
  font-size: 11px;
}

/* Item count */
.pipeline-count {
  font-size: 12px;
  color: var(--text-muted, #888);
  white-space: nowrap;
}

/* Action button */
.pipeline-action {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: var(--accent, #4a9eff);
  color: var(--on-accent, #fff);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.pipeline-action:hover {
  background: var(--accent-hover, #3a8eef);
}

.pipeline-action.cancel {
  background: transparent;
  color: var(--text-muted, #888);
  border: 1px solid var(--border, #2a2a2a);
}

.pipeline-action.cancel:hover {
  background: color-mix(in srgb, var(--danger, #ef5350) 15%, transparent);
  color: var(--danger-text, #ef5350);
  border-color: var(--danger, #ef5350);
}

/* Sesja 22AX: Skip button — pomarańczowy (świadoma decyzja operatora "pomiń ten krok") */
.pipeline-action.skip {
  background: transparent;
  color: var(--warn-text, #ff9800);
  border: 1px solid color-mix(in srgb, var(--warn-text, #ff9800) 40%, transparent);
}

.pipeline-action.skip:hover {
  background: color-mix(in srgb, var(--warn-text, #ff9800) 15%, transparent);
  color: var(--warn-text, #ffa726);
  border-color: var(--warn-text, #ffa726);
}

.pipeline-action.skip:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Error message */
.pipeline-error-msg {
  font-size: 11px;
  color: var(--danger-text, #ef5350);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Push floating bars up when pipeline bar is visible */
body.has-pipeline #floating-bar,
body.has-pipeline #q-floating-bar,
body.has-pipeline .floating-bar {
  bottom: 85px !important;
  transition: bottom 0.2s ease !important;
}
