/*
 * CloudBeaver - Cloud Database Manager
 * Copyright (C) 2020-2024 DBeaver Corp and others
 *
 * Licensed under the Apache License, Version 2.0.
 * you may not use this file except in compliance with the License.
 */

.dataGrid {
  --rdg-color: var(--theme-text-on-surface) !important;
  --rdg-background-color: var(--theme-surface) !important;
  --rdg-border-color: var(--theme-background) !important;
  --rdg-header-background-color: var(--theme-surface) !important;
  --rdg-font-size: inherit !important;
  --rdg-row-hover-background-color: var(--theme-sub-secondary) !important;
  --rdg-cell-frozen-box-shadow: none !important;
  --rdg-selection-color: #0091ea !important;

  outline: 0 !important;
  height: 100% !important;
  border: none !important;
  color-scheme: inherit !important;

  :global(.rdg-cell) {
    outline: 0 !important;

    &[aria-selected='true'] {
      box-shadow: inset 0 0 0 1px #808080;
    }
  }

  :global(.rdg-cell-editing) {
    overflow: visible;
    height: 24px;
    box-shadow: none !important;
  }

  :global(.rdg-editor-container) {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
  }
}

.dataGrid:focus-within {
  :global(.rdg-cell[aria-selected='true']) {
    box-shadow: inset 0 0 0 1px var(--rdg-selection-color) !important;
  }
}
