/* AI Project Universe V6.11 — Incident mobile full-width dashboard and toolbar cleanup */

/* Keep the yellow project viewer toolbar swipeable; never render anonymous empty boxes. */
@media (max-width: 760px){
  .viewer .viewer__bar{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    flex-wrap:nowrap!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .viewer #viewerStandalone,
  .viewer #viewerDownload{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:58px!important;
    min-width:58px!important;
    font-size:11px!important;
    line-height:1!important;
    text-indent:0!important;
    overflow:visible!important;
    color:#111!important;
    -webkit-text-fill-color:#111!important;
    background:#fff!important;
  }
  .viewer #viewerStandalone::before,
  .viewer #viewerStandalone::after,
  .viewer #viewerDownload::before,
  .viewer #viewerDownload::after{
    content:none!important;
    display:none!important;
  }
  .viewer .viewer__actions > :empty{
    display:none!important;
  }
}

/* Incident Monitoring: mobile and tablet use the full canvas; desktop/laptop keeps the original sidebar. */
@media (max-width: 1023px){
  html[data-scroll-theme="incident-monitoring"] #root > div{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
  }
  html[data-scroll-theme="incident-monitoring"] #root aside,
  html[data-scroll-theme="incident-monitoring"] #root aside.w-64,
  html[data-scroll-theme="incident-monitoring"] #root [data-apu-final-original-sidebar="true"],
  html[data-scroll-theme="incident-monitoring"] #root [data-apu-v610-incident-sidebar="true"],
  html[data-scroll-theme="incident-monitoring"] #root [data-apu-v611-incident-sidebar="true"]{
    display:none!important;
    width:0!important;
    min-width:0!important;
    max-width:0!important;
    flex:0 0 0!important;
    visibility:hidden!important;
    overflow:hidden!important;
  }
  html[data-scroll-theme="incident-monitoring"] #root main,
  html[data-scroll-theme="incident-monitoring"] #root > div > main{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:calc(100dvh - 76px)!important;
    margin:0!important;
    padding-left:0!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
  }
  html[data-scroll-theme="incident-monitoring"] .apu-final-mobile-bar{
    grid-template-columns:auto minmax(0,1fr)!important;
    padding-right:14px!important;
  }
  html[data-scroll-theme="incident-monitoring"] .apu-final-mobile-exit,
  html[data-scroll-theme="incident-monitoring"] [data-apu-incident-mobile-exit="true"]{
    display:none!important;
    visibility:hidden!important;
    width:0!important;
    min-width:0!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
  }
  html[data-scroll-theme="incident-monitoring"] .apu-final-mobile-brand{
    min-width:0!important;
    width:auto!important;
    max-width:none!important;
  }
  html[data-scroll-theme="incident-monitoring"] main > *{
    max-width:100%!important;
    min-width:0!important;
  }
}

/* V6.11 final: language picker in top-layer dialog and horizontal model tables. */
.viewer .apu-v611-language-menu{
  position:fixed!important;
  z-index:2147483647!important;
  display:none!important;
  width:min(280px,calc(100vw - 20px))!important;
  max-height:min(430px,calc(100dvh - 92px))!important;
  padding:10px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  border:3px solid #ffffff!important;
  border-radius:14px!important;
  background:#07111f!important;
  background-image:none!important;
  color:#ffffff!important;
  opacity:1!important;
  box-shadow:0 24px 70px rgba(0,0,0,.72)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
.viewer .apu-v611-language-menu.is-open{display:grid!important;gap:7px!important}
.viewer .apu-v611-language-option{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr)!important;
  align-items:center!important;
  width:100%!important;
  min-height:46px!important;
  padding:8px 11px!important;
  border:1px solid #34516f!important;
  border-radius:10px!important;
  background:#12243d!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-align:left!important;
  opacity:1!important;
  cursor:pointer!important;
}
.viewer .apu-v611-language-option:hover,
.viewer .apu-v611-language-option:focus-visible,
.viewer .apu-v611-language-option[aria-current="true"]{
  background:#1f5b9c!important;
  border-color:#78b9ff!important;
  outline:none!important;
}
.viewer .apu-v611-language-code{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:28px!important;
  border-radius:7px!important;
  background:#ffffff!important;
  color:#07111f!important;
  -webkit-text-fill-color:#07111f!important;
  font:900 11px/1 system-ui,-apple-system,"Segoe UI",sans-serif!important;
}
.viewer .apu-v611-language-name{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  font:750 14px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif!important;
}
@media (max-width:760px){
  .viewer .apu-v69-language-button.apu-v611-language-trigger{
    width:48px!important;
    min-width:48px!important;
    height:44px!important;
    padding:0!important;
    background:#ffffff!important;
    color:#111111!important;
    -webkit-text-fill-color:#111111!important;
    font-size:21px!important;
  }
}

/* Model Evaluation: Class Report and Evaluation Dataset scroll locally on narrow screens. */
.apu-v69-model-evaluation .apu-v69-table-wrap,
.apu-v69-model-evaluation .apu-v611-horizontal-scroll{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-inline:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
  scrollbar-width:thin!important;
  padding-bottom:4px!important;
}
.apu-v69-model-evaluation .apu-v611-horizontal-scroll--class table,
.apu-v69-model-evaluation .apu-v69-panel:has(h2) .apu-v69-table-wrap table.apu-v611-class-table{
  width:max-content!important;
  min-width:620px!important;
  max-width:none!important;
}
.apu-v69-model-evaluation .apu-v611-horizontal-scroll--dataset table,
.apu-v69-model-evaluation table.apu-v611-dataset-table{
  width:max-content!important;
  min-width:980px!important;
  max-width:none!important;
}
.apu-v69-model-evaluation .apu-v611-horizontal-scroll th,
.apu-v69-model-evaluation .apu-v611-horizontal-scroll td,
.apu-v69-model-evaluation .apu-v69-table-wrap th,
.apu-v69-model-evaluation .apu-v69-table-wrap td{
  white-space:nowrap!important;
}
.apu-v69-model-evaluation .apu-v611-dataset-table th:nth-child(2),
.apu-v69-model-evaluation .apu-v611-dataset-table td:nth-child(2){
  min-width:320px!important;
  white-space:normal!important;
}
