@import '@/sass/style.scss';

.GlossaryItem,
.GlossaryItem--show {
  color: $soft-red;

  .head {
    background-color: $very-dark-green;
    color: $very-soft-green;
    display: block;
    font-size: 16px;
    font-weight: 400;
    padding: 28px 16px 24px;
    position: relative;
    text-align: left;
    width: 100%;

    .icon {
      display: block;
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 28px;

      svg {
        @include svg-block-by-width;
        fill: $very-soft-green;
      }
    }
  }

  .content-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 16px;
  }
}

.GlossaryItem {
  .head {
    transition: background-color 200ms;

    .icon {
      transition: transform 200ms;
    }
  }

  .content-wrapper {
    transition: max-height 200ms, padding 200ms;
  }
}

.GlossaryItem--show {
  .head {
    background-color: $mostly-black-green;
    transition: background-color 400ms;

    .icon {
      transition: transform 400ms;
      transform: translateY(-50%) rotate(180deg);
    }
  }

  .content-wrapper {
    max-height: 999em;
    opacity: 1;
    padding: 0 16px 24px;
    transition: max-height 400ms, opacity, 400ms, padding 200ms;
  }
}
