// Copyright 2016 Palantir Technologies, Inc. All rights reserved.

@import "../common/loading";
@import "../common/variables";
@import "./common";

.#{$ns}-table-cell {
  @include cell();
  @include cell-cursors();

  &.#{$ns}-table-truncated-cell {
    overflow: hidden;
  }

  &.#{$ns}-large,
  .#{$ns}-large & {
    @include cell-large();
  }

  &.#{$ns}-loading {
    @include cell-content-align-vertical();
    color: transparent;
  }

  &:focus {
    // disable focus outline on cells; we already have the focus border
    outline: none;
  }
}

.#{$ns}-table-cell-interactive {
  z-index: $interactive-cell-z-index;
}

.#{$ns}-table-striped {
  .#{$ns}-table-cell-ledger-even {
    background-color: $cell-background-color;
  }

  .#{$ns}-table-cell-ledger-odd {
    background-color: mix($table-background-color, $cell-background-color, 50%);
  }

  .#{$ns}-dark & {
    .#{$ns}-table-cell-ledger-even {
      background-color: $dark-cell-background-color;
    }

    .#{$ns}-table-cell-ledger-odd {
      background-color: mix($dark-table-background-color, $dark-cell-background-color, 50%);
    }
  }
}

.#{$ns}-table-editable-name input {
  height: $cell-height; // fixed height for IE11
}

.#{$ns}-table-editable-text {
  bottom: 0;
  left: 0;
  padding: $cell-padding;
  position: absolute;
  right: 0;
  top: 0;
}

.#{$ns}-table-cell-text-placeholder {
  color: $pt-text-color-muted;

  .#{$ns}-dark & {
    color: $pt-dark-text-color-muted;
  }
}
