// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) KALEIDOS INC Sucursal en España SL

@use "ds/_borders.scss" as *;

.token-tree-wrapper {
  --node-spacing: var(--sp-s);

  padding-block-end: var(--sp-s);
  display: flex;
  flex-wrap: wrap;
  padding-inline-start: calc(var(--node-spacing));
  gap: var(--sp-xs);

  & .node-parent {
    flex: 1 0 100%;

    &:last-of-type + * {
      margin-block-end: var(--sp-s);
    }
  }

  & .token-pill {
    flex: 0 0 auto;
  }
}

.node-parent {
  margin-block-end: 0;
}

.folder-children-wrapper {
  margin-inline-start: var(--sp-s);
  padding-inline-start: var(--sp-s);
  border-inline-start: $b-2 solid var(--color-background-quaternary);

  &:has(> button) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
  }

  & .node-parent {
    flex: 1 0 100%;

    &:last-of-type {
      margin-block-end: var(--sp-s);
    }
  }

  & .token-pill {
    flex: 0 0 auto;
  }
}
