/* Stock Sync Group IMS — Company dropdown stacking/layer fix V2 */

/* The premium top bar creates its own stacking context. Give that whole
   context a higher layer than the colored page hero and dashboard cards. */
.topbar-2026,
body.ss-colored-heading-ready .topbar-2026{
  position:relative!important;
  z-index:2000000!important;
  overflow:visible!important;
}

.topbar-2026 .top-actions-2026,
body.ss-colored-heading-ready .topbar-2026 .top-actions-2026{
  position:relative!important;
  z-index:2000010!important;
  overflow:visible!important;
}

.group-company-switch{
  position:relative!important;
  z-index:2000020!important;
  overflow:visible!important;
}

.group-company-menu{
  top:calc(100% + 9px)!important;
  right:0!important;
  z-index:2000030!important;
  max-height:min(520px,calc(100vh - 110px));
  overflow-y:auto;
  overscroll-behavior:contain;
}

/* Keep normal page content below the open switcher. */
.ss-page-head-card,
.ss-page-hero,
.ss-dashboard,
.dashboard-metric-grid,
.dashboard-main-grid{
  z-index:auto;
}

@media(max-width:900px){
  .group-company-menu{
    left:auto!important;
    right:0!important;
    width:min(310px,calc(100vw - 24px))!important;
  }
}
