@import 'functions/rem';
@import 'mixins/list';
@import 'variables/colors';
@import 'variables/gutters';
@import 'variables/shadows';

.tree-nodes-selector-panel {
  position: relative;
  background-color: var(--digi--ui--color--background);
  min-width: rem(710);
  box-shadow: $msfa__shadow;
  border-radius: var(--digi--ui--border--radius);

  header {
    margin: 0;
    padding: 0;
    border-width: 0;
    position: relative;
  }

  &__heading {
    width: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    font-size: var(--digi--typography--font-size--h4);
    padding: $digi--layout--gutter--m $digi--layout--gutter;
    border-bottom: 1px solid var(--digi--typography--color--text--disabled);
  }

  &__clear-btn {
    position: absolute;
    z-index: 20;
    right: 0;
    top: 0;
    display: block;
    background-color: transparent;
    border-width: 0;
    color: var(--digi--ui--color--danger);
    padding: $digi--layout--gutter--m $digi--layout--gutter;
    font-size: var(--digi--typography--font-size--xs);
  }

  &__expanded-nodes {
    @include msfa__reset-list;
    display: flex;
    flex-direction: row;
    overflow: auto;
    max-width: 100%;
  }

  &__expanded-node {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 50%;
    max-width: 50%;
    overflow: auto;
    padding-top: $digi--layout--gutter--m;
    padding-bottom: $digi--layout--gutter--l;
    border-left: 1px solid var(--digi--typography--color--text--disabled);

    &:first-child {
      border-left-width: 0;
    }
  }

  footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--digi--ui--color--background--tertiary);
    padding: $digi--layout--gutter--m $digi--layout--gutter--l;
  }
}
