/* Final cascade layer for the shared search autocomplete.
   This file is intentionally loaded after the legacy layout bundle. */
.wl-app-shell .wl-search-typeahead {
  position: relative;
  width: 100%;
  min-width: 0;
}

.wl-app-shell .wl-search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 70;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: min(360px, 48dvh);
  overflow-x: hidden;
  overflow-y: auto;
}

.wl-app-shell .wl-search-suggestions > button[role="option"] {
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(12px, 1.2vw, 18px);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.wl-app-shell .wl-search-suggestion-type {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: clip;
  white-space: nowrap;
}

.wl-app-shell .wl-search-suggestion-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.wl-app-shell .wl-search-suggestion-main {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .wl-app-shell .wl-search-suggestions {
    max-height: min(320px, 42dvh);
  }

  .wl-app-shell .wl-search-suggestions > button[role="option"] {
    grid-template-columns: clamp(90px, 25vw, 105px) minmax(0, 1fr);
    column-gap: 10px;
  }

  .wl-app-shell .wl-search-suggestion-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .wl-app-shell .wl-search-suggestion-type {
    font-size: 9px;
  }

  .wl-app-shell .wl-search-suggestion-brand {
    display: none;
  }
}
