/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* Button Loading State */
.button-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.button-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

/* Success Checkmark */
.success-checkmark {
  display: inline-block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1d6b50;
  position: relative;
  animation: scaleIn 0.3s ease-out;
}

.success-checkmark::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 14px;
  width: 16px;
  height: 28px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
  animation: checkmark 0.4s ease-out 0.3s both;
}

@keyframes scaleIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes checkmark {
  0% { height: 0; width: 0; opacity: 0; }
  40% { height: 0; width: 16px; opacity: 1; }
  100% { height: 28px; width: 16px; opacity: 1; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  padding: 16px 24px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.toast-success {
  border-left: 4px solid #1d6b50;
}

.toast-error {
  border-left: 4px solid #dc3545;
}

.toast-info {
  border-left: 4px solid #0d6efd;
}

.toast-icon {
  font-size: 24px;
}

.toast-message {
  flex: 1;
  color: #17332d;
  font-weight: 500;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #1d6b50;
  animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn 0.2s ease-out;
}

.loading-overlay-text {
  margin-top: 20px;
  font-size: 18px;
  color: #1d6b50;
  font-weight: 600;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
