:host {
  display: block;
}

:host(:first-of-type) {
  border-top: 1px solid $color-silver;
  box-sizing: border-box;
}

.m-accordion {
  display: flex;
  flex-direction: column;
  margin-bottom: 1px;
  border-bottom: solid 1px $color-silver;
  box-sizing: border-box;

  &__title {
    display: block;
    @include text(t1, semibold);

    &--small {
      @include text(t3, semibold);
    }
  }

  &__icon {
    margin-right: $spacing-3;

    svg {
      width: 48px;
      height: 48px;
    }
  }

  &__icon-expand {
    margin-left: $spacing-3;
  }

  &__button-flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  &__button-title-wrapper {
    display: flex;
    align-items: center;
  }

  &__button {
    display: block;
    border: none;
    text-align: left;
    background-color: $color-prim-white;
    padding: $spacing-4 $spacing-1;
    width: 100%;
    box-sizing: border-box;
    color: $color-axa-blue;

    &:hover {
      background-color: rgba($color-axa-blue, 0.2);
    }

    &:focus,
    &:active {
      background-color: rgba($color-axa-blue, 0.2);
      box-shadow: 0 0 0 2px $color-axa-blue;
      outline: none;
    }

    &:disabled {
      color: $color-silver;
      background-color: $color-prim-white;
      box-shadow: none;
    }
  }

  &__content {
    overflow: hidden;
    height: 0;
    transition: height $transition-medium-colapsing $standard-easing;
    color: $color-dark-grey;

    &--open {
      height: auto;
      margin-top: $spacing-1;
      margin-bottom: $spacing-4;
    }
  }
}
