.container {
  display: flex;
  max-width: var(--main-container-max);
  margin: var(--container-margin-mobile, 0 auto);
  padding: var(--container-padding-mobile, 0 2.4rem 2rem 2.4rem);
  border: var(--container-border, none);
  background: var(--container-background-color, transparent);

  @include min(mobile) {
    padding: var(--container-padding-desktop, 0 1.6rem 2rem 1.6rem);
    margin: var(--container-margin-desktop, 0 auto);
  }

  @include max(mobile) {
    display: block;
  }
}

.list {
  @include max(mobile) {
    width: 100% !important;
  }

  > ul {
    display: flex;
    flex-direction: column;
    padding: 1rem;

    > div {
      position: relative;
      @include flex-align(flex-start, flex-start);
      
      &::after {
          content: ' ';
          border-right: var(--sitemap-connector-border, dashed 1px #e3e6ef);
          left: -1px;
          position: absolute;
          top: 0%;
          width: 2.5rem;
          height: 103%;
          display: var(--sitemap-header-line-border, block);
        }

      svg {
        fill: var(--template-name-icon-color, white);
        background-color: var(--template-name-icon-background, red);
        padding: 1rem;
        width: 4.8rem;
        height: 4.8rem;
        border-radius: 2.8rem;
      }

      > span {
        color: var(--template-name-color, black);
        font-weight: 700;
        font-size: var(--template-name-font-size, 2rem);
        margin-left: 1.6rem;
        text-transform: capitalize;
        word-break: break-word;
      }

      > div {
        position: relative;
        display: flex;
        align-items: center;
        z-index: 3;

        span {
          @include flex-align(center, center);
          position: absolute;
          top: var(--sitemap-span-top, -1.2rem);
          background-color: var(--page-number-background, green);
          border-radius: 1.2rem;
          border: var(--page-number-border, 0.2rem solid white);
          margin: 0;
          font-size: 1rem;
          color: var(--page-number-color, white);
          font-weight: 700;
          width: var(--sitemap-span-width, 2.4rem);
          height: var(--sitemap-span-height, 2.4rem);
          left: 3.2rem;
        }
      }
    }

    > ul {
      position: relative;
      padding-top: 3rem;
      padding-left: 2.7rem;
      margin-left: 2.3rem;

      &:before {
        content: ' ';
        border-left: var(--sitemap-connector-border, dashed 1px #e3e6ef);
        left: 0;
        position: absolute;
        top: 0;
        width: 2.5rem;
        height: 4.2rem;
      }

      li {
        display: grid;
        grid-template-columns: 0.1fr 1fr;
        gap: var(--sitemap-gap, 0.5rem);
        padding-bottom: var(--sitemap-padding-bottom, 1rem);
        position: relative;

        &:before {
          content: ' ';
          position: absolute;
          left: -2.7rem;
          width: 2.5rem;
          top: 1.2rem;
          border-bottom: var(--sitemap-connector-border, dashed 1px #e3e6ef);
        }

        &:after {
          content: ' ';
          border-left: var(--sitemap-connector-border, dashed 1px #e3e6ef);
          left: -2.7rem;
          position: absolute;
          top: 0;
          width: 2.5rem;
          bottom: 0;
        }

        &:last-child {
          padding-bottom: var(--sitemap-last-child-padding, 1rem);
        }

        &:last-child:after {
          content: ' ';
          bottom: auto;
          height: 1.2rem;
        }

        svg {
          fill: var(--icon-color, white);
          background-color: var(--icon-background-color, #393939);
          padding: 0.3rem;
          width: 2.4rem;
          height: 2.4rem;
          border-radius: 0.8rem;
        }

        a {
          color: var(--sitemap-link-text-color, #295dd6);
          padding-left: 0.3rem;
          font-size: var(--sitemap-link-font-size, 1.6rem);
          font-weight: var(--sitemap-link-text-font-weight, normal);
          text-decoration: var(--sitemap-link-text-decoration, none);
        }
      }
    }
  }
}
