/* Popup Modal Styles */
.popup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: popupFadeIn 0.3s ease-out;
}

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

.popup-icon {
  font-size: 3rem;
  color: #2563eb;
  margin-bottom: 1rem;
}

.popup-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.popup-message {
  margin-bottom: 1.5rem;
  color: #64748b;
  line-height: 1.5;
}

.popup-close {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.popup-close:hover {
  background-color: #1d4ed8;
}

/* Form Loading State */
.form-loading {
  position: relative;
  pointer-events: none;
}

.form-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-loading .btn-text {
  visibility: hidden;
}

.form-loading .btn::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form Validation Styles */
.form-control.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-message {
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

/* Success State */
.form-control.success {
  border-color: #38a169;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* Responsive adjustments for popup */
@media (max-width: 768px) {
  .popup-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .popup-icon {
    font-size: 2.5rem;
  }

  .popup-title {
    font-size: 1.25rem;
  }
}
