/* =================================
   Space Vanta Theme 1.0
   Motion: add to cart
   Path: public/header/motion/cart.css

   .sv-fly         the shard that flies from the button to the cart
   .is-added       on the cart link for a moment after landing
   .is-pop         on the badge when the count changes
   ================================= */

.sv-fly {
  position: fixed;
  z-index: 10060;
  width: 26px;
  height: 26px;
  pointer-events: none;
  display: block;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 8px rgba(29, 107, 255, 0.55));
}
.sv-fly::before,
.sv-fly::after { content: ""; position: absolute; inset: 0; }
.sv-fly::before {
  clip-path: polygon(50% 0, 100% 38%, 78% 100%, 18% 88%, 0 34%);
  background: linear-gradient(135deg, #ffffff 0%, #c9d0dc 50%, #8e98a9 100%);
}
.sv-fly::after {
  inset: 8px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: radial-gradient(circle, #cfe0ff 0%, #1d6bff 70%);
  box-shadow: 0 0 10px #1d6bff;
}

/* the cart link needs room for the ring */
.sv-actions__cart { overflow: visible; }
.sv-actions__cart::before {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  opacity: 0;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  border: 0;
  background: radial-gradient(circle, transparent 58%, rgba(29, 107, 255, 0.55) 62%, transparent 70%);
}

@media (prefers-reduced-motion: no-preference) {

  .sv-actions__cart.is-added::before { animation: sv-cart-ring 0.9s ease-out; }
  .sv-actions__cart.is-added { color: var(--sv-blue, #1d6bff); }
  .sv-actions__cart.is-added .sv-actions__icon { animation: sv-cart-hop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sv-actions__cart.is-added .sv-actions__icon polyline { animation: sv-cart-handle 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); transform-box: fill-box; transform-origin: center; }
  .sv-actions__cart.is-added .sv-actions__icon polygon { animation: sv-cart-bag 1s ease-out; }

  .sv-actions__badge.is-pop { animation: sv-badge-pop 0.65s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

  @keyframes sv-cart-ring { 0% { opacity: 0.9; transform: scale(0.5); } 100% { opacity: 0; transform: scale(2.1); } }
  @keyframes sv-cart-hop { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-3px) scale(1.12); } 60% { transform: translateY(1px) scale(0.96); } 100% { transform: translateY(0) scale(1); } }
  @keyframes sv-cart-handle { 0% { transform: translateY(0); } 35% { transform: translateY(-2.5px); } 100% { transform: translateY(0); } }
  @keyframes sv-cart-bag { 0% { fill: rgba(29, 107, 255, 0.4); stroke: #1d6bff; } 100% { fill: rgba(29, 107, 255, 0); } }
  @keyframes sv-badge-pop { 0% { transform: scale(0.3); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
}
