/* AlertGrid Restore Scroll + Buttons v1 */

/* Возвращаем нормальный скролл страницы */
html,
body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
}

.app-view,
#appView {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh !important;
}

.app-main {
  overflow-y: auto !important;
  height: auto !important;
  min-height: calc(100vh - 80px) !important;
}

/* Отключаем старые fixed SCADA панели, которые могут перекрывать страницу */
#agScadaTopBar,
#agScadaBottomPanel {
  display: none !important;
  pointer-events: none !important;
}

/* Кнопки должны быть кликабельны */
.app-header button,
.app-header .btn,
#dashboardSection button,
#dashboardSection .btn,
.nav-actions button,
.nav-actions .btn {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 20 !important;
}

/* Модалки добавления объекта/события разрешены внутри телеметрии */
body.ag-app-active #objectModal.allow-in-app.active,
body.ag-app-active #eventModal.allow-in-app.active,
#objectModal.allow-in-app.active,
#eventModal.allow-in-app.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 14000 !important;
}

#objectModal .modal-card,
#eventModal .modal-card {
  pointer-events: auto !important;
}
