/* MOBIFIX Premium Mobile-First Styles */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: #F6F9FC;
  color: #0B1F3A;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Premium Glassmorphism Effects */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
  background: rgba(0, 51, 160, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 51, 160, 0.2);
}

/* Premium Gradient Backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, #0033A0 0%, #1E5EFF 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #1E5EFF 0%, #0033A0 100%);
}

.gradient-success {
  background: linear-gradient(135deg, #18A957 0%, #22C55E 100%);
}

/* Premium Card Shadows */
.card-shadow {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-shadow-lg {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Premium Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #0033A0 0%, #1E5EFF 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 51, 160, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 2px solid #0033A0;
  color: #0033A0;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #0033A0;
  color: white;
  transform: translateY(-2px);
}

/* Premium Input Styles */
.input-premium {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  width: 100%;
}

.input-premium:focus {
  outline: none;
  border-color: #0033A0;
  box-shadow: 0 0 0 3px rgba(0, 51, 160, 0.1);
}

/* Loading Animations */
.loading-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loading-bounce {
  animation: bounce 1s infinite;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .mobile-card {
    border-radius: 20px;
    margin: 16px;
  }
  
  /* Mobile-specific button sizes */
  .btn-primary, .btn-secondary {
    padding: 16px 20px;
    font-size: 16px;
  }
  
  /* Mobile input sizing */
  .input-premium {
    padding: 18px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

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

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #0033A0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1E5EFF;
}

/* Animation Utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0,-4px,0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

/* Uber-style Card Animations */
.uber-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
}

.uber-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Notification Animations */
.notification-enter {
  animation: slideInRight 0.3s ease-out;
}

.notification-exit {
  animation: slideOutRight 0.3s ease-out;
}

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

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

/* Map Container Styles */
.map-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.map-container::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.map-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Status Badge Styles */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pending {
  background-color: #FEF3C7;
  color: #92400E;
}

.status-confirmed {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.status-in-progress {
  background-color: #E0E7FF;
  color: #4338CA;
}

.status-completed {
  background-color: #D1FAE5;
  color: #065F46;
}

.status-cancelled {
  background-color: #FEE2E2;
  color: #991B1B;
}

/* Rating Stars */
.rating-stars {
  display: inline-flex;
  align-items: center;
}

.star {
  color: #D1D5DB;
  transition: color 0.2s ease;
}

.star.filled {
  color: #F59E0B;
}

.star:hover {
  color: #F59E0B;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #E5E7EB;
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step-circle.completed {
  background-color: #10B981;
  color: white;
}

.step-circle.active {
  background-color: #0033A0;
  color: white;
}

.step-circle.pending {
  background-color: #F3F4F6;
  color: #6B7280;
}

.step-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* Chat Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-message.own {
  flex-direction: row-reverse;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
}

.message-bubble.own {
  background-color: #0033A0;
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bubble.other {
  background-color: #F3F4F6;
  color: #1F2937;
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 4px;
}

.chat-input-container {
  padding: 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 8px 0;
}

.chat-send-button {
  background-color: #0033A0;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chat-send-button:hover {
  background-color: #1E5EFF;
}

/* Payment Styles */
.payment-method {
  display: flex;
  align-items: center;
  padding: 16px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-method:hover {
  border-color: #0033A0;
}

.payment-method.selected {
  border-color: #0033A0;
  background-color: rgba(0, 51, 160, 0.05);
}

.payment-icon {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #F3F4F6;
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .mobile-full {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
  }
  
  .mobile-card-spacing {
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    background-color: #0B1F3A;
    color: #F6F9FC;
  }
  
  .dark-mode .glass {
    background: rgba(11, 31, 58, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .dark-mode .card-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  }
}

/* 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;
}

.focus-visible {
  outline: 2px solid #0033A0;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-friendly {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
}