/* ==========================================================================
   PVS360 MODERN PIPELINE & REVERSIBLE STAGES SYSTEM (Pic 1 Design Language)
   ========================================================================== */

/* Pipeline Wrapper */
.pvs-pipeline-wrapper {
  position: relative;
  width: 100%;
  padding: 4px 0 8px 0;
  user-select: none;
}

/* Header Action / Toggle Button */
.pvs-pipeline-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pvs-pipeline-toggle-btn.mode-modern {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.pvs-pipeline-toggle-btn.mode-modern:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.pvs-pipeline-toggle-btn.mode-classic {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.pvs-pipeline-toggle-btn.mode-classic:hover {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
  transform: translateY(-1px);
}

.dark .pvs-pipeline-toggle-btn.mode-modern {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
}
.dark .pvs-pipeline-toggle-btn.mode-modern:hover {
  background: #1e3a8a;
  color: #bfdbfe;
  border-color: #3b82f6;
}

.dark .pvs-pipeline-toggle-btn.mode-classic {
  background: #064e3b;
  color: #86efac;
  border: 1px solid #047857;
}

/* Squircle Stage Card */
.pvs-pipeline-squircle {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 1px 3px -1px rgba(0, 0, 0, 0.05);
  border-width: 1.5px;
  border-style: solid;
}

.pvs-pipeline-squircle.is-unstarted {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

.dark .pvs-pipeline-squircle.is-unstarted {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

.pvs-pipeline-squircle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}

/* Active Stage Ring */
.pvs-pipeline-squircle.is-active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22), 0 4px 12px -2px rgba(37, 99, 235, 0.25);
  transform: scale(1.06);
}

/* Completed Mini Badge */
.pvs-pipeline-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.35);
  font-size: 8px;
  font-weight: 900;
  z-index: 2;
  animation: pvs-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark .pvs-pipeline-badge {
  border-color: #0f172a;
}

@keyframes pvs-badge-pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Connector Line */
.pvs-pipeline-connector {
  flex: 1;
  height: 2px;
  border-radius: 9999px;
  margin-top: 17px;
  margin-left: 6px;
  margin-right: 6px;
  min-width: 16px;
  transition: all 0.3s ease;
}

/* Title Label (Positioned directly under squircle card) */
.pvs-pipeline-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  line-height: 1.25;
  margin-top: 6px;
  max-width: 78px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.pvs-pipeline-title.is-unstarted {
  color: #94a3b8;
  font-weight: 500;
}

.dark .pvs-pipeline-title.is-unstarted {
  color: #64748b;
}

.pvs-pipeline-title.is-active {
  color: #1d4ed8;
  font-weight: 800;
}

.dark .pvs-pipeline-title {
  color: #f1f5f9;
}
.dark .pvs-pipeline-title.is-active {
  color: #60a5fa;
}

/* Soft Pulsing Animation for Current Active Node */
@keyframes pvs-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25), 0 4px 12px rgba(37, 99, 235, 0.15);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15), 0 6px 18px rgba(37, 99, 235, 0.25);
  }
}

.pvs-pipeline-squircle.pulse-glow {
  animation: pvs-pulse-glow 2.4s infinite ease-in-out;
}
