.easydocs-accordion {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  margin-top: 10px;
  margin-bottom: 20px;
  background: var(--clr-white);
  border-radius: 5px;
  overflow: hidden;

  .acc_active {
    .accordion-title {
      border-bottom: 1px solid #EDEAE9;
      @include before {
        transform: translateY(-50%) rotate(90deg);
      }
    }

    > .accordion-title {
      background: #F9F9F9;
    }
  }

  .ui-state-highlight {
    height: 50px;
    background: #F9F9F9;
    @include border(by, $color: #AFABAC)
  }
}

.easydocs-accordion-item {
  width: 100%;
  margin: 0;

  &.is-accordion-open {
    &:last-child {
      .accordion-title {
        @include radius(bottom, 0);
      }
    }
  }

  &.child-one {

    .child-right-content {
      align-items: center;

      .progress-text {
        font-size: var(--fs-12);
        color: var(--clr-text-light);
        margin-right: var(--gutter-30);
      }
    }

    .accordion-title {
      @include before {
        transform: translateY(-50%);
      }

    }

    &.acc_active {
      .accordion-title {
        @include before {
          transform: translateY(-50%) rotate(90deg);
        }
      }
    }

    h4 {
      > a {
        padding: 0 0 0 25px;
      }
    }

    .accordion-title.has-child a {
      &.section-last-label {
        margin-left: 19px
      }
    }

    .accordion-title.has-child::before {
      left: 52px;
    }

    .nesting-accordion a {
      &.child-last-label {
        margin: 10px 50px 10px 70px;
      }
    }
  }

}

.accordion-title {
  position: relative;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 20px;
  height: 20px;

  &.ez-section-title {
    h4 {
      margin: 0;
      font-weight: var(--fw-500);
    }
  }

  // Toggle Icon
  &.has-child, &.ez-section-title {
    @include pseudo(top 50% left 32px) {
      @include triangle(right, 10px, 6px, var(--clr-text));
      transform: translateY(-50%);
      @include property;
    }
  }

  .count {
    margin-left: 10px;
    font-size: 10px;
  }

  &:hover {
    background: #F9F9F9;

    h4 {
      color: var(--clr-dark);
    }

    ul.actions {
      display: flex;

      li {
        margin: 0;
      }
    }
  }

  h4 {
    font-size: var(--fs-14);
    color: var(--clr-text);
    display: flex;
    align-items: center;
    font-weight: normal;
    margin: 0;

    a {
      text-decoration: none;
      color: var(--clr-text);
    }
  }

  .accordion-category-icon {
    @include size(rem(20px));
    line-height: rem(20px);
    border-radius: 50%;
    text-align: center;
    margin-left: 5px;
  }

  .light-green {
    background: rgba(#2DB22D, 0.1);
    --category-icon: #2DB22D;
  }

  .light-orange {
    background: rgba(#CC8033, 0.1);
    --category-icon: #CC8033;
  }

  .light-blue {
    background: rgba(#0275D8, 0.1);
    --category-icon: var(--clr-blue);
  }

  .light-gray {
    background: rgba(#424242, 0.1);
    --category-icon: #424242;
  }

  ul.actions {
    display: none;
    align-items: center;
    gap: var(--gutter-10);
    --section-icon: #9199A1;
    margin-left: 15px;

    .duplicate {
      order: 1;
      .duplicate-title{
        display: none;
      }
    }
    
    .visibility {
      .visibility-title {
        display: none;
      }
    }

    .delete {
      order: 2;
    }

    li {
      @include hover {
        --section-icon: var(--clr-dark);
      }

      a {
        text-decoration: none;
        .dashicons {
          color: var(--black_150);
          font-size: 18px;

          &:hover {
            color: var(--black_400)
          }
        }

        img {
          opacity: 0.5;
          @include hover {
            opacity: 1;
          }
        }

        &.eazydocs-pro-notice .dashicons {
          color: #f1bd6c
        }
      }
    }
  }

  .left-content {
    display: flex;
    align-items: center;
  }

  .right-content {
    display: flex;
    align-items: center;

    .progress-text {
      font-size: var(--fs-12);
      color: var(--clr-text-light);
      margin-left: var(--gutter-30);
    }
  }
}

.accordion-title:not(.has-child) h4 a.section-last-label {
  margin-left: 2px;
}

/** === EazyDocs Premium Style === **/
.easydocs-accordion-body {
  background: var(--clr-white);
  color: var(--clr-text);
  font-size: var(--fs-14);
  padding: 10px 50px 10px 50px;
  display: none;
}

.nesting-accordion {
  padding: 0;

  a {
    padding: 10px 50px 10px 50px;
    text-decoration: none;
    color: var(--clr-text);
    display: block;
  }
}

.child-docs-wrap {
  border-bottom: 1px solid #EDEAE9;
  margin: 0;

  &:hover {
    background-color: #F9F9F9;
  }

  .child-right-content {
    visibility: hidden;
  }

  @include hover {
    .child-right-content {
      visibility: visible;
    }
  }
}

a.child-delete,
a.child-view-link {
  padding-left: 5px !important;
  padding-right: 5px !important;

  img {
    opacity: 0.5;
    @include hover {
      opacity: 1
    }
  }
}

a.child-delete {
  padding-right: 28px !important;
}

// rtl
body.rtl {
  .accordion-title h4 {
    gap: 10px;
  }

  .ezd-badge {
    padding: 1px 9px;
  }

  .nestables-child .dd3-handle {
    right: 0;
  }

  .nestables-child .dd-item > button {
    float: right;
  }

  .nestables-child .dd-item > button {
    margin: 1px 32px 0 0px;
  }

  .dd3-content {
    padding: 13px 30px 13px 25px;
  }

  .accordion-title .right-content .progress-text {
    margin-left: 0;
  }

  .nestables-child .dd-list .dd-list .dd-item > button {
    margin-left: 0;
  }

  .accordion-title .left-content {
    gap: 10px;
    margin-right: 10px;
  }

  a.child-delete {
    padding-right: 0px !important;
  }
}