/* ==========================================================================
   1. Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111111;
  background-color: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased; /* Crisper text on macOS/iOS */
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. Preloader & Loading States
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0; /* Modern shorthand for top: 0; right: 0; bottom: 0; left: 0; */
  background-color: #ffffff;
  display: grid;
  place-items: center;
  z-index: 9999; /* Ensures it stays on top of all other content */
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out; /* Smooth fade-out when Flutter loads */
}

/* Add this to your existing .preloader styles */
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Crucial: allows clicks to pass through to the Flutter app */
}

/* Dark mode support for preloader */
.theme-dark .preloader {
  background-color: #111111;
  color: #ffffff;
}

/* The cab animation GIF */
.animation-image {
  display: block; /* FIXED: Changed from 'none' so the animation is actually visible */
  max-inline-size: 300px; /* Respects the HTML width="300" but keeps it responsive */
  block-size: auto;
  animation: animloaderimg 1.5s ease-in-out infinite; /* Applies the gentle bounce */
}

/* Skeleton/Placeholder utilities (if used by JS during loading) */
.placeholder {
  background-color: #e0e0e0;
  border-radius: 4px;
}

.theme-dark .placeholder {
  background-color: #333333; /* Adjusted from #555 for better contrast against #111 bg */
}

.placeholder-wide {
  inline-size: 12rem;
}

/* ==========================================================================
   3. Utility Classes (Flexbox & Spacing)
   ========================================================================== */
/* Layout */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }

/* Alignment */
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.text-center { text-align: center; }

/* Spacing (Gap) */
.gap-3 { gap: 1rem; }   /* 16px */
.gap-4 { gap: 1.5rem; } /* 24px */
.gap-5 { gap: 3rem; }   /* 48px */

/* ==========================================================================
   4. Keyframe Animations
   ========================================================================== */
/* Gentle bounce for the preloader image */
@keyframes animloaderimg {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1rem); 
  }
}

/* Sliding bar animation (Included for future use, e.g., top progress indicators) */
@keyframes animloader {
  0% {
    left: 0;
    transform: translateX(-100%);
  }
  100% {
    left: 100%;
    transform: translateX(0%);
  }
}