@import (reference) './variable.less';

.@{gridPrefix} {
  padding: 24 * @rpx;
  box-sizing: border-box;
  row-gap: 24 * @rpx;
  &-columns-3 {
    padding: 24 * @rpx 0;
  }
  &-default {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  &-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  &-item {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    &-line {
      .hairline('right',@border-color);
    }
    &-vertical-space {
      margin-bottom: @vertical-space;
    }
    &-columns-5 {
      width: 20%;
    }
    &-columns-4 {
      width: 25%;
    }
    &-columns-3 {
      width: 33.3%;
    }
    &-columns-2 {
      width: 50%;
    }
    &-horizontal {
      justify-content: center;
      text-align: left;
      position: relative;
      min-height: @icon-size;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-direction: row;
      .@{gridPrefix}-item-info {
        padding-left: 16 * @rpx;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        flex-direction: column;
      }
      .@{gridPrefix}-item-img,
      .@{gridPrefix}-item-icon {
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .@{gridPrefix}-item-title {
        margin-top: 0;
      }
    }
    &-vertical {
      .@{gridPrefix}-item-description {
        padding-top: 4 * @rpx;
      }
    }
    &-columns-scroll {
      width: @columnsscroll-width;
    }
    &-icon {
      &-circle {
        border-radius: 50%;
        overflow: hidden;
      }
      &-icon {
        font-size: @icon-size;
      }
      &-image {
        width: @icon-size;
        height: @icon-size;
      }
    }
    &-title {
      font-size: 30 * @rpx;
      color: @title-color;
      line-height: 42 * @rpx;
      width: 100%;
      margin-top: 16 * @rpx;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    &-description {
      font-size: @description-size;
      color: @description-color;
      line-height: 33 * @rpx;
      width: 100%;
      padding-top: 4 * @rpx;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      &:empty {
        display: none;
      }
    }
  }
}
