/* Animated readiness score ring */
.score-ring.is-score-animated {
  position: relative;
  isolation: isolate;
  animation: score-ring-breathe 2.8s ease-in-out infinite;
}

.score-ring.is-score-animated::before,
.score-ring.is-score-animated::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.score-ring.is-score-animated::before {
  inset: -17px;
  z-index: -1;
  background: conic-gradient(
    from 0deg,
    rgba(24, 184, 156, 0),
    rgba(24, 184, 156, 0.95),
    rgba(217, 164, 65, 0.86),
    rgba(91, 233, 211, 0.22),
    rgba(24, 184, 156, 0)
  );
  filter: drop-shadow(0 0 18px rgba(24, 184, 156, 0.32));
  animation: score-ring-orbit 4.8s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 0 63%, #000 64% 70%, transparent 71%);
  mask: radial-gradient(circle, transparent 0 63%, #000 64% 70%, transparent 71%);
}

.score-ring.is-score-animated::after {
  inset: -8px;
  border: 1px solid rgba(167, 243, 223, 0.26);
  box-shadow:
    0 0 38px rgba(24, 184, 156, 0.22),
    inset 0 0 26px rgba(24, 184, 156, 0.18);
  animation: score-ring-pulse 2.2s ease-in-out infinite;
}

.score-ring.is-score-animated span {
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(167, 243, 223, 0.55);
  animation: score-number-pop 1.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.score-ring.is-score-animated small {
  position: relative;
}

.score-ring.is-score-animated small::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: #5be9d3;
  box-shadow: 0 0 14px rgba(91, 233, 211, 0.9);
  animation: score-ready-dot 1.15s ease-in-out infinite;
}

.score-ring.is-score-ready {
  border-color: #18b89c #d9a441 #18b89c rgba(91, 233, 211, 0.4);
}

@keyframes score-ring-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes score-ring-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 42px rgba(24, 184, 156, 0.24);
  }

  50% {
    transform: scale(1.025);
    box-shadow: 0 0 62px rgba(24, 184, 156, 0.38);
  }
}

@keyframes score-ring-pulse {
  0%,
  100% {
    opacity: 0.52;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.035);
  }
}

@keyframes score-number-pop {
  0% {
    opacity: 0.2;
    transform: translateY(10px) scale(0.88);
    filter: blur(5px);
  }

  62% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
    filter: blur(0);
  }

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

@keyframes score-ready-dot {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.72);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .score-ring.is-score-animated,
  .score-ring.is-score-animated::before,
  .score-ring.is-score-animated::after,
  .score-ring.is-score-animated span,
  .score-ring.is-score-animated small::after {
    animation: none;
  }
}
