/* search (templates/components/search.html): the search page's options, one screen,
 * ranked by speed, and its short pages. The results are components/results.css. */

.topbar { padding: 16px var(--gutter); display: flex; align-items: center; gap: 12px; }
.topbar__title { font: var(--heading-weight) 16px/1.3 var(--display); text-transform: var(--heading-case); min-width: 0; }

.search--capture { min-height: 100svh; display: flex; flex-direction: column; }
.search__main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px var(--gutter) 24px;
}
/* The selfie's form lays its two cards out in .search__main's column, beside the
   slot's other options, which may be forms of their own. */
.search__selfie { display: contents; }
.search h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.search__lead { margin: -4px 0 4px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.search__main .notice { margin: 0; }
/* "One moment, many people are searching": the search goes again by itself (search.js). */
.search-busy { display: grid; gap: 6px; }
.search-busy p { margin: 0; }
.search-busy__title { font-weight: 600; color: var(--ink); }
.search-busy form { margin: 4px 0 0; }
.search-busy .btn { width: 100%; }

/* --- The option cards (also the slot's: c.bib_search, c.find_me) ----------------- */

.search-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
a.search-option:hover, label.search-option:hover { border-color: var(--border-strong); color: var(--ink); }
.search-option__icon {
  flex: none;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-control);
  background: var(--bg);
  color: var(--ink);
  font: 700 15px/1 var(--display);
}
.search-option__text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.search-option__title { font: 600 15px/1.3 var(--sans); }
.search-option__hint { font-size: 13px; line-height: 1.4; color: var(--muted); }
.search-option__chevron { flex: none; }

/* The fastest way, in the brand's color. */
.search-option--primary { padding: 16px; border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.search-option--primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); color: var(--on-brand); }
.search-option--primary .search-option__icon {
  width: 48px; height: 48px;
  background: color-mix(in srgb, var(--on-brand) 18%, transparent);
  color: var(--on-brand);
}
.search-option--primary .search-option__title { font: var(--heading-weight) 16px/1.3 var(--display); }
.search-option--primary .search-option__hint { color: var(--on-brand); opacity: 0.85; }
.search-option[aria-disabled="true"] { opacity: 0.6; cursor: progress; }

/* The camera and camera-roll inputs are visually hidden; their labels are the cards. */
.search__file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.search__file:focus-visible + .search-option { outline: 3px solid var(--brand); outline-offset: 2px; }

.search__privacy { margin: 0 var(--gutter) 32px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; }
.search__privacy svg { flex: none; margin-top: 2px; color: var(--muted); }
.search__privacy p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.page--search { max-width: min(var(--page-max), 1100px); }
.page--search:has(.search--capture) { max-width: 640px; }
/* The trust features' short pages (components/hide_me.html, notify_me.html). */
.page--search:has(.search--panel) { max-width: 640px; }

@media (min-width: 900px) {
  .search__main { width: 100%; max-width: 460px; margin: 0 auto; padding-top: 40px; }
  .search__privacy { max-width: 460px; margin-left: auto; margin-right: auto; }
}
.search__privacy a { color: var(--brand-text); white-space: nowrap; }
