@use "../mixins";

.nodes_tree.list {
  margin: 2em 0;

  &.sorting {
    padding-top: 100px;

    .page_icon {
      cursor: move;
    }
  }

  .sitemap_node-level_0 {
    > .node_name {
      font-weight: bold;
    }
  }

  .node_page,
  .node_url {
    width: 250px;
    max-width: 45%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    gap: var(--spacing-0);

    > a {
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      line-height: 2;

      .external & {
        max-width: 90%;
      }
    }
  }

  .node_page {
    display: inline-flex;
    gap: var(--spacing-1);
    align-items: center;
    padding: 0 var(--spacing-2);
    margin-left: auto;
  }

  .node_url {
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-2);
    white-space: nowrap;
    background-color: var(--sitemap-info-background-color);
    line-height: var(--sitemap-line-height);
    font-size: var(--font-size_small);
    @include mixins.border-right-radius(var(--border-radius_medium));
  }

  .node_folder {
    display: inline-flex;
    cursor: pointer;
  }

  ul {
    margin: 0;
    padding: 0;

    &.folded > li {
      display: none;
    }
  }

  li {
    line-height: var(--sitemap-line-height);
    padding-left: var(--spacing-1);

    li {
      padding-left: var(--sitemap-line-height);
    }
  }
}

#node_filter_result {
  display: none;
  margin-left: var(--spacing-2);
}

.sitemap_node {
  display: flex;
  align-items: center;
  height: var(--sitemap-line-height);
  margin: var(--spacing-3) 0;
  transition: background-color var(--transition-duration);

  &.highlight {
    background-color: var(--sitemap-highlight-color);
  }

  &.no-match .sitemap_pagename_link {
    color: var(--color-grey_light);
  }

  &:hover {
    background-color: var(--sitemap-page-hover-color);
    border-radius: var(--border-radius_medium);
  }

  .node_name {
    display: flex;
    height: var(--sitemap-line-height);
    flex: 1;
    justify-content: space-between;
    @include mixins.border-left-radius(var(--border-radius_medium));
    padding: 0 0 0 10px;
    margin: var(--spacing-0);
    text-decoration: none;
    overflow: hidden;
    background-color: var(--sitemap-page-background-color);
    cursor: move;

    &.without-status {
      @include mixins.border-right-radius(var(--border-radius_medium));
    }

    &.inactive {
      color: #656565;
    }
  }
}

.nodes_tree-left_images {
  justify-content: center;
  display: flex;
  align-items: center;
  position: relative;
  width: 32px;
  height: var(--sitemap-line-height);
  padding: 0 var(--spacing-2);
}

.nodes_tree-right_tools {
  display: flex;
  height: var(--sitemap-line-height);
  padding: 0 var(--spacing-2);
  align-items: center;

  > a {
    display: inline-flex;
    width: var(--sitemap-line-height);
    height: var(--sitemap-line-height);
    align-items: center;
    text-decoration: none;
    margin: 0;

    &.disabled .icon {
      opacity: 0.25;
      filter: grayscale(100%);
    }
  }

  .icon.blank {
    margin-left: var(--spacing-0);
    float: left;
    margin-top: 3px;
    margin-right: 3px;
  }
}
