/* STS v5.6.149 - final header/search/tabs fix
   - Search results now float above the ticker/page instead of being clipped
   - Header no longer crushes nav tabs
   - Trending moved into More menu to give the tabs breathing room
*/
:root{
  --sts-head-h:86px;
  --sts-brand-w:500px;
  --sts-search-w:400px;
  --sts-nav-gap:20px;
}

html body.streamx-v5.twitch-v53 .tw-topbar.sts-glass-nav.sts-mockup-header,
body.streamx-v5.twitch-v53 .tw-topbar.sts-glass-nav.sts-mockup-header{
  position:sticky!important;
  top:0!important;
  z-index:999999!important;
  height:var(--sts-head-h)!important;
  min-height:var(--sts-head-h)!important;
  max-height:var(--sts-head-h)!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) var(--sts-search-w) auto!important;
  column-gap:26px!important;
  align-items:center!important;
  padding:0 18px!important;
  overflow:visible!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-left,
body.streamx-v5.twitch-v53 .sts-mock-left{
  min-width:0!important;
  width:100%!important;
  height:var(--sts-head-h)!important;
  display:grid!important;
  grid-template-columns:var(--sts-brand-w) minmax(500px,1fr)!important;
  align-items:center!important;
  gap:22px!important;
  overflow:visible!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-brand,
html body.streamx-v5.twitch-v53 .sts-mock-brand img,
body.streamx-v5.twitch-v53 .sts-mock-brand,
body.streamx-v5.twitch-v53 .sts-mock-brand img{
  width:var(--sts-brand-w)!important;
  min-width:var(--sts-brand-w)!important;
  max-width:var(--sts-brand-w)!important;
  height:82px!important;
  max-height:82px!important;
  object-fit:contain!important;
  object-position:left center!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-nav,
body.streamx-v5.twitch-v53 .sts-mock-nav{
  min-width:0!important;
  width:100%!important;
  height:82px!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  gap:var(--sts-nav-gap)!important;
  padding:0 0 17px!important;
  overflow:visible!important;
  white-space:nowrap!important;
  mask-image:none!important;
  -webkit-mask-image:none!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-nav a,
html body.streamx-v5.twitch-v53 .sts-mock-more-btn,
body.streamx-v5.twitch-v53 .sts-mock-nav a,
body.streamx-v5.twitch-v53 .sts-mock-more-btn{
  flex:0 0 auto!important;
  font-size:12px!important;
  letter-spacing:.135em!important;
  line-height:1!important;
  padding:0!important;
  margin:0!important;
  transform:none!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-more-wrap,
body.streamx-v5.twitch-v53 .sts-mock-more-wrap{
  position:relative!important;
  z-index:1000002!important;
  overflow:visible!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-more-menu,
body.streamx-v5.twitch-v53 .sts-mock-more-menu{
  z-index:1000003!important;
}

html body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search,
body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search{
  position:relative!important;
  z-index:1000001!important;
  justify-self:end!important;
  align-self:center!important;
  width:var(--sts-search-w)!important;
  min-width:var(--sts-search-w)!important;
  max-width:var(--sts-search-w)!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 48px!important;
  margin:0!important;
  overflow:visible!important;
  border:1px solid rgba(75,255,22,.82)!important;
  border-radius:2px!important;
  background:linear-gradient(180deg,#111722,#070b12)!important;
  box-shadow:0 0 0 1px rgba(0,0,0,.85) inset,0 0 18px rgba(75,255,22,.11)!important;
}

html body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search input,
body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search input{
  height:40px!important;
  line-height:40px!important;
  padding:0 15px!important;
  min-width:0!important;
  font-size:13px!important;
}

html body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search button,
body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search button{
  width:48px!important;
  min-width:48px!important;
  max-width:48px!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
}

/* THE IMPORTANT PART: keep the autocomplete/dropdown ABOVE ticker/content */
html body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search .sts-search-results,
body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search .sts-search-results{
  display:none!important;
  position:absolute!important;
  top:calc(100% + 9px)!important;
  left:0!important;
  right:auto!important;
  width:100%!important;
  min-width:100%!important;
  max-width:none!important;
  max-height:420px!important;
  overflow:auto!important;
  padding:8px!important;
  background:linear-gradient(180deg,#0b1018,#05070c)!important;
  border:1px solid rgba(75,255,22,.58)!important;
  border-radius:0 0 14px 14px!important;
  box-shadow:0 26px 90px rgba(0,0,0,.86),0 0 35px rgba(75,255,22,.13)!important;
  z-index:1000005!important;
}
html body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search .sts-search-results.open,
body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search .sts-search-results.open{
  display:block!important;
}

html body.streamx-v5.twitch-v53 .sts-mock-actions,
body.streamx-v5.twitch-v53 .sts-mock-actions{
  position:relative!important;
  z-index:1000001!important;
  height:var(--sts-head-h)!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:max-content!important;
}

html body.streamx-v5 .sts-crypto-ticker,
body .sts-crypto-ticker{
  position:relative!important;
  z-index:10!important;
}

/* Large screens: premium spacing */
@media(max-width:1700px){
  :root{--sts-brand-w:455px;--sts-search-w:360px;--sts-nav-gap:17px;}
  html body.streamx-v5.twitch-v53 .sts-mock-left,
  body.streamx-v5.twitch-v53 .sts-mock-left{grid-template-columns:var(--sts-brand-w) minmax(470px,1fr)!important;gap:18px!important;}
  html body.streamx-v5.twitch-v53 .sts-mock-nav a,
  html body.streamx-v5.twitch-v53 .sts-mock-more-btn,
  body.streamx-v5.twitch-v53 .sts-mock-nav a,
  body.streamx-v5.twitch-v53 .sts-mock-more-btn{font-size:11.5px!important;letter-spacing:.12em!important;}
}

@media(max-width:1450px){
  :root{--sts-brand-w:390px;--sts-search-w:320px;--sts-nav-gap:14px;}
  html body.streamx-v5.twitch-v53 .sts-mock-left,
  body.streamx-v5.twitch-v53 .sts-mock-left{grid-template-columns:var(--sts-brand-w) minmax(410px,1fr)!important;gap:14px!important;}
  html body.streamx-v5.twitch-v53 .sts-mock-nav a,
  html body.streamx-v5.twitch-v53 .sts-mock-more-btn,
  body.streamx-v5.twitch-v53 .sts-mock-nav a,
  body.streamx-v5.twitch-v53 .sts-mock-more-btn{font-size:10.5px!important;letter-spacing:.10em!important;}
}

@media(max-width:1180px){
  html body.streamx-v5.twitch-v53 .tw-topbar.sts-glass-nav.sts-mockup-header,
  body.streamx-v5.twitch-v53 .tw-topbar.sts-glass-nav.sts-mockup-header{
    grid-template-columns:1fr auto!important;
    height:auto!important;
    max-height:none!important;
    padding:7px 10px 9px!important;
    row-gap:8px!important;
  }
  html body.streamx-v5.twitch-v53 .sts-mock-left,
  body.streamx-v5.twitch-v53 .sts-mock-left{
    grid-column:1 / -1!important;
    grid-template-columns:270px minmax(0,1fr)!important;
    height:68px!important;
    overflow:hidden!important;
  }
  html body.streamx-v5.twitch-v53 .sts-mock-brand,
  html body.streamx-v5.twitch-v53 .sts-mock-brand img,
  body.streamx-v5.twitch-v53 .sts-mock-brand,
  body.streamx-v5.twitch-v53 .sts-mock-brand img{width:270px!important;min-width:270px!important;max-width:270px!important;height:64px!important;}
  html body.streamx-v5.twitch-v53 .sts-mock-nav,
  body.streamx-v5.twitch-v53 .sts-mock-nav{height:64px!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:none!important;}
  html body.streamx-v5.twitch-v53 .sts-mock-nav::-webkit-scrollbar,
  body.streamx-v5.twitch-v53 .sts-mock-nav::-webkit-scrollbar{display:none!important;}
  html body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search,
  body.streamx-v5.twitch-v53 .tw-search.sts-nav-search.sts-mock-search{grid-column:1!important;justify-self:stretch!important;width:100%!important;min-width:0!important;max-width:none!important;}
  html body.streamx-v5.twitch-v53 .sts-mock-actions,
  body.streamx-v5.twitch-v53 .sts-mock-actions{grid-column:2!important;height:42px!important;}
}

/* STS v5.6.150 - nav position tweak
   Moves the header tabs a little more left and up without squeezing them. */
html body.streamx-v5.twitch-v53 .sts-mock-nav,
body.streamx-v5.twitch-v53 .sts-mock-nav{
  transform:translate(-42px,-6px)!important;
  width:calc(100% + 42px)!important;
  padding:0 0 11px!important;
  gap:22px!important;
  overflow:visible!important;
}
html body.streamx-v5.twitch-v53 .sts-mock-nav a,
html body.streamx-v5.twitch-v53 .sts-mock-more-btn,
body.streamx-v5.twitch-v53 .sts-mock-nav a,
body.streamx-v5.twitch-v53 .sts-mock-more-btn{
  transform:none!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
@media(max-width:1700px){
  html body.streamx-v5.twitch-v53 .sts-mock-nav,
  body.streamx-v5.twitch-v53 .sts-mock-nav{
    transform:translate(-32px,-5px)!important;
    width:calc(100% + 32px)!important;
    gap:19px!important;
  }
}
@media(max-width:1450px){
  html body.streamx-v5.twitch-v53 .sts-mock-nav,
  body.streamx-v5.twitch-v53 .sts-mock-nav{
    transform:translate(-20px,-4px)!important;
    width:calc(100% + 20px)!important;
    gap:16px!important;
  }
}
@media(max-width:1180px){
  html body.streamx-v5.twitch-v53 .sts-mock-nav,
  body.streamx-v5.twitch-v53 .sts-mock-nav{
    transform:none!important;
    width:100%!important;
    padding:0 0 12px!important;
    gap:14px!important;
  }
}
