/* UGCHost V102 — global header lock, non-overlapping Creator ID search, and one visible action set. */

/* Legacy/page-specific headers must never win over the canonical UGCHost header. */
body > header:not(#ugcGlobalHeader),
body > .site-header,
body > .content-header,
body > .top-header,
body > .topbar,
body > .top-bar,
body > .main-header,
body > .app-header,
body > .dashboard-header,
body > .global-header,
body > .navbar,
body > .nav-bar{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}

#ugcGlobalHeader{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}

/* The top row gets three real columns: logo, Creator ID search, account/actions.
   No translated logo and no fluid search width are allowed to cross columns. */
@media (min-width:1181px){
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-top-inner{
    display:grid!important;
    grid-template-columns:minmax(260px,310px) 240px minmax(0,1fr)!important;
    align-items:center!important;
    column-gap:18px!important;
    width:100%!important;
    min-width:0!important;
  }

  #ugcGlobalHeader.ugh-two-row-v10 a.ugh-brand,
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-brand{
    grid-column:1!important;
    justify-self:start!important;
    transform:none!important;
    width:min(310px,100%)!important;
    min-width:260px!important;
    max-width:310px!important;
    margin:0!important;
    overflow:hidden!important;
  }

  #ugcGlobalHeader.ugh-two-row-v10 .ugh-creator-id-search-v11{
    grid-column:2!important;
    justify-self:start!important;
    width:240px!important;
    min-width:220px!important;
    max-width:240px!important;
    margin:0!important;
    overflow:visible!important;
  }
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-creator-id-search-v11 input{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  #ugcGlobalHeader.ugh-two-row-v10 .ugh-utilities{
    grid-column:3!important;
    justify-self:end!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    gap:7px!important;
    flex-wrap:nowrap!important;
  }

  /* V10 uses the top utility row for actions. Keep its old nav-action storage hidden. */
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-nav-actions{
    display:none!important;
    visibility:hidden!important;
    width:0!important;
    min-width:0!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    overflow:hidden!important;
  }

  #ugcGlobalHeader .ugh-mobile{display:none!important}
}

/* Compact desktops get slightly smaller fixed columns rather than allowing overlap. */
@media (min-width:1181px) and (max-width:1360px){
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-top-inner{
    grid-template-columns:270px 220px minmax(0,1fr)!important;
    column-gap:14px!important;
  }
  #ugcGlobalHeader.ugh-two-row-v10 a.ugh-brand,
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-brand{
    width:270px!important;
    min-width:270px!important;
    max-width:270px!important;
  }
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-creator-id-search-v11{
    width:220px!important;
    min-width:220px!important;
    max-width:220px!important;
  }
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-utilities{gap:5px!important}
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-utility,
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-secondary-cta,
  #ugcGlobalHeader.ugh-two-row-v10 .ugh-primary-cta{
    padding-left:9px!important;
    padding-right:9px!important;
    font-size:10.5px!important;
  }
}

/* Tablet/mobile still uses the collapsible menu and never displays both action sets. */
@media (max-width:1180px){
  #ugcGlobalHeader .ugh-brand{transform:none!important}
  #ugcGlobalHeader .ugh-mobile:not(.is-open){display:none!important}
  #ugcGlobalHeader .ugh-mobile.is-open{display:block!important}
  #ugcGlobalHeader .ugh-nav-actions{display:none!important}
}

@media (max-width:820px){
  #ugcGlobalHeader .ugh-mobile-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  #ugcGlobalHeader .ugh-mobile-actions>a{
    width:100%!important;
    min-width:0!important;
    justify-content:center!important;
    text-align:center!important;
  }
}
