
/* BorsaForex Pulse Motion v0.1
   Applies globally to every current/future pulse after the JS classifies its impact. */

@keyframes bfpmPositive {
  0%,100% {
    box-shadow: 0 0 0 0 rgba(34,197,94,.06), inset 0 0 0 1px rgba(34,197,94,.28);
    border-color: rgba(34,197,94,.48);
  }
  50% {
    box-shadow: 0 0 24px 4px rgba(34,197,94,.28), inset 0 0 0 1px rgba(34,197,94,.86);
    border-color: rgba(34,197,94,.92);
  }
}

@keyframes bfpmNegative {
  0%,100% {
    box-shadow: 0 0 0 0 rgba(239,68,68,.06), inset 0 0 0 1px rgba(239,68,68,.30);
    border-color: rgba(239,68,68,.52);
  }
  50% {
    box-shadow: 0 0 24px 4px rgba(239,68,68,.30), inset 0 0 0 1px rgba(239,68,68,.90);
    border-color: rgba(239,68,68,.95);
  }
}

@keyframes bfpmMixed {
  0%,100% {
    box-shadow: 0 0 0 0 rgba(245,158,11,.04), inset 0 0 0 1px rgba(245,158,11,.24);
    border-color: rgba(245,158,11,.42);
  }
  50% {
    box-shadow: 0 0 18px 3px rgba(245,158,11,.22), inset 0 0 0 1px rgba(245,158,11,.68);
    border-color: rgba(245,158,11,.75);
  }
}

/* JS adds one of these classes to the actual pulse card/row. */
.bfpm-pulse-positive {
  animation: bfpmPositive 1.55s ease-in-out infinite !important;
  will-change: box-shadow, border-color;
}

.bfpm-pulse-negative {
  animation: bfpmNegative 1.55s ease-in-out infinite !important;
  will-change: box-shadow, border-color;
}

.bfpm-pulse-mixed {
  animation: bfpmMixed 2.0s ease-in-out infinite !important;
  will-change: box-shadow, border-color;
}

.bfpm-pulse-neutral {
  animation: none !important;
}

/* Small status glow on a pre-existing icon/dot if the card has one. */
.bfpm-pulse-positive :is(.dot,[class*="dot"],[class*="status"],[class*="signal"]) {
  filter: drop-shadow(0 0 5px rgba(34,197,94,.7));
}
.bfpm-pulse-negative :is(.dot,[class*="dot"],[class*="status"],[class*="signal"]) {
  filter: drop-shadow(0 0 5px rgba(239,68,68,.7));
}

/* Keep motion accessible. */
@media (prefers-reduced-motion: reduce) {
  .bfpm-pulse-positive,
  .bfpm-pulse-negative,
  .bfpm-pulse-mixed {
    animation: none !important;
  }
}
