.sidebar_first:has(#block-openintranet-theme-knowledge-base-book) {
  @include media-breakpoint-down(md) {
    background: $white;
    margin-bottom: 1rem;
  }
}

#block-openintranet-theme-knowledge-base-book {
  margin-top: 3rem;

  @include media-breakpoint-down(md) {
    margin-top: 0;
    margin-bottom: 0;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
  }
  a{
    font-size: 0.875rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    display: $body-color;
  }
  .accordion-item-block {
    & > .accordion-header {
      display: flex;

      h2 {
        width: 100%;

        &:hover {
          background: transparent;
        }
      }

      .accordion-button {
        @include media-breakpoint-up(md) {
          display: none;
        }

        &:after {
          --bs-accordion-btn-icon: url('../images/icons/plus.svg');
          --bs-accordion-btn-active-icon: url('../images/icons/minus.svg');
        }
      }
    }
  }

  .accordion-button, .accordion-item, .accordion-body {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;

    h2 {
      margin: 0;
      padding-right: 16px;

      &:hover {
        background: $navy-gray-25;
      }

      a {
        color: $body-color;
        width: 100%;
        padding-left: 16px;

        @include body-500;
        display: block;
        &.active {
          font-weight: 600;
        }

        :hover {
          color: $body-secondary-color;
        }
      }

      &:has(a.active) {
        background: $navy-gray-25;
      }
    }
  }

  .accordion {
    .accordion-item .accordion-collapse {
      & > .accordion-body:has(.accordion-collapse > .accordion-item) {
        padding-left: 24px;
      }

      & > .accordion-body:not(:has(.accordion-collapse > .accordion-item)) {
        padding-left: 12px;
      }
    }
  }

  .accordion-item {
    .accordion-body h2, .accordion-body .accordion-body {
      border-left: 1px solid $blue-400;
    }
  }

  .accordion-item-navigation {
    padding-left: 16px;
    border-left: 1px solid $navy-gray-100;

    a {
      color: $body-color;
      &:hover {
        color: $body-secondary-color;
      }

      &.active {
        color: $body-secondary-color;
      }
    }

    .accordion-item-navigation {
      &__h3 {
        padding-left: 16px
      }

      &__h4 {
        padding-left: 28px
      }
    }
  }

  h2 {
    @include heading-5;

    border-bottom: none;

    &:after {
      background: none;
    }
  }

  h3 {
    @include subtitle-300;

    text-transform: uppercase;
    font-weight: 700;
    padding-left: 16px;
    padding-right: 16px;
    padding-top:24px;
  }

  input {
    margin-bottom: 16px;
  }
}

aside.section:has(#block-openintranet-theme-knowledge-base-book) {
  position: sticky;
  top: 56px;
}
