/* --- V12.1.3 Master Stylesheet --- */

/* --- Global Reset --- */
body {
  background-color: #f0f2f5;
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --- Ultra Slim Navigation --- */
.app-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 0;
  text-align: center;
}

.nav-brand {
  color: white !important;
  text-decoration: none !important;
  font-size: 18px;
  font-weight: 800;
}

/* --- Master Container --- */
.app-container,
.unified-app-wrapper,
.results-page-wrapper {
  width: 95% !important;
  max-width: 750px !important;
  margin: 20px auto !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
}

/* --- Unified Card Design --- */
/* Reduced padding from 30px to 20px for better vertical space */
form,
.flight-card,
.card {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 20px;
  border: none !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* --- Inputs & Buttons --- */
input,
select,
.form-control,
.form-select {
  height: 48px; /* Slightly shorter than 52px to save space */
  border-radius: 12px !important;
  border: 1px solid #ddd !important;
  margin-bottom: 12px; /* Reduced from 18px */
  font-size: 16px;
}

button[type="submit"],
.btn-search {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  height: 52px;
  border-radius: 14px;
  font-weight: 700;
  width: 100%;
  border: none;
  cursor: pointer;
}

/* =============================================
   MOBILE COMPACT UI (Kills the "Empty Space")
   ============================================= */
/* V12.1.3: Total Mobile Compression & Gap Elimination */
@media (max-width: 768px) {
  /* 1. Pull the whole app to the very top edge */
  .app-container, .container, main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* 2. Shrink the white card's internal padding (Side red rectangles) */
  form, .card, .flight-card {
    padding: 10px 12px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
  }

  /* 3. Collapse the space between rows (The horizontal red rectangles) */
  .row, .mb-3, .mb-4, .form-group {
    margin-bottom: 5px !important; /* Force rows to hug each other */
    margin-top: 0 !important;
  }

  /* 4. Shrink the height of the input boxes and drop-downs */
  input, select, .form-control, .form-select {
    height: 34px !important; /* Significant height reduction */
    margin-bottom: 2px !important;
    font-size: 0.9rem !important;
    padding: 2px 8px !important;
  }

  /* 5. Pull labels right against the inputs */
  .form-label, label {
    margin-bottom: 0px !important;
    font-size: 0.75rem !important;
    font-weight: 700;
    display: block;
  }

  /* 6. Tighten the Title and hide the tagline */
  h2, .card-title {
    font-size: 1.1rem !important;
    margin: 0 !important;
  }
  .text-muted {
    display: none !important; /* Hiding this saves ~40px of space */
  }

  /* 7. Align the Search and Clear buttons tightly */
  .d-flex.gap-2 {
    margin-top: 8px !important;
    gap: 8px !important;
  }

  button[type="submit"], .btn-search {
    height: 42px !important;
  }
  
  .btn-outline-secondary {
    height: 42px !important;
    padding: 0 10px !important;
  }
}