.simple-grid__right-scrollbar-wrapper {
  position: relative;
  overflow: hidden;
  height: 100%;
  flex: 1;
}

.simple-grid__right-wrapper {
  overflow: hidden;
  height: 100%;
}

.simple-grid__right {
  display: inline-flex;
  flex-direction: column;
  height: 100%;
  padding-right: 30px;
}

.simple-grid__head {
  display: flex;
  flex-wrap: nowrap;
}

.simple-grid__field {
  position: relative;
  width: 150px;
  background-color: $color-neutral-100;
  border-bottom: 1px solid $color-neutral-200;
  border-right: 1px solid $color-neutral-200;

  &.simple-grid__field--first {
    width: 40px;
    border-right: none;
  }
}

.simple-grid__field-description {
  @extend %ellipsis;

  z-index: 1;
  padding: 0 10px;
  width: 100%;

  @include fixed-height(33px, 13px);
}

.simple-grid__field-icon {
  margin-right: 6px;
}

.simple-grid__field-width {
  width: 9px;
  height: 26px;
  cursor: col-resize;
  z-index: 2;

  @include absolute(3px, -5px, 3px, auto);

  &::before {
    content: '';

    @include absolute(0, 2px, 0, 2px);

    border-radius: 2px;
  }

  &:hover::before,
  &.dragging::before {
    background-color: $color-primary-500;
  }
}

.simple-grid__body {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;

  .simple-grid--with-footer & {
    padding-bottom: 0;
  }
}

.simple-grid__cell {
  position: relative;
  width: 150px;
  background-color: $white;
  height: 33px;
  border-bottom: 1px solid $color-neutral-200;
  border-right: 1px solid $color-neutral-200;

  &.simple-grid__cell--first {
    @extend %ellipsis;

    width: 40px;
    line-height: 32px;
    padding-left: 8px;
  }

  &.simple-grid__cell--single {
    width: 100%;
  }

  &.simple-grid__cell--with-checkbox {
    width: 64px;
    padding-right: 22px;
  }
}

.simple-grid__cell-checkbox {
  @include absolute(0, 0, 0, 0);

  display: flex;
  vertical-align: center;
  justify-content: center;
  background-color: inherit;
}

.simple-grid__row--hover {
  cursor: pointer;

  .simple-grid__cell,
  .grid-view__cell {
    background-color: $color-primary-100;
  }
}

.simple-grid__row--disabled {
  cursor: initial;

  .simple-grid__cell,
  .grid-view__cell {
    background-color: $color-neutral-50;
  }
}

.simple-grid__row--checked {
  .simple-grid__cell,
  .grid-view__cell {
    background-color: $color-primary-100;
  }
}

.simple-grid__add-row {
  display: block;
  line-height: 33px;
  color: $color-neutral-900;
  background-color: $white;
  padding-left: 8px;
}

.simple-grid__foot {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding: 0 10px;
  height: 44px;
  background-color: $color-neutral-50;
  border-top: solid 1px $color-neutral-200;
}

.simple-grid__left {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: solid 1px $color-neutral-400;

  .simple-grid__cell,
  .simple-grid__field {
    &:last-child {
      border-right: none;
    }
  }
}

.simple-grid__row--hover.simple-grid__row--checked {
  .simple-grid__cell,
  .grid-view__cell {
    background-color: darken($color-primary-100, 1%);
  }
}

.simple-grid__right-wrapper-footer {
  position: absolute;
  background: #fafafa;
  height: 44px;
  bottom: 0;
  border-top: solid 1px #d9dbde;
  width: 100%;
}

.simple-grid__row {
  display: flex;
  flex-wrap: nowrap;
}

.simple-grid {
  display: flex;

  &.simple-grid--border {
    border: 1px solid $color-neutral-200;
  }

  &.simple-grid--full-height {
    height: 100%;
  }

  &:not(.simple-grid--with-footer) {
    .simple-grid__row,
    .simple-grid__head {
      .simple-grid__cell,
      .simple-grid__field {
        &:last-child {
          border-right: none;
        }
      }
    }
  }
}
