@use './global/' as *;

.accordion {
  &:last-of-type {
    border-bottom: 1px solid #1b224c;
  }

  &__toggle {
    &:checked+.accordion__ttl+.accordion__content {
      max-height: 500px;
      margin-bottom: 15px;
      transition: max-height 1.5s;
    }

    &:checked+.accordion__ttl::before {
      transform: rotate(90deg) !important;
      background-color: #707070;
    }

    &:checked+.accrdion::after {
      background-color: #707070;
    }
  }

  &__ttl {
    &::after {
      transform: rotate(90deg);
    }

    &::before,
    &::after {
      content: "";
      position: absolute;
      right: 10px;
      top: 40%;
      transform: translateY(-40%, -50px);
      width: 3px;
      height: 10px;
      background-color: #1b224c;
      transition: all 0.3s;

      @include mq(lg) {
        right: 50px;
        height: 20px;
      }
    }
  }

  &__ttl,
  &__content {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: all 0.3s;
  }
}
