/* Premium slow pulse for emergency call + CPR metronome + location buttons */
.eq-call-btn,
.eq-metro button:not(.playing) {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  animation: eqPremiumPulse 2.4s ease-in-out infinite;
  will-change: transform, box-shadow;
}
.eq-call-btn::after,
.eq-metro button:not(.playing)::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 26px;
  border: 1px solid rgba(255, 104, 77, 0.28);
  box-shadow: 0 0 0 0 rgba(255, 84, 60, 0.18);
  opacity: 0;
  z-index: -1;
  animation: eqPremiumHalo 2.4s ease-out infinite;
  pointer-events: none;
}
.eq-metro button:not(.playing)::after {
  border-radius: 22px;
}
.eq-call-btn:active,
.eq-metro button:active {
  animation: none;
  transform: scale(0.985);
}
.eq-metro button.playing,
.eq-metro button.playing::after {
  animation: none !important;
}

/* Locate button — same premium language, softer because it is a secondary action */
.eq-locate {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  animation: locatePremiumPulse 2.7s ease-in-out infinite;
  will-change: transform, box-shadow;
}
.eq-locate::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 21px;
  border: 1px solid rgba(241, 90, 42, 0.24);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  animation: locatePremiumHalo 2.7s ease-out infinite;
}
.eq-locate:active {
  animation: none;
  transform: scale(0.985);
}

/* Current rank emblem in the Rank tab */
.rank-page .rank-stage.current .rank-symbol {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  animation: rankPremiumPulse 2.8s ease-in-out infinite;
  will-change: transform, filter;
}
.rank-page .rank-stage.current .rank-symbol::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(241, 90, 42, 0.16);
  animation: rankPremiumHalo 2.8s ease-out infinite;
}

/* Current rank emblem on the Home card — premium but slightly softer */
.rank-card .rank-head .rank-emblem {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  animation: homeRankPremiumPulse 2.8s ease-in-out infinite;
  will-change: transform, filter;
}
.rank-card .rank-head .rank-emblem::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 24px;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(241, 90, 42, 0.14);
  animation: homeRankPremiumHalo 2.8s ease-out infinite;
}

@keyframes eqPremiumPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 9px 22px rgba(242, 55, 38, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    transform: scale(1.018);
    box-shadow: 0 12px 28px rgba(242, 55, 38, 0.38), 0 0 24px rgba(255, 93, 64, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  }
}
@keyframes eqPremiumHalo {
  0% { opacity: 0; transform: scale(0.995); box-shadow: 0 0 0 0 rgba(255,84,60,0.18); }
  30% { opacity: .55; }
  75% { opacity: 0; transform: scale(1.045); box-shadow: 0 0 0 16px rgba(255,84,60,0); }
  100% { opacity: 0; transform: scale(1.045); }
}
@keyframes locatePremiumPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 5px 14px rgba(241, 90, 42, 0.08), inset 0 0 0 0 rgba(241, 90, 42, 0);
  }
  50% {
    transform: scale(1.014);
    box-shadow: 0 8px 20px rgba(241, 90, 42, 0.15), 0 0 18px rgba(241, 90, 42, 0.10), inset 0 0 0 1px rgba(241, 90, 42, 0.05);
  }
}
@keyframes locatePremiumHalo {
  0% { opacity: 0; transform: scale(.995); box-shadow: 0 0 0 0 rgba(241,90,42,.14); }
  30% { opacity: .45; }
  75% { opacity: 0; transform: scale(1.035); box-shadow: 0 0 0 11px rgba(241,90,42,0); }
  100% { opacity: 0; transform: scale(1.035); }
}
@keyframes rankPremiumPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 12px rgba(7, 28, 54, 0.18));
  }
  50% {
    transform: scale(1.035);
    filter: drop-shadow(0 10px 18px rgba(7, 28, 54, 0.24)) drop-shadow(0 0 14px rgba(241, 90, 42, 0.18));
  }
}
@keyframes rankPremiumHalo {
  0% { opacity: 0; transform: scale(.98); box-shadow: 0 0 0 0 rgba(241,90,42,.14); }
  30% { opacity: .42; }
  75% { opacity: 0; transform: scale(1.08); box-shadow: 0 0 0 12px rgba(241,90,42,0); }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes homeRankPremiumPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 12px rgba(7, 28, 54, 0.16));
  }
  50% {
    transform: scale(1.028);
    filter: drop-shadow(0 10px 18px rgba(7, 28, 54, 0.22)) drop-shadow(0 0 14px rgba(241, 90, 42, 0.16));
  }
}
@keyframes homeRankPremiumHalo {
  0% { opacity: 0; transform: scale(.99); box-shadow: 0 0 0 0 rgba(241,90,42,.14); }
  30% { opacity: .38; }
  75% { opacity: 0; transform: scale(1.06); box-shadow: 0 0 0 12px rgba(241,90,42,0); }
  100% { opacity: 0; transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .eq-call-btn,
  .eq-call-btn::after,
  .eq-metro button,
  .eq-metro button::after,
  .eq-locate,
  .eq-locate::after,
  .rank-page .rank-stage.current .rank-symbol,
  .rank-page .rank-stage.current .rank-symbol::after,
  .rank-card .rank-head .rank-emblem,
  .rank-card .rank-head .rank-emblem::after {
    animation: none !important;
  }
}
