/* search-strip.css -- Scroll-aware sizing for the Qwant search strip
   (the site's web-search bar) + light theming for its engine dropdown.
   Loaded only by pages that carry .search-strip (index, immutable,
   private-browsing-myths, status). Paired with search-strip.js and the
   html.nav-scrolled state set by pill-nav.js's scroll handler (same
   scrollY > 40 trigger as the pill's own condense, so the bar and the
   pill move as one system, with the pill's own .3s ease).

   How the no-overlap guarantee works:
   - The strip is sticky, pinned directly beneath the fixed pill. Its
     `top` equals the pill's height in both pill states (rest and
     condensed), at both breakpoint bands, so the strip's top edge meets
     the pill's bottom edge and never slides underneath it.
   - Pill heights: >940px rest 84px (14+56+14), condensed 72px (8+56+8);
     <=940px rest 68px (12+44+12), condensed 60px (8+44+8).
   - On scroll the strip also MOVES ITS WIDTH: the container narrows
     from the pill row's 1400px rhythm to 1080px and its vertical
     padding tightens, transitioning with the same .3s ease.
   - z-index 1100 keeps the strip below the pill (1200) and its menus,
     and above page content it pins over. */

/* The pages' legacy critical CSS sets overflow-x:hidden on html/body.
   That turns an ancestor into a scroll container, which silently
   disables position:sticky (the strip computed as sticky but scrolled
   away -- verified in Firefox). overflow-x:clip provides the same
   no-horizontal-scroll guarantee WITHOUT creating a scroll container,
   so the strip can pin. Scoped to the pages that load this sheet. */
html, body{ overflow-x:clip; }

/* --- sticky pinning + width movement --- */
.search-strip{
  position:sticky;
  top:84px;
  z-index:1100;
  transition:top .3s ease, padding .3s ease;
}
.search-strip .search-container{
  padding-left:22px;
  padding-right:22px;
  transition:max-width .3s ease, padding .3s ease;
}
html.nav-scrolled .search-strip{
  top:72px;
  padding-top:.55rem;
  padding-bottom:.55rem;
}
html.nav-scrolled .search-strip .search-container{
  max-width:1080px;
}

@media (max-width:940px){
  /* measured pill heights in this band are ~1.6px taller than the
     nominal padding math (69.55 rest / 61.55 condensed), so the tops
     carry a small clearance to keep the boxes from ever touching */
  .search-strip{ top:70px; }
  html.nav-scrolled .search-strip{ top:62px; }
}
@media (max-width:600px){
  /* keep the pages' own small-screen container padding */
  .search-strip .search-container{ padding-left:1rem; padding-right:1rem; }
  /* some pages lack the small-screen form restyle the homepage has;
     without min-width:0 the input refuses to shrink and the form
     overflows a 360px viewport once the dropdown is in the row */
  .search-strip .search-input{ min-width:0; }
  .search-strip .search-btn{ flex:0 0 auto; }
}
@media (prefers-reduced-motion: reduce){
  .search-strip, .search-strip .search-container{ transition:none !important; }
}

/* --- engine dropdown: a plain native <select>, lightly themed to
   match the bar. Text names only -- no logo marks of any kind. --- */
.search-strip .engine-select{
  flex:0 0 auto; align-self:center;
  font:inherit; font-size:.9rem; cursor:pointer;
  color:var(--pill-ink, #f2f5f2);
  background:var(--pill-glass2, rgba(18,28,22,.96));
  border:1px solid var(--pill-line, rgba(46,204,113,.25));
  border-radius:8px; padding:.45rem .5rem; margin:6px 0 6px 6px;
  max-width:9.5rem; min-height:38px;
}
.search-strip .engine-select:focus-visible{
  outline:2px solid var(--pill-green-hi, #4be389); outline-offset:2px;
}
@media (max-width:600px){
  .search-strip .engine-select{ margin:0; max-width:7.25rem; height:48px; }
}
