/**
 * @file quick-find.css
 * @author Jouni Miikki
 * SPDX-License-Identifier: MIT
 * @description Find a place and jump to it (components/QuickFind.js): the field, the line about the
 *   keys, and the places in named groups, the chosen one on the dim ground inside a hairline. Colours
 *   from the style, the corner from the theme; a group's name is the row label (poster.css).
 * @version-history
 *   v1.1.0 — 2026-10-16 — The snippet is shown whole (no 2.6em cut), in the body colour; an item's ids
 *     on a typewriter line (`quick-find-meta`); the list may take 60vh.
 *   v1.0.1 — 2026-10-15 — The finder takes the width of the box it stands in instead of a 40rem
 *     minimum, which made the "Search everything" dialog scroll sideways.
 *   v1.0.0 — 2026-09-27 — Initial: the values of profile.css .cmdk* (the command palette), under the
 *     component's own names; the corner reads the theme's control corner, the group name is the row
 *     label (page group G9).
 */

/* As wide as the box it stands in, never wider: a fixed minimum of 40rem (from the old palette)
   was wider than the dialog's body, and the dialog scrolled sideways (Jouni, 2026-10-15). */
.quick-find {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}

.quick-find-hint {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: right;
}

.quick-find-list {
  max-height: 60vh;
  overflow: auto;
  margin-top: 0.2rem;
}

.quick-find-group {
  margin: 0.6rem 0 0.2rem;
}

.quick-find-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--shape-corner-control);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  color: var(--text);
  font: inherit;
}

.quick-find-item.is-sel,
.quick-find-item:hover {
  background: var(--bg-dim);
  border-color: var(--border);
}

.quick-find-label { font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; }
.quick-find-sub { font-size: 0.78rem; color: var(--text-dim); overflow-wrap: anywhere; }
/* The found words in their sentence, whole: the server sends a short window around them, and the
   finder shows all of it (a cut at 2.6em left a second line half drawn; Jouni, 2026-10-16). */
.quick-find-snippet {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}
/* The ids that address the place (a key, a workspace id), quiet and copyable. */
.quick-find-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
  overflow-wrap: anywhere;
  user-select: text;
}
