/* V33.70 Final Product Polish
   Shared presentation-only corrections. No hydration, identity, or league data logic lives here. */

/* Keep repeated navigation cards and controls deliberate and aligned. */
button,
[role="button"],
.btn{
  text-wrap:balance;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid rgba(245,196,81,.72)!important;
  outline-offset:3px!important;
}

.health-tile.optional{
  border-color:rgba(111,169,255,.38)!important;
  background:rgba(47,115,255,.10)!important;
}

/* The dashboard is the document's primary scroll surface. */
body.fp-public-page .leagues{
  max-height:none!important;
  overflow:visible!important;
  padding-right:0!important;
}

/* Retired duplicate newsroom/phone chrome must never compete with E.L.I. */
#fp-v31-newsroom-btn,
#fp-v31-newsroom,
.phone-dock,
.phone-panel,
.phone-fab{
  display:none!important;
}

/* Phone-open mode owns the viewport on handheld screens. */
body.fp-eli-phone-open{
  overflow:hidden!important;
}

@media(max-width:760px){
  body.fp-eli-phone-open .fp-feedback-fab,
  body.fp-eli-phone-open .fp-universal-back-hq,
  body.fp-eli-phone-open [data-fp-back-hq],
  body.fp-eli-phone-open #fp-v31-newsroom-btn,
  body.fp-eli-phone-open .fp-interface-nav{
    visibility:hidden!important;
    pointer-events:none!important;
  }

  /* Compact authenticated navigation: two balanced columns, then owner state. */
  .fp-interface-nav{
    left:10px!important;
    right:10px!important;
    top:10px!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:7px!important;
    padding:8px!important;
    border-radius:18px!important;
  }
  .fp-interface-nav button{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    height:44px!important;
    padding:0 9px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  .fp-interface-nav .owner-badge{
    grid-column:1/-1!important;
    text-align:center!important;
    padding:2px 4px!important;
  }
  body.fp-public-page > .wrap{
    padding-top:136px!important;
  }

  /* Preserve the Team HQ hero spacing inside its background instead of
     letting the first child's margin collapse above the entire HQ canvas. */
  body.fp-team-hq-page .hq{
    display:flow-root!important;
  }
  body.fp-team-hq-page .command-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  /* The three scouting destinations stay visible without a clipped rail. */
  body.fp-scouting-page .tabs{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
    overflow:visible!important;
  }
  body.fp-scouting-page .tabs .tab{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    padding:9px 5px!important;
    white-space:normal!important;
    line-height:1.15!important;
  }

  /* One scroll surface in the expanded Big Board: the board iframe. */
  body.fp-scouting-page .drawer.active .drawer-body.board-mode{
    overflow:hidden!important;
    min-height:0!important;
  }
  body.fp-scouting-page .drawer.active .board-full-frame{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    border-radius:12px!important;
  }

  /* Prevent the mobile Trade Centre Back link from collapsing vertically. */
  body.fp-trade-page .top-actions [data-fp-back-hq]{
    flex:1 1 135px!important;
    width:auto!important;
    min-width:112px!important;
    min-height:44px!important;
    white-space:nowrap!important;
  }
}

@media(max-width:359px){
  body.fp-team-hq-page .command-list{
    grid-template-columns:1fr!important;
  }
}
