@import "../common/varible";
@import "../common/function";

.yu-collapse {
  font-family: $font-family;
  color: $text;
  font-size: 0;
  & > .yu-collapse-item:last-child {
    border-bottom: 1px solid $border;
  }
}

.yu-collapse-item {
  width: 100%;
  & > .wrap {
    font-size: $normal;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    margin-bottom: -1px;
    display: inline-block;
    & > .header {
      border-top: 1px solid $border;
      height: $collapse-header-height;
      cursor: pointer;
      line-height: $collapse-header-height;
      &:not(.hide-icon):after {
        @include contentIcon();
        content: $icon-angle-right;
        float: right;
        color: $text-lighter;
        transition: all $transition-time ease;
      }
    }
    & > .content {
      width: 100%;
      height: 0;
      overflow: hidden;
      transition: height $transition-time ease;
    }
    &.active > .header:after {
      transform: rotate(90deg);
    }
  }
}
