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

:local {
  .container {
    border-right: var(--terra-clinical-data-grid-cell-border-right, 1px solid #dedfe0);
    float: left;
    height: 100%;
    position: relative;
  }
  
  .content {
    height: 100%;
    position: relative;
    width: 100%;

    &:focus {
      background-color: var(--terra-clinical-data-grid-cell-focus-background-color);
      box-shadow: var(--terra-clinical-data-grid-cell-focus-box-shadow, inset 0 0 0 1px rgba(38, 162, 229, 0.5), inset 0 0 0 4px rgba(76, 178, 233, 0.2));
      outline: none;
    }

    &:active {
      box-shadow: var(--terra-clinical-data-grid-cell-active-box-shadow, none);
    }
    
    @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none), (hover: hover) and (pointer: fine) {
      &.selectable:hover {
        background-color: var(--terra-clinical-data-grid-cell-hover-background-color, rgba(0, 146, 224, 0.12));
        cursor: pointer;
      }
    }

    &.selected {
      background-color: var(--terra-clinical-data-grid-cell-selected-background-color, #cbe7fa);
      box-shadow: var(--terra-clinical-data-grid-cell-selected-box-shadow, inset 0 0 0 1px #0092e0);

      &:focus {
        background-color: var(--terra-clinical-data-grid-cell-selected-focus-background-color, #cbe7fa);
        box-shadow: var(--terra-clinical-data-grid-cell-selected-focus-box-shadow, inset 0 0 0 1px #0092e0, inset 0 0 0 4px rgba(76, 178, 233, 0.3));
        outline: none;
      }
      
      /* stylelint-disable max-nesting-depth */
      @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none), (hover: hover) and (pointer: fine) {
        &:hover {
          background-color: var(--terra-clinical-data-grid-cell-selected-hover-background-color, #b3ddf7);
        }
      }
      /* stylelint-enable max-nesting-depth */
    }
  }

  *[data-allow-column-highlight] .highlighted,
  *[data-allow-column-highlight] .highlighted-selectable:not(:hover):not(:focus):not(:active) {
    background-color: var(--terra-clinical-data-grid-cell-highlighted-not-hover-not-focus-not-active-background-color, rgba(250, 203, 170, 0.38));
    box-shadow: var(--terra-clinical-data-grid-cell-highlighted-not-hover-not-focus-not-active-box-shadow, inset 1px 0 0 0 #c97318, inset -1px 0 0 0 #c97318);
      
    &.first {
      box-shadow: var(--terra-clinical-data-grid-cell-highlighted-not-hover-not-focus-not-active-first-box-shadow, inset 1px 0 0 0 #c97318, inset -1px 0 0 0 #c97318, inset 0 1px 0 0 #c97318);
    }
      
    &.last {
      box-shadow: var(--terra-clinical-data-grid-cell-highlighted-not-hover-not-focus-not-active-last-box-shadow, inset 1px 0 0 0 #c97318, inset -1px 0 0 0 #c97318, inset 0 -1px 0 0 #c97318);
    }

    &.first.last {
      box-shadow: var(--terra-clinical-data-grid-cell-highlighted-not-hover-not-focus-not-active-first-last-box-shadow, inset 0 0 0 1px #c97318);
    }
  }
}
