@import '~@capillarytech/cap-ui-library/styles/_variables';
// cap-tree select styles are getting over written by filters styles, so this styles are needed
.cap-tree-select-v2-scope-selection {
  /* TODO: antd v3 class removed in v5 — review */
  .ant-select-selector {
    border: 1px solid $CAP_G06;
  }
  .ant-select-selection-item {
    font-size: 14px;
  }
}

.cap-tree-select-v2-scope-selection-dropdown.ant-select-dropdown--single {
  .ant-select-dropdown-search {
    padding: 4px 14px;
  }
  .ant-select-tree {
    height: unset;
    li {
      height: unset;
      margin-right: 0 !important;

      &:hover {
        background-color: unset;
      }

      .ant-select-tree-node-content-wrapper {
        display: inline-block;
        margin-left: 0;
        padding: 0;

        &:hover {
          background-color: unset;
        }
        &.ant-select-tree-node-selected {
          color: map-get($CAP_SECONDARY, base);
          font-weight: unset;
          background-color: $CAP_PALE_GREY;
          display: inline-flex;
        }
      }
      &.ant-select-tree-treenode-selected {
        color: map-get($CAP_SECONDARY, base);
        background-color: $CAP_PALE_GREY;
        border-left: 2px solid  map-get($CAP_SECONDARY, base);
      }
      ul.ant-select-tree-child-tree.ant-select-tree-child-tree-open .ant-select-tree-node-content-wrapper {
        padding-left: 14px;
        &.ant-select-tree-node-selected {
          padding-left: 12px;
        }
      }

      span.ant-select-tree-switcher.ant-select-tree-switcher-noop {
        display: inline-block;
      }
    }

    .ant-select-tree-child-tree-open {
      height: unset;
    }
  }
  ul.ant-select-tree  {
    li.ant-select-tree-treenode-switcher-close, li.ant-select-tree-treenode-switcher-open {
      margin-bottom: 4px;
    // important needed here because this style is getting over written in filters and important is used in filter css
      font-family: 'Roboto',Arial,sans-serif !important;
      font-size: 14px;
      .ant-select-tree-title {
        font-family: 'Roboto',Arial,sans-serif !important;
      }
    }
  }
}