@use "00-base/configure" as *;

.ma__action-step {
  
  &--accordion {
    border-width: 2px;
    border-style: solid;
  }

  &__icon {
    position: absolute;
      top: 25px;
      left: 20px;
    text-align: center;

    & > svg {
      height: 25px;
      width: 25px;
    }
  }

  &:last-child {
    margin-bottom: 0;
  }

  &__header {
    padding: 20px 0 20px 60px;
    position: relative;
  }

  &--accordion &__header {
    border: none;
    display: block;
    padding: 20px 40px 20px 60px;
    text-align: left;
    width: 100%;

    &:after {
      font-size: $fonts-4xlarge;
      content: "+";
      line-height: .65em;
      overflow: hidden;
      position: absolute;
        right: 15px;
        top: 25px;
      transform-origin: center center;
      transition: transform .2s ease;
    }
  }

  &--accordion.is-open &__header:after {
    transform: rotate(135deg);
  }

  &__title {

    @include ma-h5;
    margin-bottom: 0;
    min-height: 32px;
  }

  &__content {
    padding-left: 60px;

    .ma__rich-text {
      margin-bottom: 30px;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  &--accordion &__content {
    padding-bottom: 30px;
    padding-right: 40px;
  }

  .js &--accordion &__content {
    display: none;
  }

  &__downloads {
    margin-bottom: 1em; // for v5.6 and below
  }

  &__more {
    margin-top: 1em;
  }
}

//theme

.ma__action-step {

  &--accordion {
    border-color: $c-bd-divider;
  }

  &--accordion:not(.is-open) &__header {
    background-color: $c-bg-section;
  }

  &--accordion.is-open &__header {
    background-color: transparent;
  }

  &--accordion &__header:after {
    color: $c-primary-alt;
  }

  &__icon {

    svg {
      fill: $c-primary-alt;
    }
  }

  &__title {

    @include ma-h4;
    font-weight: $fonts-bold;
  }
}
