/* Custom animations and styles for PayFast */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* African-inspired gradient animations */
@keyframes african-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.african-gradient {
  background: linear-gradient(-45deg, #1B5E20, #FF8F00, #1565C0, #2E7D32);
  background-size: 400% 400%;
  animation: african-gradient 15s ease infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #1B5E20;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0d4715;
}

/* Button hover effects */
button {
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Card hover effects */
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.pulse-ring {
  animation: pulse-ring 2s infinite;
}

/* Success animation */
@keyframes success-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.success-bounce {
  animation: success-bounce 0.6s;
}

/* Mobile-specific optimizations */
@media (max-width: 640px) {
  /* Larger touch targets */
  button, a, input, select {
    min-height: 44px;
  }
  
  /* Better text readability */
  body {
    font-size: 16px;
    line-height: 1.5;
  }
  
  /* Prevent zoom on input focus */
  input, select, textarea {
    font-size: 16px;
  }
}

/* Focus styles for accessibility */
button:focus, 
input:focus, 
select:focus {
  outline: 2px solid #1B5E20;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-primary {
    background-color: #000000 !important;
  }
  
  .text-primary {
    color: #000000 !important;
  }
  
  .border-primary {
    border-color: #000000 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, 
  *::before, 
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
  }
}

/* Custom utilities */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-top {
  padding-top: env(safe-area-inset-top);
}

/* Notification styles */
.notification-enter {
  opacity: 0;
  transform: translateY(-100%);
}

.notification-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.notification-exit {
  opacity: 1;
  transform: translateY(0);
}

.notification-exit-active {
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.3s ease;
}

/* Transaction status indicators */
.status-completed {
  background-color: #dcfce7;
  color: #166534;
}

.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-failed {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-animation 2s infinite;
}

@keyframes skeleton-animation {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}