/**
 * R10.39.7 — mobile-stable smart header.
 *
 * Permanent iOS/Android fix for the visual "vibration" caused by transforming
 * multiple sticky siblings while browser chrome expands/collapses. On phones
 * the complete public header is now one fixed composited shell. The shell moves
 * as a single layer and its document space is preserved by a measured spacer.
 * Scrolling down hides utility + brand rows and leaves only categories visible;
 * scrolling up restores the complete header.
 */

.ubp-public-header-shell{display:contents}
.ubp-public-header-spacer{display:none}

@media(max-width:780px){
  :root{
    --ubp-mobile-shell-h:154px;
    --ubp-mobile-hide-h:100px;
    --ubp-mobile-category-h:54px;
    --ubp-mobile-header-speed:250ms;
    --ubp-mobile-header-ease:cubic-bezier(.22,.78,.2,1);
  }

  html{
    scroll-padding-top:var(--ubp-mobile-category-h)!important;
  }

  body.fazfood-public{
    --ubp-public-sticky-offset:var(--ubp-mobile-shell-h)!important;
  }

  /* One fixed layer only. This is intentionally not position:sticky: Safari's
     dynamic browser chrome can repeatedly resolve sticky positions by 1-3px. */
  body.fazfood-public .ubp-public-header-shell{
    display:block!important;
    position:fixed!important;
    inset:0 0 auto 0!important;
    width:100%!important;
    z-index:920!important;
    transform:translate3d(0,0,0)!important;
    -webkit-transform:translate3d(0,0,0)!important;
    transition:transform var(--ubp-mobile-header-speed) var(--ubp-mobile-header-ease)!important;
    will-change:transform!important;
    backface-visibility:hidden!important;
    -webkit-backface-visibility:hidden!important;
    contain:layout paint style!important;
    background:#fff!important;
    box-shadow:0 5px 16px rgba(15,23,42,.10)!important;
  }

  body.fazfood-public .ubp-public-header-spacer{
    display:block!important;
    width:100%!important;
    height:var(--ubp-mobile-shell-h)!important;
    min-height:var(--ubp-mobile-shell-h)!important;
    pointer-events:none!important;
    visibility:hidden!important;
  }

  /* Neutralize the two older sticky layers inside the new fixed shell. */
  body.fazfood-public .ubp-public-header-shell .faz-topbar,
  body.fazfood-public .ubp-public-header-shell .theme-site-header.faz-header,
  body.fazfood-public .ubp-public-header-shell #site-header,
  body.fazfood-public.ubp-nav-compact:not(.nav-open) .ubp-public-header-shell .faz-topbar,
  body.fazfood-public.ubp-nav-compact:not(.nav-open) .ubp-public-header-shell .theme-site-header.faz-header,
  body.fazfood-public.ubp-nav-compact:not(.nav-open) .ubp-public-header-shell #site-header,
  body.fazfood-public.ubp-nav-expanded .ubp-public-header-shell .faz-topbar,
  body.fazfood-public.ubp-nav-expanded .ubp-public-header-shell .theme-site-header.faz-header,
  body.fazfood-public.ubp-nav-expanded .ubp-public-header-shell #site-header{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    -webkit-transform:none!important;
    transition:none!important;
    will-change:auto!important;
    backface-visibility:visible!important;
    -webkit-backface-visibility:visible!important;
  }

  body.fazfood-public .ubp-public-header-shell .faz-topbar{
    z-index:auto!important;
    box-shadow:none!important;
  }
  body.fazfood-public .ubp-public-header-shell .theme-site-header.faz-header,
  body.fazfood-public .ubp-public-header-shell #site-header{
    z-index:auto!important;
    isolation:auto!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  /* The entire shell moves once. Category rail lands exactly at viewport top. */
  body.fazfood-public.ubp-nav-compact:not(.nav-open) .ubp-public-header-shell{
    transform:translate3d(0,calc(-1 * var(--ubp-mobile-hide-h)),0)!important;
    -webkit-transform:translate3d(0,calc(-1 * var(--ubp-mobile-hide-h)),0)!important;
    box-shadow:0 5px 15px rgba(15,23,42,.12)!important;
  }
  body.fazfood-public.ubp-nav-expanded .ubp-public-header-shell,
  body.fazfood-public.nav-open .ubp-public-header-shell{
    transform:translate3d(0,0,0)!important;
    -webkit-transform:translate3d(0,0,0)!important;
  }

  /* Stable, explicitly-sized brand row. Logo never scales while scrolling. */
  body.fazfood-public .ubp-public-header-shell .site-header-inner{
    height:62px!important;
    min-height:62px!important;
    max-height:62px!important;
    padding-top:7px!important;
    padding-bottom:7px!important;
    box-sizing:border-box!important;
  }
  body.fazfood-public .ubp-public-header-shell .brand.faz-brand{
    min-width:0!important;
    min-height:42px!important;
    height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    transform:none!important;
    transition:none!important;
  }
  body.fazfood-public .ubp-public-header-shell .brand-logo{
    display:block!important;
    width:118px!important;
    max-width:118px!important;
    height:38px!important;
    max-height:38px!important;
    object-fit:contain!important;
    object-position:left center!important;
    transform:none!important;
    -webkit-transform:none!important;
    transition:none!important;
    animation:none!important;
  }

  /* Category navigation is the only surface visible in compact state. */
  body.fazfood-public .ubp-public-header-shell .faz-category-bar.menu-category-bar{
    position:relative!important;
    inset:auto!important;
    height:var(--ubp-mobile-category-h)!important;
    min-height:var(--ubp-mobile-category-h)!important;
    z-index:2!important;
    transform:none!important;
    -webkit-transform:none!important;
    transition:none!important;
    background:#fff!important;
    border-bottom:1px solid rgba(15,23,42,.08)!important;
  }
  body.fazfood-public .ubp-public-header-shell .faz-category-bar.menu-category-bar .faz-category-scroll{
    height:var(--ubp-mobile-category-h)!important;
    min-height:var(--ubp-mobile-category-h)!important;
    scroll-behavior:auto!important;
    overscroll-behavior-x:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x pan-y!important;
  }

  /* Do not animate individual children; only the single shell is animated. */
  body.fazfood-public .ubp-public-header-shell *,
  body.fazfood-public .ubp-public-header-shell *::before,
  body.fazfood-public .ubp-public-header-shell *::after{
    scroll-margin-top:0;
  }

  body.fazfood-public.nav-open .ubp-public-header-shell{
    z-index:13000!important;
    contain:none!important;
  }
  body.fazfood-public.nav-open .theme-site-header,
  body.fazfood-public.nav-open #site-header{
    top:auto!important;
    transform:none!important;
    -webkit-transform:none!important;
  }

  html[data-ubp-theme="dark"] body.fazfood-public .ubp-public-header-shell{
    background:#111318!important;
    box-shadow:0 5px 18px rgba(0,0,0,.32)!important;
  }
  html[data-ubp-theme="dark"] body.fazfood-public .ubp-public-header-shell .faz-category-bar.menu-category-bar{
    background:#151820!important;
    border-bottom-color:rgba(255,255,255,.10)!important;
  }
}

@media(max-width:390px){
  body.fazfood-public .ubp-public-header-shell .brand-logo{
    width:108px!important;
    max-width:108px!important;
  }
}

@media(max-width:780px) and (prefers-reduced-motion:reduce){
  body.fazfood-public .ubp-public-header-shell{transition:none!important}
}
