/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@import 'tree-grid-sort.component.theme';

@mixin nb-tree-grid-theme() {
  $border-width: nb-theme(tree-grid-cell-border-width);
  $border-style: nb-theme(tree-grid-cell-border-style);
  $border-color: nb-theme(tree-grid-cell-border-color);

  .nb-tree-grid-header-cell,
  .nb-tree-grid-cell,
  .nb-tree-grid-footer-cell {
    height: nb-theme(tree-grid-row-min-height);
    padding: nb-theme(tree-grid-cell-padding);
    border: $border-width $border-style $border-color;
  }

  .nb-tree-grid-header-row {
    background: nb-theme(tree-grid-header-background-color);
    color: nb-theme(tree-grid-header-text-color);
    font-family: nb-theme(tree-grid-header-text-font-family);
    font-size: nb-theme(tree-grid-header-text-font-size);
    font-weight: nb-theme(tree-grid-header-text-font-weight);
    line-height: nb-theme(tree-grid-header-text-line-height);
  }

  .nb-tree-grid-footer-row {
    background: nb-theme(tree-grid-footer-background-color);
    color: nb-theme(tree-grid-footer-text-color);
    font-family: nb-theme(tree-grid-footer-text-font-family);
    font-size: nb-theme(tree-grid-footer-text-font-size);
    font-weight: nb-theme(tree-grid-footer-text-font-weight);
    line-height: nb-theme(tree-grid-footer-text-line-height);
  }

  .nb-tree-grid-row {
    background: nb-theme(tree-grid-row-background-color);
    color: nb-theme(tree-grid-row-text-color);
    font-family: nb-theme(tree-grid-row-text-font-family);
    font-size: nb-theme(tree-grid-row-text-font-size);
    font-weight: nb-theme(tree-grid-row-text-font-weight);
    line-height: nb-theme(tree-grid-row-text-line-height);
    &:hover {
      background: nb-theme(tree-grid-row-hover-background-color);
    }
    &:nth-child(2n):not(:hover) {
      background-color: nb-theme(tree-grid-row-even-background-color);
    }
  }

  .nb-tree-grid-header-cell {
    button {
      vertical-align: middle;
    }
  }

  nb-tree-grid-row-toggle, nb-sort-icon {
    nb-icon {
      font-size: inherit;
      vertical-align: middle;
      color: currentColor;
    }
  }

  @include nb-tree-grid-sort-header-theme();
}
