/* LeafHub v2 — search dropdown. Loaded next to v2.css by _layout.php; kept in
   its own file so the shared stylesheet stays untouched. Uses v2.css tokens. */

.has-sg { position: relative; }

.sg {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-width: 100%;
  max-height: min(62vh, 460px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--card, #fff);
  border: 1.5px solid var(--line, #e6eedf);
  border-radius: var(--r-md, 16px);
  box-shadow: 0 14px 34px rgba(20, 60, 20, .16);
  padding: 6px;
}
.sg[hidden] { display: none !important; }

.sg-h {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--muted, #66756a);
  padding: 8px 10px 6px;
}

.sg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 7px 10px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.sg-row[aria-selected="true"],
.sg-row:hover { background: var(--g-wash, #f6faf0); }
.sg-row:focus-visible { outline: 3px solid var(--g-l, #3fa343); outline-offset: -2px; }

.sg-ic {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--g-soft, #eef6e4);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--g-d, #1f6f23);
}
.sg-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sg-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sg-t b {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sg-t small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #66756a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sg-p {
  flex: none;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--g-d, #1f6f23);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sg-p.soon { color: var(--muted, #66756a); font-weight: 700; }

.sg-none {
  padding: 14px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2, #3d4d41);
  line-height: 1.45;
}

@media (max-width: 760px) {
  /* sit above the phone dock, and never wider than the screen */
  .sg { max-height: min(56vh, 420px); }
  .sg-row { min-height: 56px; }
  .sg-t b { font-size: 15px; }
}
