.zylo-price-card[hidden] {
  display: none !important;
}

.zylo-price-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 18%,
    color-mix(in srgb, currentColor 4%, transparent) 35%,
    color-mix(in srgb, currentColor 19%, transparent) 49%,
    color-mix(in srgb, currentColor 5%, transparent) 63%,
    transparent 82%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-105%);
}

.zylo-price-card__amount {
  will-change: opacity, transform, filter;
}

.zylo-price-card.is-price-switching .zylo-price-card__amount {
  animation: zylo-price-out 190ms cubic-bezier(0.55, 0, 1, 0.45) both;
}

.zylo-price-card.is-price-entering .zylo-price-card__amount {
  animation: zylo-price-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.zylo-price-card.is-price-switching .zylo-price-card__main h3 {
  animation: zylo-title-out 190ms cubic-bezier(0.55, 0, 1, 0.45) both;
}

.zylo-price-card.is-price-entering .zylo-price-card__main h3 {
  animation: zylo-title-in 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.zylo-price-card.is-price-entering {
  animation: zylo-card-kick 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.zylo-price-card.is-price-entering::before {
  animation: zylo-price-sweep 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.zylo-price-card__variants button.is-active {
  animation: zylo-price-pill-in 580ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes zylo-price-out {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(12px);
    transform: perspective(20rem) translateY(-1.5rem) scale(0.92) rotateX(18deg);
  }
}

@keyframes zylo-price-in {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: perspective(20rem) translateY(2.4rem) scale(0.9) rotateX(-16deg);
  }
  55% {
    opacity: 1;
    filter: blur(0);
    transform: perspective(20rem) translateY(-0.35rem) scale(1.04) rotateX(2deg);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes zylo-price-pill-in {
  0% {
    border-radius: 0.45rem;
    transform: scale(0.86);
  }
  48% {
    border-radius: 999px;
    transform: scale(1.09);
  }
  100% {
    border-radius: 999px;
    transform: scale(1);
  }
}

@keyframes zylo-title-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0.52;
    transform: translateX(-0.8rem);
  }
}

@keyframes zylo-title-in {
  0% {
    opacity: 0.52;
    letter-spacing: -0.055em;
    transform: translateX(-0.8rem);
  }
  55% {
    opacity: 1;
    letter-spacing: -0.012em;
    transform: translateX(0.22rem);
  }
  100% {
    opacity: 1;
    letter-spacing: -0.025em;
    transform: translateX(0);
  }
}

@keyframes zylo-card-kick {
  0% {
    box-shadow: inset 0 0 0 0 currentColor;
  }
  22% {
    box-shadow: inset 0 0 0 3px currentColor;
  }
  100% {
    box-shadow: inset 0 0 0 0 currentColor;
  }
}

@keyframes zylo-price-sweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }
  22% {
    opacity: 1;
  }
  68% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zylo-price-card,
  .zylo-price-card::before,
  .zylo-price-card__amount,
  .zylo-price-card__main h3,
  .zylo-price-card__variants button,
  .zylo-price-card__variants button.is-active {
    animation: none !important;
    transition: none !important;
  }
}
