/* NGX-BOOTSTRAP ACCORDION THEME OVERRIDES
   -------------------------------------------------------------------------------------------------------------------------------------------- */

   accordion {
    .card-header {
      background-color: $white;
      position: relative;
      padding-right: 0;
      padding: 5px 0;
      border: none;
    }

    .card-body {
      padding: 0;
    }

    .panel-open > .card {
      & > .card-header .#{ $theme-prefix }-accordion__heading--with-arrow .#{ $theme-prefix }-accordion__col:first-child::before {
        content: "\f107";
      }
    }
  }

  .#{ $theme-prefix }-accordion {
    &__body {
      // padding: 15px 0;
    }

    &__parent {

      &--striped {
        .#{ $theme-prefix }-accordion__first-level {
          .card-header {
            padding: 0;
          }
          .#{ $theme-prefix }-accordion__col {
            padding: 15px 0;
          }
          &:nth-child(even) .#{ $theme-prefix }-accordion__row {
            background-color:rgb(249, 249, 249);
          }
          &:nth-child(odd) .#{ $theme-prefix }-accordion__row {
            background-color: white;
          }
          &:hover .#{ $theme-prefix }-accordion__row {
            background-color:#f5f5f5;
          }
          &.panel-open .#{ $theme-prefix }-accordion__row {
            background-color: white;
          }
          & .panel-open .#{ $theme-prefix }-accordion__row {
            background-color: white;
          }
          & .panel-collapse .#{ $theme-prefix }-accordion__row {
            background-color: white;
          }
          & .card {
            border-bottom: 1px solid rgba(0, 0, 0, 0.125);
          }
        }
      }
    }

    &__header {
      padding: 0.75rem 0;
      border-bottom: 2px solid $secondary;
    }

    &__heading {
      cursor: pointer;

      &--with-arrow .#{ $theme-prefix }-accordion__col:first-child {
        position: relative;
        padding-left: 20px;

        &::before {
          content: "\f105";
          @include fontawesome;
          font-size: 22px;
          font-weight: 800;
          display: block;
          position: absolute;
          left: 0;
          top: 50%;
          transform: translateY(-50%);
        }
      }
    }

    &__row {
      width: 100%;
      display: flex;
    }

    &__col {
      flex-grow: 1;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      position: relative;

      &--2 {
        width: calc(100% / 2);
      }
      &--3 {
        width: calc(100% / 3);
      }
      &--4 {
        width: calc(100% / 4);
      }

      &--tree {
        width: 60%;
        min-width: 400px;
      }

      &--no-arrow::before {
        display: none !important;
      }

      &--center {
        display: flex;
        justify-content: center;
      }

      &--right {
        display: flex;
        justify-content: flex-end;
      }
    }
  }
