/*
 * v1.11.77 — Staff menu layer / dashboard Live selector stability.
 * Keep every Staff top-nav dropdown above cards, heroes, sticky tables and
 * dashboard Live panels.  The small max-height prevents a long GST menu from
 * running below the viewport on desktop while keeping it fully scrollable.
 */
.portal-context-staff .portal-topbar{
  position:sticky!important;
  top:0!important;
  z-index:60000!important;
  overflow:visible!important;
  isolation:isolate;
}
.portal-context-staff .topbar-shell,
.portal-context-staff .topnav{
  overflow:visible!important;
}
.portal-context-staff .topnav-group{
  position:relative!important;
}
.portal-context-staff .topnav-group[open]{
  z-index:60010!important;
}
.portal-context-staff .topnav-menu,
.portal-context-staff .topnav-menu-right{
  z-index:60020!important;
  max-height:calc(100vh - 92px);
  overflow-y:auto;
  overscroll-behavior:contain;
}

/* Chrome can create new stacking contexts for transformed / filtered cards.
   Force normal Staff page content below the navigation without changing layout. */
.portal-context-staff .staff-modern-hero,
.portal-context-staff .staff-gst-live-top,
.portal-context-staff .staff-dashboard-overview-card,
.portal-context-staff .staff-modern-priority-grid,
.portal-context-staff .card,
.portal-context-staff section{
  z-index:auto;
}

/* The remembered dashboard Live selector gets a tiny accessibility outline.
   Existing module colours and active styling remain authoritative. */
.portal-context-staff [data-ca-live-preferred="1"]{
  outline:2px solid rgba(18,63,112,.16);
  outline-offset:2px;
}

@media(max-width:900px){
  /* Mobile navigation is an in-page panel; do not constrain its own submenu. */
  .portal-context-staff .topnav-menu,
  .portal-context-staff .topnav-menu-right{
    max-height:none;
    overflow-y:visible;
  }
}

/* v1.13.44 — Staff navigation width and dropdown visibility repair.
   Layout only: permission and link logic are unchanged. */
@media (min-width: 901px) {
 .portal-context-staff .portal-topbar .topbar-shell {
   display:flex!important; flex-wrap:wrap!important; align-items:center!important;
   justify-content:space-between!important; column-gap:12px!important;
   row-gap:4px!important; width:100%!important; max-width:none!important;
   padding:8px clamp(12px,2vw,30px)!important; height:auto!important;
   min-height:76px!important; box-sizing:border-box!important;
 }
 .portal-context-staff .portal-topbar .portal-brand {
   flex:0 1 275px!important; min-width:190px!important; max-width:320px!important;
 }
 .portal-context-staff .portal-topbar .topnav {
   flex:1 1 750px!important; min-width:0!important; display:flex!important;
   align-items:center!important; flex-wrap:wrap!important;
   justify-content:flex-end!important; gap:5px 7px!important;
   white-space:normal!important; max-width:100%!important;
 }
 .portal-context-staff .portal-topbar .topnav > a,
 .portal-context-staff .portal-topbar .topnav > button,
 .portal-context-staff .portal-topbar .topnav > details {
   flex:0 0 auto!important; max-width:100%!important; min-width:0!important;
   margin:0!important; position:relative!important;
 }
 .portal-context-staff .portal-topbar .topnav > a,
 .portal-context-staff .portal-topbar .topnav > button,
 .portal-context-staff .portal-topbar .topnav > details > summary {
   display:inline-flex!important; align-items:center!important; justify-content:center!important;
   gap:5px!important; min-height:39px!important;
   padding:7px 9px!important; font-size:12px!important;
   line-height:1.2!important; white-space:nowrap!important;
   box-sizing:border-box!important; border-radius:10px!important;
   overflow:visible!important; text-overflow:clip!important;
 }
 .portal-context-staff .portal-topbar .topnav > details > summary > span {
   flex:0 0 auto!important; min-width:0!important; max-width:none!important;
   padding:3px 6px!important; font-size:10px!important;
 }
 .portal-context-staff .portal-topbar .topnav > details > summary i {flex:0 0 auto!important}
 .portal-context-staff .portal-topbar .topnav-menu {
   position:absolute!important; top:calc(100% + 6px)!important; left:0!important;
   min-width:min(285px,calc(100vw - 32px))!important;
   max-width:min(355px,calc(100vw - 32px))!important;
   max-height:calc(100vh - 110px)!important; overflow-y:auto!important;
   white-space:normal!important; z-index:60020!important;
 }
 .portal-context-staff .portal-topbar .topnav-menu-right {left:auto!important; right:0!important}
 .portal-context-staff .portal-topbar .topnav-menu a {white-space:normal!important; height:auto!important; min-height:40px!important}
 .portal-context-staff .portal-topbar .topnav-group[open] {z-index:60030!important}
}
@media (min-width:901px) and (max-width:1350px){
 .portal-context-staff .portal-topbar .topbar-shell {justify-content:center!important;}
 .portal-context-staff .portal-topbar .portal-brand {flex:0 1 240px!important;}
 .portal-context-staff .portal-topbar .topnav {flex:1 1 760px!important; justify-content:center!important;}
}
@media(max-width:900px){
 .portal-context-staff .portal-topbar .topnav > details > summary,
 .portal-context-staff .portal-topbar .topnav > a {white-space:normal!important; overflow-wrap:break-word!important}
}

/* v1.13.55: keep staff menu visible during page scroll; preserve popup child behavior */
html body.portal-context-staff:not(.msa-desktop-popup-child)>.portal-topbar{position:sticky!important;top:0!important;z-index:100000!important;visibility:visible!important;transform:none!important}html body.portal-context-staff:not(.msa-desktop-popup-child)>.portal-topbar .topnav-menu{z-index:100020!important}

/* v1.13.56: fix scrolling in Windows desktop and normal staff pages. */
@media(min-width:801px){
 html body.portal-context-staff:not(.msa-desktop-popup-child)>.portal-topbar{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;max-width:100vw!important;z-index:2147483000!important;visibility:visible!important;display:block!important;transform:none!important;contain:none!important}
 html body.portal-context-staff:not(.msa-desktop-popup-child){padding-top:var(--msa-topbar-height,80px)!important}
}
