/* Custom styles for contact form messages */

.php-email-form .loading {
  display: none;
  background: #fff;
  text-align: center;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid #0d6efd;
  border-top-color: transparent;
  animation: animate-loading 1s linear infinite;
}

/* Success Message - سبز قشنگ */
.php-email-form .sent-message {
  display: none;
  color: #0f5132;
  background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
  text-align: center;
  padding: 18px;
  margin-top: 20px;
  margin-bottom: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid #a3cfbb;
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.2);
  animation: slideIn 0.5s ease-out;
  position: relative;
  overflow: hidden;
}

.php-email-form .sent-message:before {
  content: "✓";
  display: inline-block;
  margin-right: 10px;
  font-size: 24px;
  color: #198754;
  animation: checkmark 0.6s ease-in-out;
}

/* Error Message - قرمز قشنگ */
.php-email-form .error-message {
  display: none;
  color: #842029;
  background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
  text-align: center;
  padding: 18px;
  margin-top: 20px;
  margin-bottom: 15px;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid #f5c2c7;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
  animation: shake 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
}

.php-email-form .error-message:before {
  content: "✕";
  display: inline-block;
  margin-right: 10px;
  font-size: 24px;
  color: #dc3545;
  animation: errorPulse 0.6s ease-in-out;
}

/* Show messages */
.php-email-form .loading.d-block,
.php-email-form .error-message.d-block,
.php-email-form .sent-message.d-block {
  display: block !important;
}

/* Animations */
@keyframes animate-loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
  }
}

@keyframes errorPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .php-email-form .sent-message,
  .php-email-form .error-message {
    padding: 15px;
    font-size: 14px;
  }
}