/* Nigerian Flight Operations Calculator - Professional UI/UX Styles */

/* Custom Properties for Consistent Design System */
:root {
  /* Color Palette - High Contrast */
  --primary-blue: #1e40af;
  --primary-blue-light: #3b82f6;
  --primary-blue-dark: #1e3a8a;
  --secondary-indigo: #4338ca;
  --accent-green: #059669;
  --accent-emerald: #10b981;
  --accent-orange: #ea580c;
  --accent-purple: #7c3aed;
  --accent-red: #dc2626;
  
  /* Neutral Colors - Enhanced Contrast */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Typography */
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  
  /* Shadows - Enhanced Depth */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Borders */
  --border-radius-sm: 0.5rem;
  --border-radius-md: 0.75rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
}

/* Base Typography - Improved Readability */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 100%);
  min-height: 100vh;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Text Contrast */
h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: 700;
  letter-spacing: -0.025em;
}

p, span, div {
  color: var(--gray-700);
}

.text-gray-600 {
  color: var(--gray-600) !important;
}

.text-gray-500 {
  color: var(--gray-500) !important;
}

/* Navigation Enhancements */
nav {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Card Hover Effects - Professional Animation */
.hover\:shadow-xl:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* KPI Cards - Enhanced Visual Hierarchy */
.kpi-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid var(--gray-100);
  transition: all 0.3s ease;
}

.kpi-card:hover {
  border-color: var(--primary-blue-light);
  box-shadow: var(--shadow-xl);
}

/* Button Enhancements - Professional Styling */
button {
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

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

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

/* Focus States - Accessibility */
button:focus,
input:focus,
select:focus {
  outline: none;
  ring-width: 4px;
  ring-color: rgba(59, 130, 246, 0.3);
}

/* Input Styling - Enhanced UX */
input[type="number"],
input[type="range"],
select {
  transition: all 0.2s ease;
  font-weight: 500;
}

input[type="number"]:focus,
select:focus {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Range Slider Customization */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
  background: var(--gray-200);
  height: 6px;
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: var(--primary-blue);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-blue-dark);
  transform: scale(1.2);
}

input[type="range"]::-moz-range-track {
  background: var(--gray-200);
  height: 6px;
  border-radius: 3px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  background: var(--primary-blue);
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Table Enhancements - Professional Data Display */
table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--gray-800);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr {
  transition: all 0.2s ease;
}

tbody tr:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  transform: scale(1.005);
  box-shadow: var(--shadow-md);
}

/* Chart Container Styling - Enhanced Contrast */
.chart-container {
  background: #ffffff !important;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-xl);
  padding: 1.5rem;
}

/* Chart Background Override */
canvas {
  background: #ffffff !important;
}

/* Chart Text Contrast Enhancement */
.chartjs-render-monitor {
  background: #ffffff !important;
}

/* Loading Animation - Professional */
@keyframes pulse-professional {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.7; 
    transform: scale(1.05);
  }
}

.animate-pulse-pro {
  animation: pulse-professional 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Status Indicators - Enhanced Visibility */
.status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-active::after {
  background: rgba(34, 197, 94, 0.4);
}

.status-warning::after {
  background: rgba(251, 191, 36, 0.4);
}

/* Notification System */
.notification {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Aviation Theme Enhancements */
.aviation-accent {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  color: white;
}

.aviation-accent-secondary {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  color: white;
}

/* Nigerian Flag Colors Integration */
.nigeria-primary {
  background: linear-gradient(90deg, #008751 0%, #ffffff 50%, #008751 100%);
}

.nigeria-accent {
  border-left: 6px solid #008751;
  background: linear-gradient(90deg, rgba(0, 135, 81, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .grid {
    gap: 1rem;
  }
  
  .kpi-card {
    margin-bottom: 1rem;
  }
  
  table {
    font-size: 0.875rem;
  }
  
  .chart-container {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .text-4xl {
    font-size: 1.875rem;
  }
  
  .text-3xl {
    font-size: 1.5rem;
  }
  
  .px-8 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .py-8 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Dark Mode Support - Enhanced Contrast */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1f2937;
    --gray-100: #374151;
    --gray-200: #4b5563;
    --gray-300: #6b7280;
    --gray-400: #9ca3af;
    --gray-500: #d1d5db;
    --gray-600: #e5e7eb;
    --gray-700: #f3f4f6;
    --gray-800: #f9fafb;
    --gray-900: #ffffff;
  }
  
  body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 100%);
    color: var(--gray-900);
  }
  
  .bg-white {
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(20px);
    border-color: rgba(71, 85, 105, 0.3);
  }
  
  .chart-container {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.6) 100%);
  }
}

/* Print Styles - Professional Reports */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .bg-gradient-to-r,
  .bg-gradient-to-br,
  .bg-gradient-to-l {
    background: white !important;
  }
  
  .shadow-lg,
  .shadow-xl,
  .shadow-2xl {
    box-shadow: none !important;
  }
  
  .rounded-2xl,
  .rounded-xl,
  .rounded-lg {
    border: 1px solid #ccc !important;
  }
  
  button {
    display: none !important;
  }
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-blue: #0000ff;
    --accent-green: #008000;
    --accent-red: #ff0000;
    --gray-900: #000000;
    --gray-100: #ffffff;
  }
  
  button {
    border: 2px solid currentColor;
  }
  
  .bg-white {
    border: 2px solid #000000;
  }
}

/* Performance Optimizations */
.gpu-accelerated {
  will-change: transform;
  transform: translateZ(0);
}

/* Custom Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-scale {
  animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional Data Visualization */
.metric-positive {
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.metric-negative {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.metric-neutral {
  color: var(--gray-600);
  background: rgba(107, 114, 128, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
}