$treeNodePadding: 1.175rem;

.container {
  --ax-panel-body-padding: 0;
  --ax-panel-header-border: 0;
  border: var(--ax-panel-border) !important;
  &.toolbar {
    --ax-panel-header-title-padding: 0 0.5rem;
  }
}

.noTitle > *:first-child > * {
  padding: 0;
  min-height: 2rem;
}

.hasHeader {
  margin: 0.125rem;
}

.hasNewHeader:not(.noHeader) {
  margin-top: 0.125rem;
  margin-bottom: 0.125rem;
}

.tree {
  border-radius: 0;
  --ax-expandable-form-view-padding: 0 0 0 #{$treeNodePadding};
  [dir="rtl"] & {
    --ax-expandable-form-view-padding: 0 #{$treeNodePadding} 0 0;
  }
}

.noHeader {
  border-color: transparent;
  border-width: 0;
}

.container.tree {
  border-left-width: 1px;
}

.noHeader.tree {
  border-left: var(--ax-panel-border) !important;
}

.noHeader:not(.tree) > * {
  border-left: var(--ax-panel-border);
}

.noHeader > *:first-child {
  display: none;
}

.tree-grid {
  --bs-table-striped-bg: var(--bs-body-bg);
  --bs-table-body-border: none;
}

.tree-grid > * {
  min-height: unset !important;
}

.tree-grid-empty {
  border-color: transparent;
  height: 0;
}

.grid {
  overflow: auto;
}

.tree:has(.sub-tree-grid) {
  background-color: var(--bs-table-bg);
}

.sub-tree-grid {
  overflow: hidden !important;
}

.grid:not(.hasDetails) {
  height: 100%;
}

.no-border-grid {
  --bs-table-header-border: none;
  --bs-table-footer-border: none;
  .grid:not(&) {
    --bs-table-header-border: 1px solid var(--bs-table-border-color);
    --bs-table-footer-border: 1px solid var(--bs-table-border-color);
  }
}

.tree.hasNewHeader {
  border: none;
  & > div > div {
    background-color: unset;
  }
}

.title {
  display: flex;
  align-items: center;
}

.titleText {
  display: flex;
  flex: 1;
}

.bar {
  --ax-command-bar-button-padding: 0.25rem;
}

:export {
  treeNodePadding: $treeNodePadding;
}

.addTextBtn {
  --bs-border-radius: 1rem;
  --bs-btn-padding-y: 0.0625rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-weight: 700;
  --bs-btn-font-size: 0.75rem;
}
[dir="ltr"] .addTextIcon {
  margin-left: -0.25rem;
}
[dir="rtl"] .addTextIcon {
  margin-right: -0.25rem;
}
