// Lightning Design System 2.264.0-beta.1
.slds-tree {
  /**
    * @name item-disabled
    * @summary When a branch doesn't have children, apply slds-is-disabled to the button icon
    * @selector .slds-is-disabled
    * @restrict .slds-tree__item button
    * @modifier
    * @group interactions
    * @deprecated
    */
  @include deprecate('4.0.0', '.slds-is-disabled is deprecated in .slds-tree__item, use .slds-is-hidden instead') {

    .slds-tree__item .slds-is-disabled {
      visibility: hidden;
    }
  }

  /**
    * @name item-selected
    * @summary Selected state for a tree item
    * @selector .slds-is-selected
    * @restrict .slds-tree__item
    * @notes Class should be applied via Javascript
    * @deprecated
    */
  @include deprecate('4.0.0', '.slds-is-selected is deprecated in .slds-tree, rely on aria-selected attribute') {

    .slds-is-selected {
      background: var(--slds-g-color-neutral-base-95, #{$color-background-row-selected});
      box-shadow: var(--slds-g-color-brand-base-50, #{$color-background-button-brand}) 4px 0 0 inset;
    }
  }

  /**
    * @name item-focused
    * @summary Focus state for a tree item
    * @selector .slds-is-focused
    * @restrict .slds-tree__item
    * @deprecated
    */
  @include deprecate('4.0.0', '.slds-is-focused is deprecated in .slds-tree, rely on the :focus pseudo class on the role="treeitem" element') {

    .slds-is-focused {
      text-decoration: underline;
    }
  }

  @include deprecate('4.0.0', 'Use of aria-controls in slds-tree is deprecated') {
    // scss-lint:disable SelectorDepth
    [aria-expanded="false"] > .slds-tree__item > .slds-button[aria-controls] > .slds-button__icon,
    [aria-expanded="false"] > .slds-tree__item > .slds-button[aria-controls] > span > .slds-button__icon {
      transition: $duration-promptly transform ease-in-out;
      transform: rotate(0deg);
    }

    [aria-expanded="true"] > .slds-tree__item > .slds-button[aria-controls] > .slds-button__icon,
    [aria-expanded="true"] > .slds-tree__item > .slds-button[aria-controls] > span > .slds-button__icon {
      transition: $duration-promptly transform ease-in-out;
      transform: rotate(90deg);
    }
  }
}

.slds-tree__item {
  @include deprecate('4.0.0', 'Use of anchor tags is deprecated in slds-tree') {

    a {
      color: var(--slds-g-color-neutral-base-10, #{$color-text-default});

      &:hover {
        text-decoration: none;
      }

      &:focus {
        outline: 0;
        text-decoration: underline;
      }
    }
  }
}
