/* Search type-ahead dropdown (beta/suggest-box.mjs).
   A flat single list, no scrollbar, minimal chrome -- Baymard treats product rows, trending
   searches and extra panels inside a suggestion dropdown as visual noise, and says scrollbars
   "should be avoided", which is why the row budget is 9 and the list is never taller than its
   rows. The parent of the input needs position: relative; both search wrappers already have it,
   and the rule below is defensive for any new one. */
.header-search,
.large-search { position: relative; }

.suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--panel, #151410);
  border: 1px solid var(--line, rgba(245, 238, 224, 0.12));
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  max-height: none; /* 9 rows fit without scrolling, by design */
}
.suggest-list[hidden] { display: none; }

.sg-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--text, #f4f1e9);
}
/* Active row is shaded rather than outlined: DOM focus stays on the input, so this is the only
   signal that the keyboard is somewhere in the list. */
.sg-row.is-active { background: rgba(233, 190, 79, 0.14); }
.sg-row:hover { background: rgba(233, 190, 79, 0.08); }

.sg-label { flex: 1; min-width: 0; }
/* Tokens the person already typed are muted so the new information carries the emphasis. */
.sg-typed { color: var(--dim, #b2ac9e); }

/* The count that makes one row stand for a whole family of parallels. */
.sg-count {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold, #e9be4f);
  background: rgba(233, 190, 79, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
}
/* Recorded sales: quieter than the parallel count, because it is evidence rather than a label. */
.sg-sales {
  flex: none;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--dim, #b2ac9e);
}

/* Marks the echoed raw query so row 1 never looks like a card that exists. */
.sg-kind {
  flex: none;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint, #9a9280);
}

@media (max-width: 600px) {
  /* Baymard: "a target of 4-8 will work for most mobile users". The server still returns up to 9;
     hiding the tail keeps the list from covering the page on a phone. */
  .sg-row:nth-child(n + 8) { display: none; }
  .sg-row { padding: 11px 12px; font-size: 15px; }
}

/* The one line shown when 053's breadth guard declines a query ("prizm" alone matches 1.2M cards).
   Same panel as the dropdown so it reads as the same surface, but it is not a listbox and nothing
   in it can be arrowed onto or picked. */
.suggest-hint {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 10px 12px;
  background: var(--panel, #151410);
  border: 1px solid var(--line, rgba(245, 238, 224, 0.12));
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color: var(--dim, #b2ac9e);
  font-size: 0.9rem;
}
.suggest-hint[hidden] { display: none; }

/* Player and set rows (v2, beta_suggest_terms). The name leads at full strength; the category and
   card count sit beside it in the quiet colour; the kind badge is a small pill on the right so the
   eye can tell "Michael Jordan" (a player) from a card named after him without reading twice.
   Everything here follows the theme variables, so light mode (beta/styles.css) restyles it. */
.sg-meta {
  flex: none;
  font-size: 12px;
  color: var(--muted, var(--dim, #b2ac9e));
  white-space: nowrap;
}
.sg-kind-player,
.sg-kind-set {
  color: var(--gold, #e9be4f);
  background: var(--gold-soft, rgba(233, 190, 79, 0.12));
  border: 1px solid var(--line, rgba(245, 238, 224, 0.12));
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
}
/* A set is a place to browse rather than a person; keep its pill a shade quieter. */
.sg-kind-set { color: var(--faint, #9a9280); background: transparent; }
/* A completion (v2 step 3) is a query, not a thing: a plain quiet pill naming what the suffix adds
   (Grade, Set, Card #, Parallel); the typed words are muted so the suffix is what the eye lands on. */
.sg-kind-completion {
  color: var(--muted, var(--dim, #b2ac9e));
  border: 1px solid var(--line, rgba(245, 238, 224, 0.12));
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

@media (max-width: 600px) {
  /* The meta line is the first thing to give way on a narrow row. */
  .sg-meta { display: none; }
}
