/* TradesFolks 18.4.39 — Responsive Auth Header Compacting
   Keeps account name visible while reducing action widths and preserving search space. */

@media(min-width:1024px){
  .site-header.premium-header .header-main.shell{
    grid-template-columns:54px minmax(320px,1fr) auto!important;
    gap:9px!important;
  }

  .site-header.premium-header .global-search{
    grid-template-columns:112px minmax(140px,1fr) 40px 92px!important;
    height:46px!important;
    min-height:46px!important;
  }
  .site-header.premium-header .global-search>select,
  .site-header.premium-header .global-search>input[name="q"]{
    height:44px!important;
    min-height:44px!important;
    font-size:12px!important;
  }
  .site-header.premium-header .global-search>.tf-header-desktop-voice{
    width:40px!important;
    min-width:40px!important;
    height:44px!important;
    min-height:44px!important;
  }
  .site-header.premium-header .global-search>.tf-header-search-submit{
    width:92px!important;
    min-width:92px!important;
    max-width:92px!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    font-size:11.5px!important;
  }

  .site-header.premium-header .header-actions{
    gap:5px!important;
    height:44px!important;
    min-width:0!important;
  }
  .site-header.premium-header .header-actions>a{
    height:40px!important;
    min-height:40px!important;
    border-radius:9px!important;
    font-size:11px!important;
  }

  /* Authenticated user: always keep the first name visible. */
  .site-header.premium-header .header-actions>.tf-header-user{
    display:inline-flex!important;
    max-width:104px!important;
    min-width:58px!important;
    padding:0 7px!important;
    color:#172238!important;
    background:transparent!important;
    overflow:hidden!important;
    flex:0 1 auto!important;
  }
  .site-header.premium-header .tf-header-user-prefix{
    flex:0 0 auto!important;
    margin-right:3px!important;
  }
  .site-header.premium-header .tf-header-user-name{
    display:block!important;
    min-width:0!important;
    max-width:72px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  .site-header.premium-header .header-actions>.tf-header-dashboard,
  .site-header.premium-header .header-actions>.join-button{
    min-width:88px!important;
    width:auto!important;
    padding:0 10px!important;
  }

  .site-header.premium-header .header-actions>.compare-header-link{
    min-width:96px!important;
    width:auto!important;
    padding:0 9px!important;
  }

  .site-header.premium-header .header-actions>.shopping-cart-link{
    min-width:102px!important;
    width:auto!important;
    padding:0 9px!important;
  }

  .site-header.premium-header .header-actions>.compare-header-link span,
  .site-header.premium-header .shopping-cart-link b[data-cart-count]{
    min-width:20px!important;
    height:20px!important;
    margin-left:6px!important;
    padding:0 4px!important;
    font-size:9.5px!important;
  }

  .site-header.premium-header .shopping-cart-link .cart-svg-icon{
    width:20px!important;
    height:20px!important;
    margin-right:5px!important;
  }
  .site-header.premium-header .shopping-cart-link .cart-svg-icon svg{
    width:14px!important;
    height:14px!important;
  }
  .site-header.premium-header .shopping-cart-link>span:not(.cart-svg-icon){
    padding:0 6px!important;
  }
}

/* Standard laptop: shrink auxiliary actions before hiding any account identity. */
@media(min-width:1024px) and (max-width:1279px){
  .site-header.premium-header .header-main.shell{
    grid-template-columns:48px minmax(260px,1fr) auto!important;
    gap:7px!important;
  }
  .site-header.premium-header .brand{
    width:48px!important;
    min-width:48px!important;
  }
  .site-header.premium-header .brand img{
    max-width:44px!important;
    height:42px!important;
  }

  .site-header.premium-header .global-search{
    grid-template-columns:94px minmax(120px,1fr) 38px 78px!important;
  }
  .site-header.premium-header .global-search>.tf-header-search-submit{
    width:78px!important;
    min-width:78px!important;
    max-width:78px!important;
  }

  .site-header.premium-header .header-actions>.tf-header-user{
    display:inline-flex!important;
    max-width:78px!important;
    min-width:48px!important;
    padding-inline:4px!important;
  }
  .site-header.premium-header .tf-header-user-prefix{
    display:none!important;
  }
  .site-header.premium-header .tf-header-user-name{
    max-width:70px!important;
  }

  .site-header.premium-header .header-actions>.tf-header-dashboard,
  .site-header.premium-header .header-actions>.join-button{
    min-width:74px!important;
    padding:0 7px!important;
  }
  .site-header.premium-header .header-actions>.compare-header-link{
    min-width:82px!important;
    padding:0 7px!important;
  }
  .site-header.premium-header .header-actions>.shopping-cart-link{
    min-width:88px!important;
    padding:0 7px!important;
  }
}

/* Narrow desktop/tablet landscape: preserve user name + search, simplify labels. */
@media(min-width:1024px) and (max-width:1120px){
  .site-header.premium-header .header-actions>.tf-header-dashboard{
    min-width:40px!important;
    width:40px!important;
    padding:0!important;
    font-size:0!important;
  }
  .site-header.premium-header .header-actions>.tf-header-dashboard::after{
    content:"⌂"!important;
    display:block!important;
    font-size:17px!important;
    line-height:1!important;
    color:#0b4ca5!important;
  }

  .site-header.premium-header .header-actions>.compare-header-link{
    min-width:72px!important;
  }
  .site-header.premium-header .header-actions>.shopping-cart-link{
    min-width:76px!important;
  }
  .site-header.premium-header .shopping-cart-link>span:not(.cart-svg-icon){
    display:none!important;
  }
}
