:root {
    --reactive-list-border-color: #e0e0e0;
    --reactive-list-box-padding: 24px;
    --reactive-list-border-radius: 8px;
    --reactive-list-spacing: 30px;
    --reactive-list-group-spacing: 10px;
    --reactive-list-cat-title-size: 24px;
    --reactive-list-cat-title-margin: 0 0 8px 0;
    --reactive-list-filter-active: #eee;
    --reactive-list-bkg-color: #fff;

}


div.webien-reactive-list-app {

  //@include defaults;

  .top {
    padding: var(--reactive-list-box-padding) 0;
    position: relative;

    .filters {
      display: flex;
      gap: 8px;
      padding: var(--reactive-list-box-padding) 0;
      overflow-x: auto;


      button {
        appearance: none;
        border-radius: 100px;
        padding: 10px 14px;
        color: $black;
        border: 1px solid var(--reactive-list-border-color);

        &:hover,
        &:focus,
        &:active,
        &.active {
          background-color: var(--reactive-list-filter-active);
        }

      }
    }

    input.search {
      width: 100%;
      @include text-input;

    }
  }

  .full_list {
    opacity: 0;
    transition: opacity 0.3s ease;

    .main {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: var(--reactive-list-spacing);
    }


    @include for-desktop-up {
      flex-direction: row;

      &.has-sidebar {
        .main {
          width: calc(100% - 288px);
        }

        .sidebar {
          width: 264px;
        }
      }
    }


    &.ready {
      opacity: 1;
    }
  }


  ul.list-items {
    padding: 0;
    margin: 0 0 var(--reactive-list-group-spacing);

    &.level-1,
    &.level-2,
    &.level-3,
    &.level-4,
    &.level-5{
      padding-left: 40px;

      .a-z {
        font-size: calc(var(--reactive-list-cat-title-size) * 0.8);
      }
    }

    &.level-1 {
      padding-left: 20px;
    }

    .a-z {
      display: block;
      margin: var(--reactive-list-cat-title-margin);
      font-size: var(--reactive-list-cat-title-size);

      @include for-tablet-portrait-up {
        padding-left: 5px;
      }
    }

    &.single,
    .group {
      background: var(--reactive-list-bkg-color);
      border-radius: var(--reactive-list-border-radius);
      margin: var(--reactive-list-group-spacing) 0;

      @include for-tablet-portrait-up {
        border: 1px solid var(--reactive-list-border-color);
      }
    }

    .group {
      &:first-of-type {
        margin-top: 0;
      }
      &:last-of-type {
        margin-bottom: 0;
      }

    }


    li {
      list-style: none;
      position: relative;

      &:last-child {
        button.head,
        a.head,
        .body {
          border-bottom: none;

          &:hover,
          &:focus,
          &:active {
            border-bottom: none;
          }
        }
      }

      button.head,
      a.head {
        padding: 16px 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        position: relative;
        @include normalizeButton;
        border-bottom: 1px solid var(--reactive-list-border-color);
        border-radius: 0;
        transition: none !important;

        @include for-tablet-portrait-up {
          padding: var(--reactive-list-box-padding);
        }

        &:hover,
        &:focus,
        &:active {
          outline-color: transparent;
          border-bottom: 1px solid var(--reactive-list-border-color);

          .title {
            text-decoration: underline;
          }
        }

        &:hover {
          .icon {
            &:after {
              opacity: 1;
            }
          }
        }

        &:focus-visible {
          border-radius: 0;
        }

        .action-icon {
          font-size: 18px;
          transition: transform 0.2s ease-out;
          z-index: 1;
          position: relative;
          line-height: 0;
        }

        .txt {
          flex-grow: 1;
          overflow: hidden;
          position: relative;
          z-index: 1;
          padding-right: var(--reactive-list-box-padding);

          h6 {
            width: 100%;
            white-space: normal;
            margin: 0;
            font-size: 18px;
          }

          .descr {
            color: $gray;
            font-weight: 500;
          }
        }

      }

      .body {
        display: none;
        position: relative;
        z-index: 1;
        border-bottom: 1px solid var(--reactive-list-border-color);


        @include for-tablet-portrait-up {
          padding: var(--reactive-list-box-padding);
        }

        .info {
          padding-bottom: var(--reactive-list-box-padding);
        }

        .download-btn {
          margin-top: var(--reactive-list-box-padding);
          display: block;
          text-align: left;
        }

        li {
          list-style-type: disc;
          list-style-position: inside;

          &:after {
            display: none;
          }
        }

      }


      &.open {
        .head {
          border-bottom: none;

          .icon-chevron-down {
            transform: rotate(180deg);
          }

          &:hover,
          &:focus,
          &:active {
            border-bottom: none;
          }

        }

        .body {
          display: block;
        }
      }


      &:last-child,
      &.open {
        &:after {
          display: none;
        }
      }

      &:hover {
        color: $black;
      }


      &:first-child {
        button.head,
        a.head {
          &:focus-visible {
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
          }
        }
      }

      &:last-child {
        button.head,
        a.head {
          &:focus-visible {
            border-bottom-left-radius: 20px;
            border-bottom-right-radius: 20px;
          }
          &:after {
            display: none;
          }
        }
      }
    }


    &.contain-content {
      .body {
        background: $gray-lighter;
        padding: var(--reactive-list-box-padding) 18px;
        border-top: 1px solid var(--reactive-list-border-color);
        border-bottom: 1px solid var(--reactive-list-border-color);

      }
    }
  }


}
