/* search.css — the header search results dropdown (js/header-search.js).
 *
 * chrome.css owns the field, the panel box and the narrow-width dock; this
 * sheet is the CONTENTS of the panel, and loads after chrome.css so it refines
 * the base row without forking it.
 *
 * Two kinds of result, told apart by SHAPE before a word is read:
 *   a person  a round face, name in the text face, ID in mono below
 *   a group   a square ruled tile carrying its head count (mono: measured),
 *             topic in Fraunces — the publication's voice for group topics
 * Hover and the keyboard highlight stay one and the same treatment
 * (.hdr-opt:hover / .is-active in chrome.css).
 */

.hdr-panel { width: min(440px, calc(100vw - 2 * var(--s-gutter))); }

/* ---- section labels: a kicker and its count, on a hairline. */
.hdr-group-label {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4) var(--s-1);
}
.hdr-group-n {
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
}
.hdr-group + .hdr-group { border-top: var(--edge); }

/* ---- rows */
.hdr-opt { gap: var(--s-3); min-height: 52px; }

.hdr-opt-body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}
.hdr-opt-body .hdr-opt-name { flex: none; }

.hdr-opt-person .hdr-opt-name { font-weight: 600; }
.hdr-opt-person .avatar { flex: none; }

.hdr-opt-topic {
  font-family: var(--font-display);
  font-size: var(--t-base);
  font-weight: 520;
  letter-spacing: var(--tr-title);
  line-height: var(--lh-snug);
}

.hdr-opt-body .hdr-opt-id,
.hdr-opt-meta {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-3);
  font-size: var(--t-2xs);
  line-height: var(--lh-snug);
}
.hdr-opt-body .hdr-opt-id { font-family: var(--font-mono); font-size: var(--t-3xs); }

.hdr-opt-side { font-size: var(--t-2xs); white-space: nowrap; }

/* The group tile: square because a group is not a person. The count is a
 * measurement, so it is mono; an empty group's tile goes quiet, not coloured. */
.hdr-tile {
  flex: none;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border: var(--edge);
  border-radius: var(--r-1);
  background: var(--bg-sunk);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--t-2xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hdr-tile[data-empty='true'] { color: var(--ink-3); border-style: dashed; background: none; }

.hdr-opt:hover .hdr-opt-topic,
.hdr-opt.is-active .hdr-opt-topic,
.hdr-opt-person:hover .hdr-opt-name,
.hdr-opt-person.is-active .hdr-opt-name { color: var(--accent); }

/* ---- "see all": the way out, on its own rule, with its key. */
.hdr-opt-all {
  border-top: var(--edge);
  min-height: 44px;
}
.hdr-opt-key {
  flex: none;
  padding: 1px 6px;
  border: var(--edge-soft);
  border-radius: var(--r-1);
  color: var(--ink-3);
  font-size: var(--t-3xs);
  line-height: 1.4;
}

.hdr-empty {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-2);
}

/* Phone: the panel is the full-width dock (chrome.css). Follower counts are the
 * first thing to go; the name and ID matter more at 375px. */
@media (max-width: 29.9375rem) {
  .hdr-opt-person .hdr-opt-side { display: none; }
}

/* ── Find a group (#/groups, views/groups.js) ─────────────────────────────── */
.gf-form { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.gf-q { font-size: var(--t-md); min-height: 48px; }
.gf-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--s-3);
  align-items: end;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.gf-live {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.gf-live input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.gf-msg { margin-top: var(--s-5); font-size: var(--t-xs); color: var(--ink-3); min-height: 1.4em; }
.gf-list { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.gf-row {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-4) 0;
  border-top: var(--edge-soft);
  min-width: 0;
}
.gf-row:last-child { border-bottom: var(--edge-soft); }
.gf-status { font-size: var(--t-2xs); color: var(--ink-3); }
.gf-status.is-live { color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; gap: var(--s-1); }
.gf-foot { margin-top: var(--s-4); }
/* Practice now (#/talk, views/talk.js) */
.talk-stage { margin-top: var(--s-6); padding: var(--s-5); border: var(--edge-soft); border-radius: var(--r-2, 8px); min-width: 0; }
.talk-state { font-size: var(--t-lg, 1.4rem); margin: 0; overflow-wrap: anywhere; }
.talk-detail { margin-top: var(--s-2); color: var(--ink-2); min-height: 1.4em; }
.talk-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.talk-actions [hidden] { display: none; }
.talk-online { margin-top: var(--s-4); }
.talk-notes { margin-top: var(--s-5); padding-left: 1.2em; display: grid; gap: var(--s-1); }
/* Popular-topic chips (F34). Buttons, not .chip: .chip is a passive label. */
.gf-topics { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-4); min-width: 0; }
.gf-topics:empty { display: none; }
.gf-topics-label { flex-basis: 100%; }
.gf-topic {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 32px;
  padding: 2px var(--s-3);
  border: var(--edge-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--t-xs);
  cursor: pointer;
}
.gf-topic:hover, .gf-topic:focus-visible { color: var(--ink); border-color: var(--accent); }
.gf-topic[data-live='true'] { color: var(--ink); font-weight: 600; }
