$prefixCls: "hfish-collapse";
$text-color: rgba(17, 18, 34, 0.9);
$borderStyle: 1px solid rgba(17, 18, 34, 0.13);
$default: #111222;

// @mixin arrow {
@mixin common() {
  width: 0;
  height: 0;
  font-size: 0;
  line-height: 0;
}
@mixin right($w, $h, $color) {
  border-top: $w solid transparent;
  border-bottom: $w solid transparent;
  border-left: $h solid $color;
}

@mixin bottom($w, $h, $color) {
  border-left: $w solid transparent;
  border-right: $w solid transparent;
  border-top: $h solid $color;
}
// }

.#{$prefixCls} {
  background-color: #fff;
  border-radius: 2px;
  border: $borderStyle;
  & > &-item {
    margin: 12px;
    border: $borderStyle;
    > .#{$prefixCls}-header {
      background-color: rgba($default, 0.02);
      display: flex;
      align-items: center;
      line-height: 22px;
      padding: 10px 20px;
      color: rgba($default, 0.9);
      .arrow {
        cursor: pointer;
        display: "inline-block";
        content: "\20";
        @include common();
        @include right(3px, 4px, #666);
        vertical-align: middle;
        margin-right: 8px;
      }
    }
  }
  & > &-item-active {
    > .#{$prefixCls}-header {
      box-shadow: 0 7px 5px -5px rgba($default, 0.5);
      background-color: rgba($default, 0.06);
      transition: background-color 0.2s;
      .arrow {
        position: relative;
        top: 2px;
        @include bottom(3px, 4px, #666);
        margin-right: 6px;
      }
    }
  }
  & > &-item-ghost {
    border: none;
    > .#{$prefixCls}-header {
      background-color: transparent;
      box-shadow: none;
    }
  }
  &-content {
    overflow: hidden;
    color: $text-color;
    padding: 0 16px;
    & > &-box {
      margin-top: 16px;
      margin-bottom: 16px;
    }
  }
  &-motion {
    transition: height 0.3s, opacity 0.3s;
  }
  &-content-hidden {
    display: none;
  }
}
.#{$prefixCls}-ghost {
  border: none;
}
