/* Destination search box + suggestion dropdown (home hero, destinations). */

.dest-search {
  position: relative;
  max-width: 100%;
}

.dest-search__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-soft);
  font-size: 1rem;
  pointer-events: none;
}

.dest-search__input {
  width: 100%;
  padding: 15px 20px 15px 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-body);
  box-shadow: var(--shadow-card);
}

.dest-search__input::placeholder {
  color: var(--color-text-soft);
}

.dest-search__input:focus {
  outline: 2px solid var(--color-action);
  outline-offset: -1px;
}

/* Suggestions dropdown. A responsive grid (multiple columns on a wide box like
   the home hero, a single column when narrow) with compact rows, so the panel
   uses its width instead of a tall list of short "flag + name" rows with dead
   space to the right. Shared by every search bar (home hero + destinations). */
.dest-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 2px;
  align-content: start;
}

/* `display: grid` above overrides the `hidden` attribute's UA `display: none`,
   so re-assert it — otherwise the empty results box shows before any typing. */
.dest-search__results[hidden] {
  display: none;
}

.dest-search__results a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 10px;
  border-radius: var(--radius-btn);
  color: var(--color-text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dest-search__results a:hover,
.dest-search__results a:focus {
  background: var(--color-bg-alt);
  text-decoration: none;
}

.dest-search__results .fi {
  width: 22px;
  height: 16px;
  flex: none;
}

.dest-search__empty {
  grid-column: 1 / -1;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-soft);
}
