/* Layout safety rules for the standalone organization-management workspace. */
:root{--scitrace-fixed-header-height:58px}

/* The global header is fixed.  Do not let the standalone layout reset the
   normal page offset with a shorthand margin declaration. */
.organization-tool-layout{
  box-sizing:border-box;
  margin:var(--scitrace-fixed-header-height) auto 0!important;
  scroll-margin-top:calc(var(--scitrace-fixed-header-height) + 16px);
}
.organization-tool-layout>.content,.organization-tool-layout .multi-org-tool{min-width:0}
.organization-tool-layout :is(h1,h2,h3,[id]){scroll-margin-top:calc(var(--scitrace-fixed-header-height) + 16px)}

/* Keep controls usable when labels, names, or a narrow viewport reduce the
   available width.  The page may scroll horizontally only inside tab strips,
   never by clipping the controls themselves. */
.organization-tool-layout .multi-org-group-picker{min-width:0}
.organization-tool-layout .multi-org-group-picker select{min-width:0;max-width:100%}
.organization-tool-layout .multi-org-tabs{max-width:100%;overflow-x:auto;overflow-y:visible;scrollbar-width:thin}
.organization-tool-layout .multi-org-project-picker-panel label{min-width:0;flex-wrap:wrap}
.organization-tool-layout .multi-org-project-picker-panel select{min-width:0;max-width:100%;flex:1 1 260px}
.organization-tool-layout .multi-org-project-invite{min-width:0;flex-wrap:wrap}
.organization-tool-layout .multi-org-project-invite input{min-width:180px}

/* Context menus must float above list rows rather than be cut by a card edge. */
.organization-tool-layout .multi-org-member-list{overflow:visible!important}
.organization-tool-layout .multi-org-more{z-index:2}
.organization-tool-layout .multi-org-more[open]{z-index:40}
.organization-tool-layout .multi-org-more>div{z-index:41;max-width:min(260px,calc(100vw - 32px))}

@media(max-width:760px){
  .organization-tool-layout{margin-top:var(--scitrace-fixed-header-height)!important;padding-top:20px!important}
  .organization-tool-layout .multi-org-project-invite input{min-width:0;width:100%}
  .organization-tool-layout .multi-org-project-invite select{flex:1 1 150px}
}
