/* Docs search — feature-scoped CSS extracted from zimun.css to
 * keep the core file under its 5000-line budget. Loaded only on
 * /documents/* pages where the search affordance ships. */

/* 18c+ docs UX: the search bar collapses behind a trigger button
 * by default — visible at all times but no longer dominating the
 * page. Click trigger → expand inline panel underneath. Escape /
 * click-outside collapse. Deep-link ``?q=`` lands expanded. */
.docs-search-shell { display:flex; flex-direction:column; align-items:flex-end; gap:12px; margin:0 0 24px; }
.docs-search-trigger {
  display:inline-flex; align-items:center; gap:8px;
  height:40px; padding:0 14px; min-width:unset;
  font:600 0.95rem/1 inherit; color:var(--primary-700);
  background:transparent; border:1px solid var(--border); border-radius:999px;
  cursor:pointer; transition:background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.docs-search-trigger:hover { background:rgba(145,123,102,0.08); border-color:var(--primary-600); }
.docs-search-trigger:focus-visible { outline:2px solid var(--primary-600); outline-offset:2px; }
.docs-search-trigger[aria-expanded="true"] {
  background:rgba(145,123,102,0.14); border-color:var(--primary-600); color:var(--primary-700);
}
.docs-search-trigger-icon { width:18px; height:18px; flex:0 0 auto; }
.docs-search-trigger-label { line-height:1; }
.docs-search-panel { margin:0; width:100%; }
.docs-search { display:grid; gap:10px; }
.docs-search-row { display:flex; align-items:center; gap:10px; }
.docs-search-input { width:100%; }
.docs-search-status { min-height:1.3em; color:var(--muted); font-size:0.92rem; line-height:1.45; }
.docs-search-actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.docs-search-clear { min-width:unset; }
.docs-search-results { display:grid; gap:8px; }
.docs-search-result { display:grid; gap:4px; padding:12px 14px; border:1px solid rgba(148,163,184,0.32); border-radius:14px; background:rgba(251,247,241,0.76); text-decoration:none; color:inherit; transition:border-color 0.2s ease, background 0.2s ease; }
.docs-search-result:hover,
.docs-search-result:focus-visible { border-color:var(--primary-600); background:rgba(251,247,241,0.92); }
.docs-search-result-section { font-size:12px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted); }
.docs-search-result-title { font:700 1rem/1.3 "Source Serif 4", Georgia, serif; color:var(--primary-700); }
.docs-search-result-snippet { margin:0; color:var(--ink); font-size:0.95rem; line-height:1.5; }
.docs-search-empty { color:var(--primary-700); font-weight:600; }

@media (max-width: 640px) {
  .docs-search-row { flex-direction:column; align-items:stretch; }
  .docs-search-actions { justify-content:flex-end; }
  .docs-search-clear { width:100%; }
  /* On 360px-class screens the trigger keeps its right-aligned
   * placement on its own row above the panel; the panel still
   * pushes content down (no overlay), per DesignAgent sign-off. */
  .docs-search-shell { align-items:flex-end; }
}
