/* HomeLynx V8.0.163 — Glass Bottom Pass.
   Parent: V8.0.162.
   Scope: mobile search/browse geometry only.
   Goal: reclaim Safari glass, lower the field into the true browser-safe lane,
   widen it slightly, and let the results sheet consume the recovered space.
   No map data/gestures, pins, PSET, Worth, hopper/source-book, owner, routing,
   Neo answer, media, photo claim, or listing identity changes. */

@media(max-width:640px){
  :root{
    /* Safari already owns the physical home-indicator/browser chrome below the
       visual viewport. Do not add env(safe-area-inset-bottom) a second time.
       Keep only the provider/legal lane + keyboard lift. */
    --hlx-provider-strip:24px;
    --hlx-dock-h:56px;
    --hlx-dock-bottom-gap:0px;
    --hlx-dock-sheet-gap:0px;
    --hlx-dock-bottom:calc(var(--hlx-provider-strip) + var(--hlx-keyboard-inset,0px));
    --hlx-sheet-bottom:calc(var(--hlx-provider-strip) + var(--hlx-keyboard-inset,0px) + var(--hlx-dock-h));
  }

  /* Ten pixels of glass each side: still floating, but visually closer to the
     native iPhone edge discipline and less wasteful than the 14px pass. */
  .hlx-v8-searchrow.hlx-bottom-dock{
    width:calc(100vw - 20px)!important;
    max-width:590px!important;
    height:56px!important;
    min-height:56px!important;
    bottom:var(--hlx-dock-bottom)!important;
    padding:4px 8px!important;
    border-radius:7px!important;
  }
  .hlx-v8-searchrow.hlx-bottom-dock .hlx-v8-input{
    height:44px!important;
  }

  /* Keep the attachment chip rail mechanically tied to the same instrument. */
  .hlx-neo-attach-chiphost.hlx-bottom-dock-chiphost{
    width:calc(100vw - 20px)!important;
    max-width:590px!important;
    bottom:calc(var(--hlx-dock-bottom) + var(--hlx-dock-h) + 4px)!important;
  }

  /* Results now use the pixels recovered by removing Safari's duplicated safe
     inset. The sheet still terminates at the field, never under it. */
  .hlx-v8-sheet{
    bottom:var(--hlx-sheet-bottom)!important;
  }
}

/* Standalone/PWA/iOS-shell mode has no Safari toolbar protecting the physical
   home-indicator area, so restore the real safe-area inset there. */
@media(max-width:640px) and (display-mode:standalone){
  :root{
    --hlx-dock-bottom:calc(var(--hlx-provider-strip) + env(safe-area-inset-bottom,0px) + var(--hlx-keyboard-inset,0px));
    --hlx-sheet-bottom:calc(var(--hlx-provider-strip) + env(safe-area-inset-bottom,0px) + var(--hlx-keyboard-inset,0px) + var(--hlx-dock-h));
  }
}
