/*!
  *  Copyright (C) 2019 Robert Bosch GmbH Copyright (C) 2019 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

@import '@bci-web-core/common-styles/sass/bci/bci-variables';
@import '@bci-web-core/common-styles/sass/bci/colors';

$color-disabled: $boschGray80;

:host {
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1 1 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  min-height: 0;
  max-height: 100%;
}

.column-title {
  padding: $grid-size 2 * $grid-size 0 2 * $grid-size;
  color: $boschGray40;
  font-size: $font-size-small;
  font-weight: $font-weight-strong;

  &.disabled {
    color: $color-disabled;
  }
}

.column {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  min-width: 0;

  .column-title {
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &:not(:last-child) {
    border-right: 1px solid $boschGray95;
  }
}

mat-action-list {
  overflow-y: auto;
  flex: 1 1 100%;
  min-height: 0;
  position: relative;
  padding-top: 0;

  &.disabled {
    overflow-y: hidden;
  }

  ::ng-deep .mdc-list-item__content {
    min-height: 5 * $grid-size;
  }
}

[mat-list-item] {
  font-size: $font-size-base;
  height: unset;

  &.selected:not(.disabled),
  &.active:not(.disabled) {
    background-color: $boschGray90;
  }

  &.active:not(:disabled) {
    &.last-active {
      background-color: $boschBlue90;
    }
  }

  &.disabled {
    color: $color-disabled;
    cursor: not-allowed;

    &.active,
    &.selected {
      background-color: $boschGray95;
    }
  }
}
