/* Vairo · Shared Airport/City Location Search — dropdown styles
 * ─────────────────────────────────────────────────────────────────────────────
 * Pairs with webapp/shared/location-search.js. One canonical style, replacing
 * 3 previously near-duplicate (but not identical) CSS blocks. Uses CSS custom
 * properties with safe fallbacks so it renders consistently even on pages
 * that don't define the same design-token vocabulary. */

.vls-wrap {
  position: relative;
}

.vls-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--color-bg-primary, var(--surface, #fff));
  border: 1px solid var(--color-border, var(--brand, #6366F1));
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  max-height: 280px;
  overflow-y: auto;
}

.vls-dropdown.vls-visible {
  display: block;
}

.vls-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-subtle, rgba(0, 0, 0, 0.06));
  transition: background 0.1s;
}

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

.vls-item:hover,
.vls-item.vls-highlighted {
  background: var(--color-bg-secondary, var(--surface-2, rgba(99, 102, 241, 0.08)));
}

.vls-code {
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent-primary, var(--brand, #6366F1));
  width: 40px;
  flex-shrink: 0;
}

.vls-info {
  flex: 1;
  min-width: 0;
}

.vls-name {
  font-size: 13px;
  color: var(--color-text-primary, var(--ink, #111827));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vls-detail {
  font-size: 12px;
  color: var(--color-text-secondary, var(--ink-3, #6b7280));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vls-loading,
.vls-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--color-text-secondary, var(--ink-3, #6b7280));
  text-align: center;
}

html[data-theme="dark"] .vls-dropdown,
[data-theme="dark"] .vls-dropdown {
  background: var(--color-bg-primary, var(--surface, #1f2430));
  border-color: var(--color-border, var(--brand, #6366F1));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .vls-item,
[data-theme="dark"] .vls-item {
  border-bottom-color: var(--color-border-subtle, rgba(255, 255, 255, 0.08));
}

html[data-theme="dark"] .vls-item:hover,
html[data-theme="dark"] .vls-item.vls-highlighted,
[data-theme="dark"] .vls-item:hover,
[data-theme="dark"] .vls-item.vls-highlighted {
  background: var(--color-bg-secondary, var(--surface-2, rgba(99, 102, 241, 0.16)));
}
