/* Status single-scroll-root model — R34
 *
 * Normal document pages use the browser document as their only full-page
 * vertical scroll root. Fullscreen map, replay and edit-map workspaces are
 * excluded server-side. Modals use one separate scroll root: .modal-body.
 */

html.status-document-root-v34 {
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: auto !important;
}

body.status-document-scroll-v34 {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior-y: auto !important;
  scroll-behavior: auto !important;
}

/* overflow-x:hidden computes overflow-y:auto in modern browsers. Therefore
 * structural wrappers must use visible/clip instead of hidden. */
body.status-document-scroll-v34 .status-page-container,
body.status-document-scroll-v34 .status-public-container,
body.status-document-scroll-v34 .status-admin-container,
body.status-document-scroll-v34 .status-page-container > *,
body.status-document-scroll-v34 .status-page-container > * > .status-admin-shell,
body.status-document-scroll-v34 .status-page-container > * > .status-public-list-shell,
body.status-document-scroll-v34 .status-page-container > * > .status-form-shell,
body.status-document-scroll-v34 .status-admin-page,
body.status-document-scroll-v34 .status-public-list-page,
body.status-document-scroll-v34 .status-admin-shell,
body.status-document-scroll-v34 .status-public-list-shell,
body.status-document-scroll-v34 .status-form-shell,
body.status-document-scroll-v34 .status-admin-editor,
body.status-document-scroll-v34 .status-admin-editor-shell,
body.status-document-scroll-v34 .status-admin-tasks,
body.status-document-scroll-v34 .status-admin-items,
body.status-document-scroll-v34 .status-task-page,
body.status-document-scroll-v34 .status-task-shell,
body.status-document-scroll-v34 .status-notices-page,
body.status-document-scroll-v34 .status-notices-shell,
body.status-document-scroll-v34 .status-alert-admin-page,
body.status-document-scroll-v34 .status-alert-admin-shell,
body.status-document-scroll-v34 .status-alert-form-page,
body.status-document-scroll-v34 .status-alert-form-shell,
body.status-document-scroll-v34 .status-stats-page,
body.status-document-scroll-v34 .status-stats-shell,
body.status-document-scroll-v34 .factions-page,
body.status-document-scroll-v34 .factions-page .flag-table-wrapper,
body.status-document-scroll-v34 .user-settings-page,
body.status-document-scroll-v34 .user-settings-shell,
body.status-document-scroll-v34 .edit-event-page,
body.status-document-scroll-v34 .edit-event-shell,
body.status-document-scroll-v34 .updater-page,
body.status-document-scroll-v34 .status-system-admin-page,
body.status-document-scroll-v34 .status-gps-admin-page,
body.status-document-scroll-v34 .status-info-page,
body.status-document-scroll-v34 .status-info-shell,
body.status-document-scroll-v34 .status-event-tabs,
body.status-document-scroll-v34 .tab-content,
body.status-document-scroll-v34 .tab-pane,
body.status-document-scroll-v34 .status-scroll-root-reset {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  contain: none !important;
  overscroll-behavior: auto !important;
  -webkit-overflow-scrolling: auto !important;
}

body.status-document-scroll-v34 .status-page-container {
  min-height: calc(100svh - var(--status-navbar-actual-height, var(--status-navbar-height, 56px))) !important;
}

@supports not (height: 100svh) {
  body.status-document-scroll-v34 .status-page-container {
    min-height: calc(100vh - var(--status-navbar-actual-height, var(--status-navbar-height, 56px))) !important;
  }
}

@supports (overflow: clip) {
  html.status-document-root-v34 {
    overflow-x: clip !important;
  }

  body.status-document-scroll-v34 .status-page-container,
  body.status-document-scroll-v34 .status-public-container,
  body.status-document-scroll-v34 .status-admin-container,
  body.status-document-scroll-v34 .status-admin-page,
  body.status-document-scroll-v34 .status-public-list-page,
  body.status-document-scroll-v34 .edit-event-page,
  body.status-document-scroll-v34 .user-settings-page {
    overflow-x: clip !important;
  }
}

/* Tables can scroll horizontally, but their rows must extend the document.
 * This also neutralises DataTables scrollY heights written inline. */
body.status-document-scroll-v34 .table-responsive,
body.status-document-scroll-v34 .dataTables_scroll,
body.status-document-scroll-v34 .dataTables_scrollBody {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: auto !important;
}

/* A component may explicitly opt back into a bounded vertical scroller. */
body.status-document-scroll-v34 .status-allow-vertical-scroll {
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Horizontal tab strips may pan sideways, but never become vertical roots. */
body.status-document-scroll-v34 .settings-nav,
body.status-document-scroll-v34 .status-editor-subnav,
body.status-document-scroll-v34 .updater-tabs-card .nav-tabs,
body.status-document-scroll-v34 .updater-header-status {
  overflow-y: hidden !important;
  touch-action: pan-x pan-y;
}

/* One scrollbar per Bootstrap modal: the overlay and dialog stay fixed to the
 * viewport, and only .modal-body is scrollable. */
body.status-document-scroll-v34 .modal {
  overflow: hidden !important;
  overscroll-behavior: contain !important;
}

body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable,
body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog {
  display: flex !important;
  width: auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 2rem) !important;
  margin: 1rem auto !important;
}

@supports not (height: 100dvh) {
  body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable,
  body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog {
    max-height: calc(100vh - 2rem) !important;
  }
}

body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable > .modal-content,
body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog > .modal-content {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  width: 100%;
  min-height: 0 !important;
  max-height: calc(100dvh - 2rem) !important;
  overflow: hidden !important;
}

@supports not (height: 100dvh) {
  body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable > .modal-content,
  body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog > .modal-content {
    max-height: calc(100vh - 2rem) !important;
  }
}

body.status-document-scroll-v34 .modal-header,
body.status-document-scroll-v34 .modal-footer {
  flex: 0 0 auto !important;
}

body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable .modal-body,
body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch !important;
}

/* Embedded add/edit pages inside a modal may not retain their own page scroll. */
body.status-document-scroll-v34 .modal-body .status-page-container,
body.status-document-scroll-v34 .modal-body .status-admin-container,
body.status-document-scroll-v34 .modal-body .status-admin-page,
body.status-document-scroll-v34 .modal-body .status-admin-shell,
body.status-document-scroll-v34 .modal-body .status-form-shell,
body.status-document-scroll-v34 .modal-body .status-admin-editor,
body.status-document-scroll-v34 .modal-body .status-admin-editor-shell,
body.status-document-scroll-v34 .modal-body .tab-content,
body.status-document-scroll-v34 .modal-body .tab-pane {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

body.status-document-scroll-v34.modal-open {
  overflow: hidden !important;
}

/* Navbar, dropdown, picker and editor surfaces are legitimate component-level
 * scrollers and are intentionally not flattened. */
body.status-document-scroll-v34 .status-navbar .navbar-collapse,
body.status-document-scroll-v34 .status-navbar .dropdown-menu,
body.status-document-scroll-v34 .status-user-dropdown,
body.status-document-scroll-v34 .dropdown-menu,
body.status-document-scroll-v34 .select2-results__options,
body.status-document-scroll-v34 .icon-picker-list,
body.status-document-scroll-v34 .iconpicker-popover,
body.status-document-scroll-v34 .icon-picker-popover,
body.status-document-scroll-v34 .ck-editor__editable_inline,
body.status-document-scroll-v34 textarea,
body.status-document-scroll-v34 pre {
  overscroll-behavior: contain;
}

@media (max-width: 767.98px) {
  body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable,
  body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog {
    width: calc(100vw - 1rem) !important;
    height: auto !important;
    max-height: calc(100dvh - 1rem) !important;
    margin: .5rem auto !important;
  }

  body.status-document-scroll-v34 .modal-dialog.modal-dialog-scrollable > .modal-content,
  body.status-document-scroll-v34 .modal-dialog.status-single-scroll-dialog > .modal-content {
    max-height: calc(100dvh - 1rem) !important;
  }

  body.status-document-scroll-v34 .status-task-toolbar,
  body.status-document-scroll-v34 .status-notices-toolbar,
  body.status-document-scroll-v34 .status-public-list-toolbar,
  body.status-document-scroll-v34 .status-stats-toolbar,
  body.status-document-scroll-v34 .status-admin-tasks .admin-toolbar {
    position: static !important;
    top: auto !important;
  }

  /* Wrapping removes momentum-scroll strips that commonly steal the first
   * vertical gesture on iOS. */
  body.status-document-scroll-v34 .settings-nav,
  body.status-document-scroll-v34 .status-editor-subnav,
  body.status-document-scroll-v34 .updater-tabs-card .nav-tabs,
  body.status-document-scroll-v34 .updater-header-status {
    flex-wrap: wrap !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  body.status-document-scroll-v34 .settings-nav > *,
  body.status-document-scroll-v34 .status-editor-subnav > *,
  body.status-document-scroll-v34 .updater-tabs-card .nav-tabs > *,
  body.status-document-scroll-v34 .updater-header-status > * {
    flex: 0 1 auto !important;
    white-space: normal !important;
  }
}
