@import '../clinical-lowlight-theme/Cell.module';
@import '../orion-fusion-theme/Cell.module';

:local {
  .cell {
    border-bottom: var(--terra-table-cell-border-bottom, 1px solid #dedfe0);
    border-right: var(--terra-table-cell-border-right, 1px solid #dedfe0);
    font-weight: normal;
    padding: var(--terra-table-cell-content-padding, 7px);
    position: relative;

    &:first-child {
      border-left: var(--terra-table-cell-border-left, 1px solid #dedfe0);
    }

    &:focus {
      outline: var(--terra-table-cell-focus-outline, 3px dashed #000);
      outline-offset: var(--terra-table-cell-focus-outline-offset, -5px);
    }

    &.last-pinned-column {
      border-right: var(--terra-table-last-pinned-cell-border-right, 2px solid #808080);
    }
  }

  .selected {
    background-color: var(--terra-table-cell-selected-background-color, #cbe7fa);
  }

  // Create gradient background for masked cells
  .masked {
    background: var(--terra-table-mask-background, repeating-linear-gradient(-45deg, #dedfe0, #dedfe0 3px, transparent 3px, transparent 6px));
  }

  .masked.highlighted {
    background: var(--terra-table-highlight-mask-background, repeating-linear-gradient(-45deg, #cfd2d3, #cfd2d3 3px, #cbe7fa 3px, #cbe7fa 6px));
  }

  .column-highlight-orange {
    background-color: var(--terra-table-cell-highlighted-orange-background-color, rgba(250, 203, 170, 0.38));
    box-shadow: var(--terra-table-cell-highlighted-box-shadow, inset 1px 0 0 0 #c97318, inset -1px 0 0 0 #c97318);
  }

  .column-highlight-green {
    background-color: var(--terra-table-cell-highlighted-green-background-color, rgba(87, 146, 47, 0.15));
    box-shadow: var(--terra-table-cell-highlighted-green-box-shadow, inset 1px 0 0 0 #57922f, inset -1px 0 0 0 #57922f);
  }

  .first-highlight-orange {
    background-color: var(--terra-table-cell-highlighted-orange-background-color, rgba(250, 203, 170, 0.38));
    box-shadow: var(--terra-table-cell-highlighted-orange-first-box-shadow, inset 1px 0 0 0 #c97318, inset -1px 0 0 0 #c97318, inset 0 1px 0 0 #c97318);
  }

  .first-highlight-green {
    background-color: var(--terra-table-cell-highlighted-green-background-color, rgba(87, 146, 47, 0.15));
    box-shadow: var(--terra-table-cell-highlighted-green-first-box-shadow, inset 1px 0 0 0 #57922f, inset -1px 0 0 0 #57922f, inset 0 1px 0 0 #57922f);
  }

  .last-highlight-orange {
    background-color: var(--terra-table-cell-highlighted-orange-background-color, rgba(250, 203, 170, 0.38));
    box-shadow: var(--terra-table-cell-highlighted-orange-last-box-shadow, inset 1px 0 0 0 #c97318, inset -1px 0 0 0 #c97318, inset 0 -1px 0 0 #c97318);
  }

  .last-highlight-green {
    background-color: var(--terra-table-cell-highlighted-green-background-color, rgba(87, 146, 47, 0.15));
    box-shadow: var(--terra-table-cell-highlighted-green-last-box-shadow, inset 1px 0 0 0 #57922f, inset -1px 0 0 0 #57922f, inset 0 -1px 0 0 #57922f);
  }

  .cell-content {
    overflow: hidden;
    overflow-wrap: break-word;
    text-align: left;

    // Blank and masked cell styles
    .no-data-cell {
      // Text is transparent so that it is only visible to screen readers
      color: transparent;
    }
  }

  .pinned {
    position: sticky;
    z-index: 1;
  }

  .pinned:not(.selected) {
    background-color: inherit;
  }

  // Hover state for selectable elements
  tr:nth-child(odd) .selectable:hover {
    background-color: var(--terra-table-odd-row-hover-background-color, #e0f2fb);
    cursor: pointer;
  }

  tr:nth-child(even) .selectable:hover {
    background-color: var(--terra-table-even-row-hover-background-color, #d3e5ee);
    cursor: pointer;
  }
}
