/* ============================================================
   site-search.css — the homepage's search box and its results panel
   (2026-10-29, site-search.js). Phones: the first thing in the sheet;
   desktop: under the poster's two buttons (.czf-desk).
   ============================================================ */
.czf { position: relative; margin: 0; }
.czf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.czf input {
  display: block; width: 100%; box-sizing: border-box; height: 50px; margin: 0; padding: 0 46px 0 48px;
  border-radius: 999px; border: 1px solid var(--line, rgba(127, 127, 127, .25)); background: var(--surface, #fff);
  color: var(--text); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; box-shadow: none;
}
.czf input::placeholder { color: var(--muted); opacity: 1; }
.czf input::-webkit-search-cancel-button { display: none; }
.czf input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* the magnifier, drawn */
.czf::before { content: ""; position: absolute; left: 19px; top: 16px; width: 13px; height: 13px; border: 2px solid var(--muted); border-radius: 50%; pointer-events: none; }
.czf::after { content: ""; position: absolute; left: 32px; top: 30px; width: 7px; height: 2px; background: var(--muted); transform: rotate(45deg); border-radius: 2px; pointer-events: none; }
.czf-clear {
  position: absolute; right: 8px; top: 7px; display: none; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font: 700 20px/1 system-ui, sans-serif; cursor: pointer;
}
.czf.has-q .czf-clear { display: grid; }

/* desktop: under the poster's buttons, centred */
.czf.czf-desk { width: 560px; max-width: calc(100vw - 48px); margin: 18px auto 0; text-align: left; }
.czf.czf-desk input { height: 54px; background: color-mix(in srgb, var(--surface, #fff) 92%, transparent); }
.czf.czf-desk::before { top: 18px; }
.czf.czf-desk::after { top: 32px; }
.czf.czf-desk .czf-clear { top: 9px; }

/* the results: fixed under the box (site-search.js places it) */
.czf-panel {
  position: fixed; z-index: 120; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  border-radius: 20px; border: 1px solid var(--line, rgba(127, 127, 127, .25)); background: var(--surface, #fff); color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28); animation: czfIn .16s ease-out;
}
.czf-panel[hidden] { display: none; }
@keyframes czfIn { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .czf-panel { animation: none; } }
.czf-h { margin: 8px 10px 4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.czf-h:first-child { margin-top: 2px; }
.czf-r { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 14px; color: var(--text); text-decoration: none; }
.czf-r:hover, .czf-r.on { background: color-mix(in srgb, var(--text) 7%, transparent); }
.czf-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-soft, color-mix(in srgb, var(--text) 6%, transparent)); }
.czf-ic img { width: 30px; height: 30px; }
.czf-t { display: grid; gap: 1px; min-width: 0; }
.czf-t b { font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.czf-t small { font-size: 12.5px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.czf-none { margin: 0; padding: 14px 10px; font-size: 14px; color: var(--muted); }

/* short phones: the box costs ~50px the sheet doesn't have, so it gets it
   back (hub-fit-ui: the lit picker card must still clear the tab bar) */
@media (max-height: 740px) {
  html.cz-app .czf input { height: 44px; }
  html.cz-app .czf::before { top: 13px; }
  html.cz-app .czf::after { top: 27px; }
  html.cz-app .czf-clear { top: 4px; }
  /* the picker's heading: kept for screen readers, the hint under it says what to do */
  html.cz-app:not(.hub-off) .hub-pick .pk-h { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0 !important; }
}
@media (max-height: 700px) {
  /* and the Today card's title row */
  html.cz-app:not(.hub-off):root:root:root body .hub-sheet .tc-big .tc-head { display: none; }
}
