/* v1.5.135: search presentation only. Load after mobile-app/ui-consistency.
   Keep the existing dialog, live region, result order and keyboard handlers. */
html body #searchOverlay .search-box {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}
html body #searchOverlay .search-input-wrap {
  min-width: 0;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-sunken);
}
html body #searchOverlay .search-input-wrap:focus-within {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
html body #searchOverlay #searchInput {
  min-width: 0;
  min-height: 44px;
  color: var(--ink);
}
html body #searchOverlay .search-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}
html body #searchOverlay .search-results {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 4px 12px 16px;
  scroll-padding-block: 8px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body #searchOverlay .search-result-item {
  min-height: 60px;
  padding: 10px;
  gap: 12px;
  margin-bottom: 4px;
  border: 1px solid var(--line-soft);
}
html body #searchOverlay .search-result-info {
  min-width: 0;
  gap: 4px;
}
html body #searchOverlay .search-result-title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
html body #searchOverlay .search-result-price {
  overflow-wrap: anywhere;
  line-height: 1.4;
}
html body #searchOverlay .search-result-item--all {
  min-height: 48px;
  margin-top: 10px;
  margin-bottom: 0;
  border: 1px solid var(--brand-soft);
  background: var(--brand-wash);
}
html body #searchOverlay .search-recent-head {
  gap: 12px;
  flex-wrap: wrap;
}
html body #searchOverlay .search-recent-clear {
  min-height: 44px;
}
html body #searchOverlay .search-hint {
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 12px 20px;
  line-height: 1.4;
}
@media (min-width: 901px) {
  html body #searchOverlay .search-box {
    /* Reserve overlay top/bottom padding explicitly; only results may shrink. */
    max-height: calc(100vh - clamp(var(--s-5), 10vh, 120px) - var(--s-5));
    max-height: calc(100dvh - clamp(var(--s-5), 10vh, 120px) - var(--s-5));
  }
  html body #searchOverlay .search-input-wrap {
    margin: 12px;
    padding: 6px 8px 6px 14px;
  }
}
@media (max-width: 900px) {
  /* Keep the mobile title/close button and safe-area shell authoritative. */
  html body #searchOverlay .search-results {
    padding-inline: 2px;
    padding-bottom: 16px;
  }
  html body #searchOverlay .search-hint { padding: 10px 12px; }
}
@media (forced-colors: active) {
  html body #searchOverlay .search-input-wrap:focus-within {
    outline-color: Highlight;
    border-color: Highlight;
  }
}
