/* Pipeline Status Dashboard Styles */

.pipeline-status {
  background: var(--surface-card, #fff);
  border: 1px solid var(--border-subtle, #e5e7eb);
  border-radius: 16px;
  padding: 1.5rem;
}

.pipeline-status__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
}

.pipeline-status__title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pipeline-status__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0;
}

.pipeline-status__tier-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.pipeline-status__tier-badge--free {
  background: #e5e7eb;
  color: #374151;
}

.pipeline-status__tier-badge--starter {
  background: #dbeafe;
  color: #1d4ed8;
}

.pipeline-status__tier-badge--core {
  background: #d1fae5;
  color: #047857;
}

.pipeline-status__tier-badge--complete {
  background: #fce7f3;
  color: #be185d;
}

.pipeline-status__tier-badge--team {
  background: #ede9fe;
  color: #5b21b6;
}

.pipeline-status__tier-badge--enterprise {
  background: #fef3c7;
  color: #b45309;
}

.pipeline-status__actions {
  display: flex;
  gap: 0.5rem;
}

.pipeline-status__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.pipeline-status__btn:not(.pipeline-status__btn--upgrade) {
  background: var(--surface-elevated, #f3f4f6);
  color: var(--text-primary, #111827);
  border-color: var(--border-subtle, #e5e7eb);
}

.pipeline-status__btn--upgrade {
  background: var(--accent-primary, #3b82f6);
  color: white;
}

.pipeline-status__btn:hover {
  transform: translateY(-1px);
}

.pipeline-status__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (width <= 768px) {
  .pipeline-status__grid {
    grid-template-columns: 1fr;
  }
}

.pipeline-status__section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Worker list */
.pipeline-status__worker-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pipeline-status__worker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.pipeline-status__worker--active {
  background: rgb(34 197 94 / 10%);
}

.pipeline-status__worker--locked {
  background: var(--surface-locked, #f3f4f6);
  opacity: 0.7;
}

.pipeline-status__worker--loading {
  background: rgb(59 130 246 / 10%);
}

.pipeline-status__worker--error {
  background: rgb(239 68 68 / 10%);
}

.pipeline-status__worker-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary, #111827);
}

.pipeline-status__worker--locked .pipeline-status__worker-name {
  color: var(--text-muted, #9ca3af);
}

.pipeline-status__worker-state {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.pipeline-status__worker--active .pipeline-status__worker-state {
  background: #22c55e;
  color: white;
}

.pipeline-status__worker--locked .pipeline-status__worker-state {
  background: #e5e7eb;
  color: #6b7280;
}

.pipeline-status__worker--loading .pipeline-status__worker-state {
  background: #3b82f6;
  color: white;
}

/* Stats grid */
.pipeline-status__stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.pipeline-status__stat {
  text-align: center;
  padding: 1rem;
  background: var(--surface-elevated, #f9fafb);
  border-radius: 8px;
}

.pipeline-status__stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin-bottom: 0.25rem;
}

.pipeline-status__stat-label {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

/* Footer */
.pipeline-status__footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
}

.pipeline-status__link {
  color: var(--accent-primary, #3b82f6);
  text-decoration: none;
  font-weight: 500;
}

.pipeline-status__link:hover {
  text-decoration: underline;
}

/* Animation for loading state */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.pipeline-status__worker--loading .pipeline-status__worker-name {
  animation: pulse 2s ease-in-out infinite;
}
