/* Success State Animations for Contact Form */

.success-state--contact {
  padding: 3rem 2rem;
  text-align: center;
  animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon-wrapper {
  display: inline-block;
  margin-bottom: 0rem;
  position: relative;
}

.success-icon--animated {
  width: 120px;
  height: 120px;
  display: block;
}

/* Circle animation - draws the circle */
.success-circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: drawCircle 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

/* Checkmark animation - draws the checkmark */
.success-checkmark {
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: drawCheck 0.4s ease-out forwards;
  animation-delay: 0.6s;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Particles animation - flying sparkles */
.success-particle {
  opacity: 0;
  animation: particlePop 0.8s ease-out forwards;
}

.success-particle-1 {
  animation-delay: 0.8s;
}

.success-particle-2 {
  animation-delay: 0.9s;
}

.success-particle-3 {
  animation-delay: 1s;
}

.success-particle-4 {
  animation-delay: 1.1s;
}

.success-particle-5 {
  animation-delay: 1.2s;
}

.success-particle-6 {
  animation-delay: 1.3s;
}

@keyframes particlePop {
  0% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.5) translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: scale(1) translateY(-20px);
  }
}

/* Success icon pulse effect */
.success-icon-wrapper::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  width: 120px;
  height: 120px;
  background: rgba(198, 235, 8, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: pulse 1.5s ease-out infinite;
  animation-delay: 1.4s;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Title animation */
.success-state--contact .success-state__title {
  font-size: 2rem;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 1rem;
  opacity: 0;
  animation: slideUpFade 0.5s ease-out forwards;
  animation-delay: 1s;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Message animation */
.success-state--contact .success-state__message {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #FFF;
  margin-bottom: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: slideUpFade 0.5s ease-out forwards;
  animation-delay: 1.2s;
}

/* Submessage animation */
.success-state__submessage {
  font-size: 1rem;
  color: #FFF;
  opacity: 0;
  animation: slideUpFade 0.5s ease-out forwards;
  animation-delay: 1.4s;
}

.success-state__submessage strong {
  color: #C6EB08;
  font-weight: 600;
}

/* Button animation */
.success-state--contact .btn {
  opacity: 0;
  animation: slideUpFade 0.5s ease-out forwards;
  animation-delay: 1.6s;
  display: inline-block;
}

/* Hover effect for icon wrapper */
.success-icon-wrapper:hover .success-icon--animated {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .success-state--contact {
    padding: 1rem 0.5rem;
  }

  .success-icon--animated {
    width: 100px;
    height: 100px;
  }

  .success-icon-wrapper::before {
    width: 100px;
    height: 100px;
  }

  .success-state--contact .success-state__title {
    font-size: 1.5rem;
  }

  .success-state--contact .success-state__message {
    font-size: 1rem;
  }

  .success-state__submessage {
    font-size: 0.875rem;
  }
}
