/* Result row reuses .navrow geometry (declared in AppShell.css). This file adds
   only the row-internal layout and the active/highlight treatment. All values
   come from tokens.css — zero hard-coded hex/px. */

.search-result-row {
  width: 100%;
  align-items: flex-start; /* title row + snippet + sub-line stack */
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--color-text);
  font-family: var(--font-family-ui);
}

.search-result-row:hover {
  background: var(--color-tree-hover);
}

/* Keyboard/hover-active row — the EXACT .navrow-active treatment (UI-SPEC):
   active-bg fill + inset accent bar + accent title color. */
.search-result-row--active {
  background: var(--color-tree-active-bg);
  box-shadow: inset 2px 0 0 var(--color-accent);
}

.search-result-row--active .search-result-title {
  color: var(--color-accent);
}

.search-result-icon {
  color: var(--color-text-muted);
  flex: 0 0 auto;
  margin-top: var(--space-xs);
}

.search-result-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0; /* allow ellipsis truncation inside flex */
  flex: 1 1 auto;
}

.search-result-titlerow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.search-result-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}

.search-result-badge {
  flex: 0 0 auto;
}

.search-result-snippet {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-description {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-subline {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  color: var(--color-text-muted);
}

/* Matched-term highlight: weight-only. No background fill, no accent color —
   the only change applied to a matched substring is the semibold weight. */
.search-result-title strong,
.search-result-snippet strong,
.search-hl {
  font-weight: var(--font-weight-semibold);
  background: none;
  color: inherit;
}
