/* NYM DATA HUB - Custom Styles */

/* Mobile App-like Styles */
@media (max-width: 768px) {
  body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    /* Enable native scrolling */
    overflow-y: auto;
    min-height: 100vh;
    overscroll-behavior-y: none; /* Prevent pull-to-refresh on body if desired, or auto */
  }

  .app-container {
    height: auto; /* Allow content to dictate height */
    min-height: 100vh;
    overflow: visible; /* No internal scrolling */
  }

  .main-content {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
    height: auto; /* Remove fixed height */
    overflow: visible; /* Remove internal scrolling */
    -webkit-overflow-scrolling: touch;
  }

  /* Consistent Card Styling for Mobile */
  .network-packages .border,
  .bundle-card,
  .card,
  .order-item {
    border-width: 1px !important;
    border-style: solid !important;
    /* Color override removed to allow specific network colors */
  }

  /* Specific network border colors are now handled inline in PHP */
}

/* PWA Styles */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Dark mode enhancements */
.dark .prose {
  color: #e5e7eb;
}

.dark .prose strong {
  color: #ffffff;
}

.dark .prose a {
  color: #60a5fa;
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slideUp {
  animation: slideUp 0.3s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.3s ease-out;
}

/* Toast notifications */
.toast {
  animation: slideInRight 0.3s ease-out;
  z-index: 9999;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

.spinner-dark {
  border: 3px solid #374151;
  border-top: 3px solid #60a5fa;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Card hover effects */
.card-hover {
  transition: all 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .card-hover:hover {
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.5),
    0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Network indicator colors */
.network-mtn {
  background-color: #ffcc00;
}

.network-airteltigo {
  background-color: #ed1c24;
}

.network-telecel {
  background-color: #0099cc;
}

.network-vodafone {
  background-color: #e60000;
}

/* Status badges */
.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.dark .status-pending {
  background-color: #92400e;
  color: #fef3c7;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.dark .status-completed {
  background-color: #065f46;
  color: #d1fae5;
}

.status-failed {
  background-color: #fee2e2;
  color: #991b1b;
}

.dark .status-failed {
  background-color: #991b1b;
  color: #fee2e2;
}

/* Gradient backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Form styles */
.form-input {
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .form-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Table responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .main-content {
    padding: 0 !important;
    height: auto !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.dark .custom-scrollbar::-webkit-scrollbar-track {
  background: #374151;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #6b7280;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Utility classes */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Mobile safe areas */
.safe-top {
  padding-top: env(safe-area-inset-top);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.safe-left {
  padding-left: env(safe-area-inset-left);
}

.safe-right {
  padding-right: env(safe-area-inset-right);
}

/* Responsive notification dropdown */
@media (max-width: 640px) {
  #agentNotificationDropdown {
    position: fixed !important;
    top: 70px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 90vw !important;
    max-width: 350px !important;
    margin: 0 !important;
  }
}
