/* ============================================================
   WorthFlights Airport Autocomplete
   Matches the dark gold/teal theme of WorthFlights
   ============================================================ */

/* Wrapper positions the dropdown relative to input */
.wf-ac-wrapper {
  position: relative;
  width: 100%;
}

/* ============================================================
   DROPDOWN CONTAINER
   ============================================================ */
.wf-ac-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;

  background: #0d1f3c;
  border: 1px solid rgba(0, 201, 177, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;

  max-height: 320px;
  overflow-y: auto;

  animation: wfDropIn 0.18s ease both;
}

.wf-ac-dropdown.open {
  display: block;
}

@keyframes wfDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
.wf-ac-dropdown::-webkit-scrollbar { width: 4px; }
.wf-ac-dropdown::-webkit-scrollbar-track { background: transparent; }
.wf-ac-dropdown::-webkit-scrollbar-thumb {
  background: rgba(0, 201, 177, 0.3);
  border-radius: 2px;
}

/* ============================================================
   DROPDOWN ITEMS
   ============================================================ */
.wf-ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wf-ac-item:last-child {
  border-bottom: none;
}

.wf-ac-item:hover,
.wf-ac-item.highlighted {
  background: rgba(0, 201, 177, 0.1);
}

/* IATA Code Badge */
.wf-ac-code {
  flex-shrink: 0;
  background: rgba(245, 200, 66, 0.15);
  color: #f5c842;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'DM Sans', monospace;
  min-width: 42px;
  text-align: center;
}

/* Text block */
.wf-ac-text {
  flex: 1;
  overflow: hidden;
}

.wf-ac-city {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f0f4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'DM Sans', sans-serif;
}

.wf-ac-airport {
  font-size: 0.75rem;
  color: rgba(240, 244, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'DM Sans', sans-serif;
  margin-top: 1px;
}

/* Country flag emoji */
.wf-ac-flag {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
}

/* ============================================================
   HIGHLIGHT MATCHED TEXT
   ============================================================ */
.wf-ac-item mark {
  background: transparent;
  color: #00c9b1;
  font-weight: 700;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.wf-ac-empty {
  padding: 1.2rem 1rem;
  text-align: center;
  color: rgba(240, 244, 255, 0.4);
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
}

/* ============================================================
   INPUT ACTIVE STATE (when dropdown is open)
   ============================================================ */
.wf-ac-input-active {
  border-color: rgba(0, 201, 177, 0.5) !important;
  background: rgba(0, 201, 177, 0.06) !important;
}
