/* 
 * Дополнительные стили для исправления проблем прокрутки во всех браузерах
 */

/* Глобальные исправления для всех браузеров */
html, body {
  height: 100% !important;
  position: relative !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: manipulation !important;
  overscroll-behavior: none;
}

/* Исправления для таблиц */
.ag-theme-alpine, 
.ag-theme-alpine-dark,
.ag-theme-material,
.MuiDataGrid-root,
.shift-table-container,
.shift-table-scroll-container,
.mui-datagrid-container {
  -webkit-overflow-scrolling: touch !important;
  overflow-scrolling: touch !important;
  touch-action: manipulation !important;
  transform: translate3d(0, 0, 0) !important;
  will-change: transform !important;
  position: relative !important;
}

/* Исправления для прокрутки в таблицах */
.ag-body-viewport,
.ag-center-cols-viewport,
.MuiDataGrid-virtualScroller,
.MuiDataGrid-virtualScrollerContent,
.MuiDataGrid-virtualScrollerRenderZone {
  -webkit-overflow-scrolling: touch !important;
  overflow-scrolling: touch !important;
  touch-action: manipulation !important;
  overflow: auto !important;
  transform: translate3d(0, 0, 0) !important;
  will-change: transform !important;
  position: relative !important;
}

/* Исправления для модальных окон */
.chakra-modal__content {
  position: relative !important;
  transform: translate3d(0, 0, 0) !important;
  -webkit-transform: translate3d(0, 0, 0) !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
}

/* Исправление для прокрутки в модальных окнах */
.chakra-modal__body {
  -webkit-overflow-scrolling: touch !important;
  overflow-scrolling: touch !important;
  touch-action: manipulation !important;
  overflow: auto !important;
}

/* Исправления для контейнеров с прокруткой */
[data-scrollable="true"],
.scrollable-container,
.shift-details-container,
.shift-details-stack,
.shift-details-simplebar,
.shift-details-left-column,
.shift-details-card {
  -webkit-overflow-scrolling: touch !important;
  overflow-scrolling: touch !important;
  touch-action: manipulation !important;
  overflow: auto !important;
  transform: translate3d(0, 0, 0) !important;
  will-change: transform !important;
  position: relative !important;
}

/* Исправления для SimpleBar */
.simplebar-content-wrapper {
  -webkit-overflow-scrolling: touch !important;
  overflow-scrolling: touch !important;
  touch-action: manipulation !important;
  overflow: auto !important;
  transform: translate3d(0, 0, 0) !important;
  will-change: transform !important;
}

/* Глобальные исправления для всех контейнеров с прокруткой */
div[style*="overflow"], 
div[style*="overflow-y"], 
div[style*="overflow-x"],
div[style*="overflow: auto"],
div[style*="overflow-y: auto"],
div[style*="overflow-x: auto"] {
  -webkit-overflow-scrolling: touch !important;
  overflow-scrolling: touch !important;
  touch-action: manipulation !important;
}