/* MHQ Network hotfix v7 — authoritative navigation + typography layer. */

/* Arcade account button: JS owns the real avatar/badge. */
#nh-account-toggle.has-session::before,
#nh-account-toggle.has-session::after{
  content:none!important;
  display:none!important;
}
#nh-account-toggle.has-session .nh-account-avatar{
  display:block!important;
  width:30px!important;
  height:30px!important;
  object-fit:cover!important;
  border-radius:8px!important;
}
#nh-account-toggle.has-session .nh-account-session-badge{display:grid!important;}

/* Shared typography: same family hierarchy as the main/creator pages. */
body.page-arcade,
body.mlbb-data-site{
  font-family:'DM Sans',Arial,sans-serif!important;
}
body.page-arcade :is(p,a,button,input,select,textarea,label,small,li,td,th),
body.mlbb-data-site :is(p,a,button,input,select,textarea,label,small,li,td,th){
  font-family:'DM Sans',Arial,sans-serif!important;
}
body.page-arcade :is(h1,h2,h3,h4,h5,h6,.arcade-card-title strong,.profile-overview-copy strong,.profile-stat-card strong,.profile-mode-copy strong),
body.mlbb-data-site :is(h1,h2,h3,h4,h5,h6){
  font-family:'Barlow Condensed','Arial Narrow',sans-serif!important;
}

@media(min-width:900px){
  /* Squad + Lab use the same deliberate desktop navigation rail. */
  .nh-bar:is([data-site="squad"],[data-site="lab"]) .nh-local-row{
    padding:7px 0 9px!important;
    border-top:1px solid #262b32!important;
    border-bottom:1px solid #222830!important;
    background:linear-gradient(180deg,#111419 0%,#0d1014 100%)!important;
  }
  .nh-bar:is([data-site="squad"],[data-site="lab"]) .nh-local-links{
    align-items:center!important;
    gap:4px!important;
  }
  .nh-bar:is([data-site="squad"],[data-site="lab"]) .nh-local-links a{
    order:0;
    min-height:38px!important;
    padding:0 13px!important;
    border:1px solid transparent!important;
    border-radius:8px!important;
    color:#b8c0ca!important;
    font-weight:700!important;
    transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important;
  }
  .nh-bar:is([data-site="squad"],[data-site="lab"]) .nh-local-links a::after{display:none!important;}
  .nh-bar:is([data-site="squad"],[data-site="lab"]) .nh-local-links a:is(:hover,:focus-visible){
    color:#fff!important;
    background:#1a1f26!important;
    border-color:#343b45!important;
  }
  .nh-bar:is([data-site="squad"],[data-site="lab"]) .nh-local-links a[aria-current="page"]{
    color:#efffff!important;
    background:color-mix(in srgb,var(--nh-accent) 12%,#171b20)!important;
    border-color:color-mix(in srgb,var(--nh-accent) 38%,#343b45)!important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--nh-accent) 8%,transparent)!important;
  }

  /* Contact remains with the normal links. Coaching alone is the commercial CTA. */
  .nh-bar[data-site="squad"] .nh-local-links a[href="/contact"]{
    order:0!important;
    margin-left:0!important;
  }
  .nh-bar[data-site="squad"] .nh-local-links a[href="/coaching"]{
    order:99!important;
    margin-left:auto!important;
    padding-inline:18px!important;
    color:#17130a!important;
    background:linear-gradient(135deg,#f6d783 0%,#e8b94f 100%)!important;
    border-color:#f2c75f!important;
    box-shadow:0 5px 15px #0003!important;
    font-weight:800!important;
  }
  .nh-bar[data-site="squad"] .nh-local-links a[href="/coaching"]::before{
    content:"✦";
    margin-right:7px;
    font-size:11px;
    line-height:1;
  }
  .nh-bar[data-site="squad"] .nh-local-links a[href="/coaching"]:is(:hover,:focus-visible){
    color:#100d06!important;
    background:linear-gradient(135deg,#ffe29a 0%,#efc35d 100%)!important;
    border-color:#ffe09a!important;
    transform:translateY(-1px);
  }

  /* Arcade: no duplicate text navigation. In-page mode tabs are the desktop navigation. */
  .nh-bar[data-site="arcade"] .nh-local-row{display:none!important;}
  body.page-arcade .nh-mode-tabs{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:5px!important;
    margin:0 0 24px!important;
    padding:5px!important;
    background:#15181df2!important;
    border:1px solid #343b45!important;
    border-radius:10px!important;
    box-shadow:0 10px 24px #0002!important;
    backdrop-filter:blur(12px);
  }
  body.page-arcade .nh-mode-tabs>button{
    min-height:50px!important;
    flex-direction:row!important;
    gap:9px!important;
    padding:8px 12px!important;
    border-radius:7px!important;
    color:#aeb7c2!important;
    font-size:13px!important;
    font-weight:700!important;
  }
  body.page-arcade .nh-mode-tabs>button:hover{
    color:#fff!important;
    background:#20252c!important;
  }
  body.page-arcade .nh-mode-tabs>button[aria-selected="true"]{
    color:#fff!important;
    background:linear-gradient(180deg,#2b3037 0%,#24292f 100%)!important;
    border-color:#4b5561!important;
    box-shadow:inset 0 -2px 0 #ff886f!important;
  }
  body.page-arcade .nh-mode-tabs .nav-copy{display:none!important;}
  body.page-arcade .nh-mode-tabs .mx-tab-short{display:block!important;}
  body.page-arcade .nh-mode-tabs .nav-icon{
    display:grid!important;
    place-items:center!important;
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
  }
}

@media(max-width:899px){
  /* Squad mobile controls: Search first, Menu second. */
  .nh-bar[data-site="squad"] .nh-tools .nh-search{order:1!important;}
  .nh-bar[data-site="squad"] .nh-tools .nh-menu{order:2!important;}

  /* Mobile Squad menu: Coaching is always the final, separated CTA. */
  .nh-bar[data-site="squad"] .nh-menu nav a[href="/coaching"]{
    order:99!important;
    margin-top:8px!important;
    min-height:46px!important;
    color:#17130a!important;
    background:linear-gradient(135deg,#f6d783 0%,#e8b94f 100%)!important;
    border:1px solid #f2c75f!important;
    border-radius:7px!important;
    font-weight:800!important;
  }
  .nh-bar[data-site="squad"] .nh-menu nav a[href="/coaching"]::before{
    content:"✦";
    margin-right:8px;
    font-size:11px;
  }
  .nh-bar[data-site="squad"] .nh-menu nav a[href="/coaching"]:is(:hover,:focus-visible){
    color:#100d06!important;
    background:#ffe09a!important;
  }

  /* During active Arcade play, let the two-row network header scroll away so game art/input stays visible with the keyboard. */
  body.page-arcade[data-arcade-surface="room"] header.nh-bar{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
  }
  body.page-arcade[data-arcade-surface="room"] #room-screen{scroll-margin-top:10px!important;}
}