/* ==========================================================================
   DevFlow Automation & Workflow Stylesheet (workflow.css)
   ========================================================================== */

.workflow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .workflow-layout {
    grid-template-columns: 1fr;
  }
}

.workflow-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.workflow-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.workflow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.workflow-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.workflow-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.workflow-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Automation Flow Pipeline Visualization */
.pipeline-chain {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.pipeline-node {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.pipeline-node.trigger {
  border-color: rgba(6, 182, 212, 0.4);
  color: #22d3ee;
}

.pipeline-node.condition {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.pipeline-node.action {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.pipeline-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.workflow-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #25334d;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--grad-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Run History Log Table */
.run-log-table {
  width: 100%;
  font-size: 0.82rem;
}

.run-log-table th {
  text-align: left;
  padding: 0.6rem 0.5rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.run-log-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
