/* The search box on /ideas (src/search.ts, public/ideas-search.js). */
.idea-search { margin-top: var(--s6); max-width: 560px; }
.idea-search label { display: block; margin-bottom: var(--s2); font-weight: 600; font-size: 15px; }
.search-row { display: flex; gap: var(--s2); }
.search-row input {
  flex: 1; min-width: 0; min-height: 48px; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--pill); transition: border-color var(--fast), box-shadow var(--fast);
}
.search-row input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in oklab, var(--green) 30%, transparent); }
.search-row input::-webkit-search-cancel-button { cursor: pointer; }
/* With the script on, results show as you type, so the button only matters without it. */
.js-search .search-row .btn { display: none; }
/* One line is always kept for the count so the page doesn't shift when it appears. */
.search-count { min-height: 1.5em; margin: var(--s2) 0 0; color: var(--muted); font-size: var(--fs-small); }
.search-results { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); }
.search-results a {
  display: flex; flex-direction: column; gap: 2px; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease);
}
.search-results a:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.search-results a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-results strong { font-size: 15px; line-height: 1.3; }
.search-results span { color: var(--muted); font-size: 13px; }
.search-empty p { margin: var(--s2) 0; }
.search-suggest { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.search-suggest a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none;
}
.search-suggest a:hover { border-color: var(--border-strong); }
.search-suggest a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Results make the text column tall: keep the photo at the top instead of floating mid-column. */
.ideas-hero:has(.search-results, .search-empty) { align-items: start; }
@media (max-width: 560px) {
  .search-results { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .search-results a { transition: none; } .search-results a:hover { transform: none; } }
