/* ============================================================
   MUVEUP.MUSIC – Wizard-Erfolg: Exit-Animation + Erfolgs-Popup
   ============================================================ */

/* Phase 1: Wizard-Karte verkleinern und ausblenden */
.wizard-card.wizard-exit-shrink {
  transform: scale(0.88);
  opacity: 0;
  transform-origin: center center;
  transition: transform 0.48s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.48s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .wizard-card.wizard-exit-shrink {
    transition: none;
  }
}

/* Phase 2: Erfolgs-Popup Vollbild, Wizard aus Layout nehmen */
body.success-popup-open .wizard-wrapper {
  visibility: hidden;
}

body.success-popup-open #successPopup {
  z-index: 10000;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.success-popup-open #successPopup {
  overflow: visible;
}

/* Konfetti */
#successPopup .modal-content {
  position: relative;
  z-index: 1;
}

#successPopup .success-how-it-works {
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  margin: 16px 0 20px;
}

#successPopup .confetti-layer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

#successPopup .confetti-layer .confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--confetti-color);
  transform: translate(-50%, -50%);
  animation: confettiBurstRef ease-out forwards;
}

@media (max-width: 900px) {
  #successPopup .confetti-layer {
    top: -50vh;
    bottom: -50vh;
    height: 200vh;
  }
}

@keyframes confettiBurstRef {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--confetti-dx)), calc(-50% + var(--confetti-dy))) rotate(360deg);
  }
}
