/**
 * @license
 * Copyright Endlessjs. 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 el-tree-grid-theme() {
  $border-width: el-theme(tree-grid-cell-border-width);
  $border-style: el-theme(tree-grid-cell-border-style);
  $border-color: el-theme(tree-grid-cell-border-color);

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

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

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

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

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

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

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