/* R3 slice 13/14 (60-tracking-steppers.css) — extracted VERBATIM from styles.css lines 6901-7255.
   vertical/horizontal steppers, delivery tracking glassmorphic rows, stage-specific colors, text links.
   Link order in index.html is load-bearing: cascade tie-breaks depend on it. Do not reorder. */

/* Vertical Stepper (for early stages) */
.stepper-vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 10px;
}

.stepper-vertical .step-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 24px;
}

.stepper-vertical .step-item:last-child {
  padding-bottom: 0;
}

.stepper-vertical .step-item::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: var(--hairline);
  z-index: 1;
  border-radius: 2px;
}

.stepper-vertical .step-item:last-child::after {
  display: none;
}

/* Connector colors: each step's ::after represents the line going to the
   NEXT step, so the gradient flows from THIS step's color to the next. */
.stepper-vertical .step-item.completed.line-next-completed::after {
  background: var(--green);
}
.stepper-vertical .step-item.completed.line-next-active::after {
  background: linear-gradient(to bottom, var(--green), var(--amber));
}
.stepper-vertical .step-item.completed.line-next-pending::after {
  background: linear-gradient(to bottom, var(--green), var(--hairline));
}
.stepper-vertical .step-item.active.line-next-pending::after,
.stepper-vertical .step-item.active.line-next-active::after {
  background: linear-gradient(to bottom, var(--amber), var(--hairline));
}
.stepper-vertical .step-item.pending::after {
  background: var(--hairline);
}

.stepper-vertical .step-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hover-bg);
  border: 2px solid var(--hairline);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.stepper-vertical .step-item.active .step-icon {
  border-color: var(--amber);
  background: var(--amber);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(232, 181, 84, 0.55);
  /* Perf: the expanding ring is now the ::after disc below (transform/opacity
     on the compositor) instead of an animated box-shadow spread repainting
     every frame. The icon already stacks (flex item, z-index:2); relative
     makes it the positioning box for the two pseudos. */
  position: relative;
}

/* Opaque replica of the amber circle (bg + 2px border are both var(--amber)),
   sitting between the icon's own paint and the pulse disc: the pulse hue
   (rgb(232,181,84)) differs from var(--amber), so without this cover the
   scaled disc would tint the circle's interior. Keeps the interior identical. */
.stepper-vertical .step-item.active .step-icon::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--amber);
  z-index: -1;
}

.stepper-vertical .step-item.active .step-icon::after {
  content: "";
  position: absolute;
  inset: -2px; /* border-box: 26px + 2px border each side = 30px disc */
  border-radius: 50%;
  background: rgb(232, 181, 84);
  opacity: 0.55;
  z-index: -2;
  animation: stepper-pulse 2s infinite;
}

@keyframes stepper-pulse {
  0%   { transform: scale(1);   opacity: 0.55; } /* = 0px spread @ .55 */
  70%  { transform: scale(1.8); opacity: 0; }    /* = 12px spread on the 30px disc */
  100% { transform: scale(1);   opacity: 0; }
}

.stepper-vertical .step-item.completed .step-icon {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.stepper-vertical .step-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stepper-vertical .step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.stepper-vertical .step-item.pending .step-title {
  color: var(--muted);
  font-weight: 500;
}

.stepper-vertical .step-item.active .step-title {
  color: var(--amber);
}

.stepper-vertical .step-item.completed .step-title {
  color: var(--green);
}

.stepper-vertical .step-desc {
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.4;
}

.stepper-vertical .step-item.pending .step-desc {
  color: var(--muted);
}

.stepper-vertical .step-pill {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(232, 181, 84, 0.15);
  color: #8a5a00;
  border: 1px solid rgba(232, 181, 84, 0.4);
}

body.dark .stepper-vertical .step-pill {
  color: var(--amber);
  background: rgba(240, 160, 40, 0.15);
}

/* Horizontal Stepper (for weekly deliveries) */
.stepper-horizontal {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 10px 0;
}

.stepper-horizontal .step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  width: 60px;
  flex-shrink: 0;
}

.stepper-horizontal .step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hover-bg);
  border: 2px solid var(--hairline);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.stepper-horizontal .step-node.active .step-dot {
  border-color: var(--primary-color);
  background: var(--primary-color-dim);
  color: var(--primary-color);
}

.stepper-horizontal .step-node.completed .step-dot {
  border-color: var(--green);
  background: rgba(0, 162, 99, 0.1);
  color: var(--green);
}

.stepper-horizontal .step-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.stepper-horizontal .step-node.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

.stepper-horizontal .step-node.completed .step-label {
  color: var(--green);
  font-weight: 600;
}

.stepper-horizontal .step-line {
  flex: 1;
  height: 2px;
  background: var(--hairline);
  margin-bottom: 14px;
  z-index: 1;
}

.stepper-horizontal .step-line.completed {
  background: var(--green);
}

/* Link and Button enhancements */
.text-link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.text-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Glassmorphic & Color-coded Delivery Tracking Styles */
.delivery-track-week {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

body.dark .delivery-track-week {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
}

.delivery-track-week:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-color-dim);
}

.tracking-img-preview {
  max-height: 80px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tracking-img-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stage-specific active nodes and lines */
.stepper-horizontal .step-node.paid-active .step-dot {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}
.stepper-horizontal .step-node.paid-active .step-label {
  color: #0ea5e9 !important;
  font-weight: 600;
}
.stepper-horizontal .step-line.paid-completed {
  background: #0ea5e9;
}

.stepper-horizontal .step-node.received-active .step-dot {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.15);
  color: #ea580c;
}
.stepper-horizontal .step-node.received-active .step-label {
  color: #ea580c !important;
  font-weight: 600;
}
.stepper-horizontal .step-line.received-completed {
  background: #ea580c;
}

.stepper-horizontal .step-node.verified-active .step-dot {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}
.stepper-horizontal .step-node.verified-active .step-label {
  color: #6366f1 !important;
  font-weight: 600;
}
.stepper-horizontal .step-line.verified-completed {
  background: #6366f1;
}

.stepper-horizontal .step-node.fed-active .step-dot {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.stepper-horizontal .step-node.fed-active .step-label {
  color: #10b981 !important;
  font-weight: 600;
}
.stepper-horizontal .step-line.fed-completed {
  background: #10b981;
}





