/* Clarify the closed-loop logic with three fixed stages and moving arrows. */
.jh-cycle {
  margin-top: 8px;
  margin-bottom: 8px;
}

.jh-cycle .jh-rotor {
  animation: none !important;
}

.jh-cycle .jh-loop {
  transform-origin: 50% 50%;
  will-change: rotate;
}

.jh-cycle-label {
  inset: 51px 55px 41px;
  color: #263142;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: .04em;
}

.jh-flow-card--cycle .jh-cycle-label {
  color: #247b36;
}

.jh-cycle-logic {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
}

.jh-logic-step {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: max-content;
  padding: 5px 8px 5px 6px;
  border: 1px solid color-mix(in srgb, var(--jh-accent) 18%, rgba(255,255,255,.8));
  border-radius: 99px;
  background: rgba(255,255,255,.91);
  color: #3d4757;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--jh-accent) 13%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.jh-logic-step b {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--jh-accent);
  color: #fff;
  font-size: 9px;
}

.jh-logic-step::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jh-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--jh-accent) 12%, transparent);
}

.jh-logic-step--1 {
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
}
.jh-logic-step--1::after { left: 50%; bottom: -11px; transform: translateX(-50%); }

.jh-logic-step--2 {
  right: -62px;
  bottom: -18px;
}
.jh-logic-step--2::after { left: 14px; top: -10px; }

.jh-logic-step--3 {
  left: -62px;
  bottom: -18px;
}
.jh-logic-step--3::after { right: 14px; top: -10px; }

.jh-flow-card--legacy .jh-logic-step--3 {
  border-color: rgba(218,66,66,.25);
  color: #8f3434;
}

@media (prefers-reduced-motion: no-preference) {
  .jh-cycle .jh-loop { animation: jh-ring-direction 10s linear infinite; }
  .jh-cycle .jh-loop:nth-child(2) { animation-delay: -3.33s; }
  .jh-cycle .jh-loop:nth-child(3) { animation-delay: -6.66s; }
  .jh-flow-card--legacy .jh-cycle .jh-loop { animation-duration: 15s; }
  @keyframes jh-ring-direction { to { rotate: 1turn; } }

  .jh-logic-step b { animation: jh-step-pulse 3s ease-in-out infinite; }
  .jh-logic-step--2 b { animation-delay: 1s; }
  .jh-logic-step--3 b { animation-delay: 2s; }
  @keyframes jh-step-pulse {
    0%, 66%, 100% { transform: scale(1); box-shadow: none; }
    14% { transform: scale(1.13); box-shadow: 0 0 0 5px color-mix(in srgb, var(--jh-accent) 13%, transparent); }
  }
}

@media (max-width: 991px) {
  .jh-logic-step { font-size: 9px; }
}

@media (max-width: 479px) {
  .jh-logic-step { padding-right: 6px; }
  .jh-logic-step--2 { right: -62px; }
  .jh-logic-step--3 { left: -62px; }
}
