/* Home search form: the form starts in the first screen, airports read as one line,
   and Search sits on the Dates row. Loaded after search-controls.css and date-picker.css. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Hero ---------------------------------------------------------------------- */
.hero { padding: 36px 0 64px; }
.hero-copy { margin-bottom: 26px; }
.hero-copy .eyebrow { margin-bottom: 12px; }
.hero h1 { font-size: clamp(36px, 4.2vw, 54px); line-height: 1.05; }
.hero .lede { max-width: 680px; margin-top: 14px; font-size: 17px; line-height: 1.55; }
.search-panel { padding: 24px 28px 22px; }

/* Trip type and travelers share one line ------------------------------------ */
.trip-option-controls { align-items: center; margin: 0 0 16px; }
.flight-search .passenger-control {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.flight-search .passenger-control select {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0 32px 0 12px;
  border-radius: 10px;
  background-color: #fff;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
}

/* Airports: one summary line, chips on demand -------------------------------- */
.route-fields .coverage-preview { padding: 4px 6px 4px 12px; }
.coverage-preview .airport-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
}
.coverage-preview .airport-summary::-webkit-details-marker { display: none; }
.coverage-preview .airport-summary:focus-visible { outline: 2px solid var(--blue, #4f46e5); outline-offset: 2px; border-radius: 8px; }
.coverage-preview .airport-summary-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.coverage-preview .airport-summary-text strong { font-size: 12px; line-height: 1.3; }
.coverage-preview .airport-summary-text span {
  margin: 0;
  overflow: hidden;
  color: var(--muted, #475569);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.coverage-preview .airport-summary-action {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 8px;
  color: var(--blue, #4f46e5);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.coverage-preview .airport-summary-action::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s;
}
.coverage-preview .airport-picker[open] .airport-summary-action::after { transform: translateY(2px) rotate(-135deg); }
.coverage-preview .airport-picker[open] { padding-bottom: 8px; }
/* An older rule stacks the chips in a column; they wrap in rows. */
.coverage-preview .airport-choices { flex-direction: row; margin-top: 4px; }

/* Dates, Cabin and Search on one row ----------------------------------------- */
.trip-fields.has-dp { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; }
.trip-fields #search-button { min-width: 0; min-height: 52px; padding: 0 26px; border-radius: 12px; white-space: nowrap; }

/* The budget-airline switch is a switch with its words beside it, not a 52px-tall input. */
.quick-switch input { min-height: 0 !important; }
.flight-search .quick-switch {
  flex-direction: row;
  align-self: end;
  gap: 10px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: #243d49;
}

/* Search options are already on the page; the floating filter button is for results. */
body:not(.results-mode) .mobile-filter-trigger-wrapper { display: none !important; }

/* Tactile tap states and transitions */
.dp-trigger {
  transition: border-color .15s, box-shadow .15s, background-color .15s, transform .1s ease;
}
.dp-trigger:active { transform: scale(0.985); }
#search-button {
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
#search-button:active { transform: scale(0.98); }
.swap-route {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.swap-route:active, .swap-route.is-swapping {
  transform: rotate(180deg) scale(0.92);
  background-color: var(--blue, #4f46e5);
  color: #fff;
  border-color: var(--blue, #4f46e5);
}
.location-option {
  transition: background-color 0.1s ease, transform 0.08s ease;
}
.location-option:active {
  background: var(--pale, #eef2ff);
  transform: scale(0.99);
}

@media (max-width: 760px) {
  .hero { padding: 24px 0 48px; }
  .hero-copy { margin-bottom: 20px; }
  .hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .hero .lede { font-size: 15px; }
  .search-panel { padding: 16px; }
  /* Enforce 16px on mobile inputs so iOS Safari never zooms the viewport on focus */
  .flight-search input, .flight-search select, .location-field input {
    font-size: 16px !important;
  }
  .trip-option-controls { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .trip-type { width: auto; }
  .flight-search .passenger-control select { width: auto; }
  .trip-fields.has-dp { grid-template-columns: minmax(0, 1fr); }
  .trip-fields #search-button { width: 100%; }
  /* Swap overlaps the gap between From and To instead of taking its own row. */
  .route-fields { position: relative; }
  .route-fields .swap-route { position: relative; z-index: 2; justify-self: end; margin: -22px 16px; }
}

@media (max-width: 640px) {
  /* Visual drag handle on top of mobile date picker sheet */
  .dp-pop::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: #cbd5e1;
    flex-shrink: 0;
  }
  html.dp-sheet-open body::after {
    cursor: pointer;
  }
}

