/*
 * Motion study: one dot carries the claim into Processed, the node acknowledges
 * arrival, and the colored outcomes resolve outward without competing white
 * pulses.
 */

.claim-handoff-dot {
  animation: none !important;
  opacity: 0 !important;
}

.shared-claim-dot {
  width: 11px;
  height: 11px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 8;
  border-radius: 50%;
  background: #123f66;
  box-shadow: 0 2px 5px rgb(18 63 102 / 28%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: top, left, opacity;
}

.sankey-links path:not(.link-total-funnel) {
  opacity: 0.34;
}

.sankey-current .current-pulse-total {
  animation: none !important;
  opacity: 0 !important;
}

.claim-handoff-dot-sankey {
  animation: none !important;
  opacity: 0;
}

.sankey-current .current-pulse-reduced,
.sankey-current .current-pulse-paid,
.sankey-current .current-pulse-family {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  opacity: 0;
}

.sankey-current .current-pulse-reduced {
  stroke: #2f817b;
  stroke-width: 3px;
  animation: none !important;
}

.sankey-current .current-pulse-paid {
  stroke: #2f78aa;
  stroke-width: 3px;
  animation: none !important;
}

.sankey-current .current-pulse-family {
  stroke: #bf8a2e;
  stroke-width: 3px;
  animation: none !important;
}

.sankey-current .current-node-glow {
  fill: #123f66;
  filter: drop-shadow(0 0 5px rgb(18 63 102 / 30%));
  animation: none !important;
  opacity: 0;
}

.sankey-sequence-running .claim-handoff-dot-sankey {
  animation: sankey-claim-arrival 1.4s linear both !important;
}

.sankey-sequence-running .current-node-glow {
  animation: processed-arrival 2.1s ease-in-out both !important;
}

.sankey-sequence-running .sankey-nodes .node-total {
  animation: processed-node-acknowledgement 2.1s ease-in-out both !important;
}

.sankey-sequence-running .current-pulse-reduced {
  animation: outcome-reduced 2.1s linear both !important;
}

.sankey-sequence-running .current-pulse-paid {
  animation: outcome-paid 2.1s linear both !important;
}

.sankey-sequence-running .current-pulse-family {
  animation: outcome-family 2.1s linear both !important;
}

.sankey-sequence-running .sankey-links .link-reduced {
  animation: outcome-band-reduced 2.1s linear both !important;
}

.sankey-sequence-running .sankey-links .link-paid {
  animation: outcome-band-paid 2.1s linear both !important;
}

.sankey-sequence-running .sankey-links .link-family {
  animation: outcome-band-family 2.1s linear both !important;
}

@keyframes processed-node-acknowledgement {
  0%,
  24% {
    filter: none;
    transform: scale(1);
  }

  40%,
  52% {
    filter: drop-shadow(0 0 7px rgb(18 63 102 / 42%));
    transform: scale(1.16);
  }

  58%,
  100% {
    filter: none;
    transform: scale(1);
  }
}

@keyframes processed-arrival {
  0%,
  24% {
    opacity: 0;
    transform: scale(0.58);
  }

  40%,
  52% {
    opacity: 0.58;
    transform: scale(1);
  }

  58% {
    opacity: 0;
    transform: scale(1.34);
  }

  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@keyframes sankey-claim-arrival {
  0%,
  6% {
    opacity: 0;
  }

  9%,
  39% {
    opacity: 0.96;
  }

  43%,
  100% {
    opacity: 0;
  }
}

@keyframes outcome-reduced {
  0%,
  58% {
    stroke-dashoffset: 1;
    opacity: 0;
  }

  62% {
    opacity: 0.86;
  }

  76% {
    stroke-dashoffset: 0;
    opacity: 0.76;
  }

  84%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0.2;
  }
}

@keyframes outcome-paid {
  0%,
  62% {
    stroke-dashoffset: 1;
    opacity: 0;
  }

  66% {
    opacity: 0.86;
  }

  80% {
    stroke-dashoffset: 0;
    opacity: 0.76;
  }

  88%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0.2;
  }
}

@keyframes outcome-family {
  0%,
  66% {
    stroke-dashoffset: 1;
    opacity: 0;
  }

  70% {
    opacity: 0.86;
  }

  84% {
    stroke-dashoffset: 0;
    opacity: 0.76;
  }

  92%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0.2;
  }
}

@keyframes outcome-band-reduced {
  0%,
  58% {
    opacity: 0.34;
  }

  64%,
  78% {
    opacity: 0.88;
  }

  86%,
  100% {
    opacity: 0.72;
  }
}

@keyframes outcome-band-paid {
  0%,
  62% {
    opacity: 0.34;
  }

  68%,
  82% {
    opacity: 0.88;
  }

  90%,
  100% {
    opacity: 0.72;
  }
}

@keyframes outcome-band-family {
  0%,
  66% {
    opacity: 0.34;
  }

  72%,
  86% {
    opacity: 0.9;
  }

  94%,
  100% {
    opacity: 0.72;
  }
}

@media (max-width: 640px) {
  .shared-claim-dot {
    width: 9px;
    height: 9px;
  }

  .sankey-current .current-pulse-reduced,
  .sankey-current .current-pulse-paid,
  .sankey-current .current-pulse-family {
    stroke-width: 2.4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shared-claim-dot {
    display: none !important;
  }

  .sankey-current .current-pulse-reduced,
  .sankey-current .current-pulse-paid,
  .sankey-current .current-pulse-family,
  .sankey-current .current-node-glow {
    animation: none !important;
    opacity: 0 !important;
  }
}
