@import "../../styles/variables";

:host {
  ::ng-deep th.resize-enabled span.p-column-resizer {
    width: 8px;
    border: none;
    padding-left: 6px;

    &:hover {
      background: $blue-300;
      background-clip: content-box;
    }
  }

  ::ng-deep th.resize-disabled span.p-column-resizer {
    cursor: auto;
  }

  ::ng-deep .p-column-resizer-helper {
    background-color: $blue-300;
    z-index: 1000;
  }

  ::ng-deep .p-datatable-scrollable-view .p-datatable-scrollable-body {
    flex: 1 1 0 !important;
  }

  .table-header {
    height: 45px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid $blue-500;
  }

  .table-header-title {
    font-weight: bold;
  }

  .table-actions {
    padding-top: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 24px;
  }

  .selected-col-header {
    pointer-events: none;
  }

  .table-load-more {
    &:hover {
      background-color: transparent !important;
    }
  }

  .load-more-wrapper {
    padding: 32px 0;

    button {
      padding: 8px 40px;
    }

    .load-spinner {
      display: inline-block;
      vertical-align: middle;
      background-image: url("#{$assets-icons-path}/Spinner.svg");
      background-repeat: no-repeat;
      background-size: 16px;
      width: 16px;
      height: 16px;
      margin-right: 6px;

    }
  }


  .no-data {
    text-align: center;
    padding: 15px 0 10px 0;
    font-size: 14px;
  }

  tr {
    transition: height 0.5s cubic-bezier(.55,.06,.68,.19);
    &:hover:not(.header):not(.selected):not(.no-data-row):not(.simple) {
      background-color: $blue-650;
    }

    &.checked:not(.header):not(.selected):not(.no-data-row):not(.simple) {
      background-color: $blue-500;
      .td{
        border-bottom-color: $blue-600;
      }

      &:hover, &.contexted {
        background-color: $blue-550;
      }
    }

    &.selected {
      .td{
        border-bottom-color: $blue-600;
      }
      background-color: $blue-400;

      &:hover {
        background-color: $blue-480;
      }
    }


    &.header {
      height: 48px;
    }

    th {
      position: sticky;
      top: -1px;
      background-color: $blue-700;
      vertical-align: middle;
      color: $blue-300;
      border-bottom: 1px solid $blue-600;

      &.disable-drag {
        cursor: initial !important;
      }

      .col-header {
        text-align: left !important;
        font-size: 12px !important;
        font-weight: 500;
      }

      &:hover {
        background-color: $blue-600;
      }
    }

    td {
      vertical-align: middle;
      color: $blue-100;
      font-size: 1rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      &:not(.no-data):not(.load-more-wrapper){
        border-bottom: 1px solid #303443;
        &.simple{
          border-bottom-color: $blue-100;

        }
      }



      &.no-data {
        color: $blue-250;
        text-align: center;
        padding: 15px 0 10px 0;;
      }
    }
  }

  :host-context(.light-theme) {
    tr {
      &:hover:not(.header):not(.no-data-row):not(.simple) {
        background-color: $blue-100;
      }

      &:not(.even):not(.selected):not(.no-data-row):not(:hover):not(.simple) {
        background-color: $blue-50;
      }

      &.header {
        @supports (-moz-appearance:meterbar) {
          border-bottom: 3px solid #364164;
        }
      }

      th {
        background-color: white;
        color: $blue-400;
        font-weight: 500;
        border-bottom: none;
      }

      td {
        color: $blue-400;
        border-bottom: none;
        &.no-data {
          color: $blue-300;
        }
      }
    }
  }
}
