/* ═══════════════════════════════════════════════════════════
   css/search.css  —  SkyRoute Travel Flight Search Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Autocomplete Dropdown ── */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(12, 74, 110, 0.1);
  border-radius: 12px;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.autocomplete-dropdown::-webkit-scrollbar { width: 4px; }
.autocomplete-dropdown::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 2px; }

.ac-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid rgba(12, 74, 110, 0.05);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.focused { background: #f0f9ff; }

.ac-code { font-family: 'Cormorant Garamond', serif; font-weight: 800; font-size: 1rem; color: #0369a1; min-width: 36px; }
.ac-name { font-size: 0.8rem; color: #64748b; line-height: 1.3; }
.ac-name strong { color: #0f172a; font-weight: 600; }
.ac-country { font-size: 0.7rem; color: #94a3b8; margin-left: auto; flex-shrink: 0; }

/* ── Flight Result Cards ── */
.result-card {
  background: #ffffff;
  border: 1px solid rgba(12, 74, 110, 0.1);
  border-radius: 16px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  opacity: 1; visibility: visible; display: block;
}
.result-card:hover { border-color: #38bdf8; box-shadow: 0 8px 32px rgba(12, 74, 110, 0.06); transform: translateY(-2px); }

/* Force visibility override */
#results-list .result-card { opacity: 1 !important; visibility: visible !important; display: block !important; transform: none; }
#results-list .result-card:hover { transform: translateY(-2px) !important; }

/* ── Stop Badges ── */
.badge-nonstop { color: #059669; background: #ecfdf5; border: 1px solid #d1fae5; padding: 2px 10px; border-radius: 50px; font-size: 0.68rem; font-weight: 700; }
.badge-stop { color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; padding: 2px 10px; border-radius: 50px; font-size: 0.68rem; font-weight: 600; }

/* ── Seats Warning Badge ── */
.seats-badge { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 50px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #f87171; }

/* ── Price Calendar ── */
.cal-day { background: #f8fafc; border: 1px solid rgba(12,74,110,0.08); border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.cal-day:hover { border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.05); }
.cal-day.cheapest { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.06); }

/* ── Results Section ── */
#results-section { transition: none; }
#results-list { min-height: 100px; }

/* ── Loading Bar ── */
#loading-bar { transition: width 0.15s linear; }

/* ── Dot Loader ── */
.dot-loader span { width: 9px; height: 9px; border-radius: 50%; background: #0284c7; display: inline-block; animation: dotBounce 1.2s ease-in-out infinite; }
.dot-loader span:nth-child(2) { animation-delay: 0.2s; }
.dot-loader span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce { 0%,80%,100%{transform:scale(0.7);opacity:0.4;} 40%{transform:scale(1);opacity:1;} }

/* ── Filter Chips ── */
.filter-chip { padding: 6px 18px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; border: 1px solid rgba(12,74,110,0.1); background: transparent; color: #64748b; cursor: pointer; transition: all 0.2s; }
.filter-chip:hover { color: #0c4a6e; border-color: rgba(12,74,110,0.2); }
.filter-chip.active { background: rgba(56,189,248,0.1); border-color: #38bdf8; color: #0369a1; }

/* ── API Mode Badge ── */
#api-mode-badge { font-size: 0.72rem; font-weight: 600; padding: 4px 14px; border-radius: 50px; }

/* ── Destination Cards ── */
.dest-card { cursor: pointer; }

/* ── Autocomplete z-index boost when card is inside hero ── */
.search-card .autocomplete-dropdown,
.hero-bottom .autocomplete-dropdown {
  z-index: 9999 !important;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .result-card { padding: 16px !important; }
  .result-card .font-display[style*="font-size:1.5rem"] { font-size: 1.2rem !important; }
  #results-list .result-card > div { flex-direction: column; align-items: flex-start; gap: 16px; }
}