/* Keep a common minimum tab height and let the panel own all scrolling. */
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode #dashboard-content {
  min-height: 0;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode #dashboard-content > .daily-summary,
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode #dashboard-content > .panel-header {
  flex: 0 0 auto;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode #dashboard-body {
  box-sizing: border-box;
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 346px !important;
  max-height: none;
  overflow: visible !important;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode :is(#view-trend,#view-satellite,#view-coherent) {
  box-sizing: border-box;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode :is(#hex-timeseries-title,.dash-distribution-head,.coh-stack-bar,.coh-stat-grid) {
  flex: 0 0 auto;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode #hex-timeseries-chart {
  flex: 0 0 136px;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode :is(#hex-detail-list,#sat-detail-list,#coh-desc) {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible !important;
  scrollbar-gutter: auto;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode #sat-detail-list {
  align-content: start;
}
html body #rfi-panel #panel.ops-console-active.ops-rfi-mode.tab-coherent #view-coherent {
  display: flex !important;
  flex-direction: column;
}

/* Keep the mobile case sheet anchored above its dock; only its content scrolls. */
@media (max-width: 768px), ((max-height: 520px) and (pointer: coarse)) {
  html body #rfi-panel #panel.ops-console-active.ops-rfi-mode[data-ops-tab="cases"] {
    height: min(72dvh, calc(100dvh - 152px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
    max-height: min(72dvh, calc(100dvh - 152px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
    min-height: 0 !important;
  }
  html body #rfi-panel #panel.ops-console-active.ops-rfi-mode[data-ops-tab="cases"] > .panel-body {
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  html body #rfi-panel #panel.ops-console-active.ops-rfi-mode[data-ops-tab="cases"] #ops-cases-intro {
    flex: 0 0 auto;
  }
  html body #rfi-panel #panel.ops-console-active.ops-rfi-mode[data-ops-tab="cases"] #dashboard-content {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}
