.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 {
  visibility: hidden;
}
.ag-row-hover > .ag-cell .show-on-row-hover {
  visibility: visible;
}

.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));
}
._root_1hhce_1 {
    &[data-variant='fancy'] {
        border: 4px solid transparent;
        background:
                linear-gradient(180deg, var(--mantine-primary-color-5), var(--mantine-primary-color-6)) padding-box, /* Inner background color */
                linear-gradient(0deg, var(--mantine-primary-color-5), var(--mantine-primary-color-6)) border-box; /* Gradient for border */
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
        &:active {
            background:
                    linear-gradient(0deg, var(--mantine-primary-color-5), var(--mantine-primary-color-6)) padding-box,
                    linear-gradient(180deg, var(--mantine-primary-color-5), var(--mantine-primary-color-6)) border-box;
        }
        &:hover:not(:active) {
            background:
                    linear-gradient(180deg, var(--mantine-primary-color-4), var(--mantine-primary-color-5)) padding-box,
                    linear-gradient(0deg, var(--mantine-primary-color-4), var(--mantine-primary-color-5)) border-box;
        }
    }

    &[data-variant='fancy-active'] {
        border: 4px solid transparent;
        background:
                linear-gradient(180deg, var(--mantine-color-orange-6), var(--mantine-color-orange-8)) padding-box, /* Inner background color */
                linear-gradient(0deg, var(--mantine-color-orange-6), var(--mantine-color-orange-8)) border-box; /* Gradient for border */
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
        &:active {
            background:
                    linear-gradient(0deg, var(--mantine-color-orange-6), var(--mantine-color-orange-8)) padding-box,
                    linear-gradient(180deg, var(--mantine-color-orange-6), var(--mantine-color-orange-8)) border-box;
        }
        &:hover:not(:active) {
            background:
                    linear-gradient(180deg, var(--mantine-color-orange-5), var(--mantine-color-orange-7)) padding-box,
                    linear-gradient(0deg, var(--mantine-color-orange-5), var(--mantine-color-orange-7)) border-box;
        }
    }
}.modal-tabs {
  ::before {
    border-top-width: 0;
  }
}
/*
  Trigger on visible adds extra unnecessary height to a Stack with gap
  `--stack-gap` is calculated by the parent Stack
*/
.mantine-Stack-root > .remove-stack-height {
  &:first-child {
    margin-bottom: calc(-1 * var(--stack-gap, 0));
  }
  &:last-child {
    margin-top: calc(-1 * var(--stack-gap, 0));
  }
  &:only-child {
    margin-top: 0;
    margin-bottom: 0;
  }
}
.creatable-option {
  color: var(--mantine-primary-color);
}

.creatable-option-text {
  color: var(--mantine-color-black);
}

div[data-combobox-selected='true'] {
  .creatable-option,
  .creatable-option-text {
    color: var(--mantine-color-white);
  }
}
.editable-cell-renderer {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;

  .editable-clear-button {
    display: none;
  }

  &.editable {
    cursor: pointer;

    &:hover,
    &.active {
      border: 1px solid var(--mantine-color-gray-6);
      background-color: #fcfcfc !important;

      .editable-clear-button {
        display: inline-flex;
      }
    }
  }
}

.empty-background {
  background-color: transparent !important;
}
