@use "sass:map";
@use '@angular/material' as mat;
@import "../variables";

.tree-node-container {
  min-height: 0 !important;
}

.tree-node-content {
  padding-left: 0.5rem;
  height: 40px;
  width: -webkit-fill-available;  
  display: flex;
  align-items: center;
}

.tree-node-icon {
  width: 1rem !important;
  min-width: 1rem;
  height: 1rem !important;
  font-size: 0.5rem !important;
  margin-right: $list-icon-margin;
  margin-top: 3px;
}

.tree-node-caption {
  line-height: 16px !important;
}

.mat-mdc-checkbox {
  --mdc-checkbox-state-layer-size: 1rem;

  .mat-mdc-checkbox-ripple,
  .mdc-checkbox__ripple {
    display: none;
  }

  label {
    padding-left: 0.5rem !important;
  }
}

@mixin set-tree-background($theme) {
  $config: mat.get-color-config($theme);
  $hover: map.get($config, hover);
  $selected: map.get($config, selected-button);

  .mat-tree-node-content-interactive:hover {
    background-color: $hover;
  }

  .mat-tree-node-content-interactive-selected {
    background-color: $selected;
  }

  .mat-tree-node-content-interactive-selected:hover {
    background-color: $selected;
  }

  .mat-tree-node-content-interactive:active {
    background-color: $selected;
  }

  .mat-tree {
    background: transparent;
  }
}
