/* Desktop top-bar autocomplete. The top bar itself remains owned by style.css. */
.top-search {
  position: relative;
}

.top-search-input {
  min-width: 0;
}

.top-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.top-search-clear[hidden],
.top-search-suggestions[hidden] {
  display: none !important;
}

.top-search-clear:hover {
  background: #f1f5f9;
  color: var(--text);
}

.top-search-clear:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.top-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.top-search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.top-search-suggestion:hover,
.top-search-suggestion.is-active {
  background: #f8fafc;
}

.top-search-suggestion:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.top-search-suggestion-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: #94a3b8;
}

.top-search-suggestion-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.3;
}

.top-search-suggestions-notice {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .top-search-suggestions {
    display: none !important;
  }
}
