.ag-details-row {
  padding: 2px !important;
}

.link {
  cursor: pointer;
  color: var(--mantine-primary-color);
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

.link-dark {
  cursor: pointer;
  text-decoration: none;
  display: inline;
  &:hover {
    text-decoration: underline;
    color: black;
  }
}

.link-light {
  cursor: pointer;
  color: var(--mantine-primary-color-3);
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

.hidden {
  display: none !important;
}

.ag-cell .show-on-row-hover {
  opacity: 0;
  pointer-events: none;
}
.ag-row-hover > .ag-cell .show-on-row-hover,
.ag-row-hover > .ag-grid-scrolling-cells > .ag-cell .show-on-row-hover {
  opacity: 1;
  pointer-events: auto;
}

.disabled-row {
  opacity: 0.4;
}

.small-table {
  --ag-cell-horizontal-padding: 0;
}

.ag-details-row-auto-height .ag-center-cols-viewport,
.small-table .ag-center-cols-viewport {
  min-height: 32px !important;
}

.ag-details-row-auto-height .ag-overlay-no-rows-wrapper,
.small-table .ag-overlay-no-rows-wrapper {
  align-items: flex-start;
  color: #666;
}

.small-table .ag-overlay-no-rows-wrapper {
  justify-content: flex-start;
  align-items: center;
}

.ag-overlay-no-rows-wrapper .ag-react-container {
  width: 100%;
}

.ag-tool-panel-wrapper .ag-react-container {
  position: relative;
  width: 100%;
}

.ag-side-buttons {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/** Sticky the export button to the bottom of the side panel. */
.ag-side-button:last-of-type {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  border-top: 1px solid var(--mantine-color-gray-3);

  &:not(.ag-selected) {
    background-color: var(--mantine-color-gray-0);
  }
}

/* Re-size our custom icons. */
.ag-side-button-icon-wrapper {
  height: 16px;
  width: 16px;

  & > img {
    height: 16px;
    width: 16px;
  }
}

.ag-icon-asc,
.ag-icon-desc,
.ag-sort-indicator-icon.ag-sort-order {
  color: var(--mantine-primary-color-5);
}

/* Hide the scrollbar for the pinned columns */
.ag-horizontal-left-spacer,
.ag-horizontal-right-spacer {
  visibility: hidden;
}

.ag-details-row .ag-header {
  border-bottom: none !important;
}

.ag-no-header .ag-header {
  display: none !important;
}

.ag-no-header .ag-overlay-no-rows-wrapper {
  padding-top: 0 !important;
}

.late {
  color: var(--mantine-color-red-8);
}

.ag-grid-custom-container-shadow {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ag-grid-custom-container:hover .ag-grid-custom-container-shadow.active {
  opacity: 1;
}

.ag-popup-child {
  z-index: var(--mantine-z-index-popover, var(--mantine-z-index-modal, 300));
}
