* { box-sizing: border-box; }

.autocomplete {
  position: relative;
  display: inline-block;
}

/* ── Dropdown container ── */
.autocomplete-items {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 9999;
  max-height: 300px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.12) transparent;
}

.autocomplete-items::-webkit-scrollbar { width: 4px; }
.autocomplete-items::-webkit-scrollbar-track { background: transparent; }
.autocomplete-items::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.13); border-radius: 10px; }

/* ── Each row ── */
.autocomplete-items div {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  gap: 3px;
  cursor: pointer;
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hotel city items — single line label */
.hotel-ac-label {
  font-size: 13px;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.autocomplete-items div:last-child { border-bottom: none; }

/* ── Flag (sprite image) — now inside ac-country-wrap ── */
.autocomplete-items div > .flag {
  display: none;
}

/* ── Text block ── */
.ac-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Line 1: city+code on left, country on right ── */
.ac-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  line-height: 1.4;
  width: 100%;
}

.ac-city {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-country {
  font-size: 11px;
  color: #888;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Flag + Country wrapper (side by side, right side) ── */
.ac-country-wrap {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ac-country-wrap .flag {
  width: 16px;
  height: 11px;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Line 2: airport name on its own line below ── */
.ac-airport {
  font-size: 11px;
  color: #999;
  font-weight: 400;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
}

/* ── Matched letters highlight ── */
.autocomplete-items div strong {
  color: crimson;
  font-weight: bold;
}

/* ── Hover state with smooth transition ── */
.autocomplete-items div:hover {
  background-color: #dbeafe;
}

/* ── Keyboard-active state ── */
.autocomplete-active {
  background-color: #ffffff !important;
  transition: background-color 0.25s ease;
}

/* ── No match ── */
.autocomplete-items div.no-match {
  justify-content: center;
  color: #999;
  font-size: 12px;
  cursor: default;
  padding: 12px;
}

/* legacy — hidden */
.airport-text-left { display: none; }
.country-text { display: none; }

/* Elevate column when autocomplete is open - handled via CSS only */
