/* Đặt hàng thành công — popup overlay */
.order-success-popup {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.order-success-popup.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.order-success-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.order-success-popup__card {
  position: relative;
  max-width: 380px;
  width: 100%;
  background: linear-gradient(160deg, #fff9e6 0%, #fff 45%, #e8f5e9 100%);
  border-radius: 20px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  animation: successPopIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  overflow: hidden;
}

.order-success-popup.is-hiding .order-success-popup__card {
  animation: successPopOut 0.35s ease forwards;
}

.order-success-popup__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.order-success-popup__confetti span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 1.8s ease-in infinite;
}

.order-success-popup__confetti span:nth-child(1) { left: 10%; background: #ffd400; animation-delay: 0s; }
.order-success-popup__confetti span:nth-child(2) { left: 25%; background: #e11b1e; animation-delay: 0.15s; }
.order-success-popup__confetti span:nth-child(3) { left: 40%; background: #1a5f2a; animation-delay: 0.3s; }
.order-success-popup__confetti span:nth-child(4) { left: 55%; background: #288ad6; animation-delay: 0.1s; }
.order-success-popup__confetti span:nth-child(5) { left: 70%; background: #ff6b35; animation-delay: 0.25s; }
.order-success-popup__confetti span:nth-child(6) { left: 85%; background: #ffd400; animation-delay: 0.05s; }
.order-success-popup__confetti span:nth-child(7) { left: 15%; background: #1e88e5; animation-delay: 0.35s; width: 8px; height: 14px; }
.order-success-popup__confetti span:nth-child(8) { left: 60%; background: #c41e3a; animation-delay: 0.2s; width: 12px; height: 8px; }

.order-success-popup__mascot {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  animation: shuttleParty 0.8s ease-in-out infinite;
}

.order-success-popup__title {
  font-size: 22px;
  font-weight: 800;
  color: #1a5f2a;
  margin-bottom: 8px;
  animation: titleShake 0.5s ease 0.2s 2;
}

.order-success-popup__subtitle {
  font-size: 15px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.5;
}

.order-success-popup__funny {
  font-size: 14px;
  color: #e11b1e;
  font-weight: 600;
  margin-bottom: 14px;
  animation: funnyPulse 1s ease-in-out infinite;
}

.order-success-popup__hint {
  font-size: 12px;
  color: #888;
}

@keyframes successPopIn {
  0% { transform: scale(0.3) rotate(-8deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes successPopOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0; }
}

@keyframes shuttleParty {
  0%, 100% { transform: translateY(0) rotate(-10deg) scale(1); }
  25% { transform: translateY(-14px) rotate(8deg) scale(1.08); }
  50% { transform: translateY(-20px) rotate(-8deg) scale(1.12); }
  75% { transform: translateY(-10px) rotate(10deg) scale(1.05); }
}

@keyframes titleShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-1deg); }
  75% { transform: translateX(4px) rotate(1deg); }
}

@keyframes funnyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes confettiFall {
  0% {
    top: -10%;
    opacity: 1;
    transform: rotate(0deg) translateX(0);
  }
  100% {
    top: 110%;
    opacity: 0.6;
    transform: rotate(360deg) translateX(20px);
  }
}
