@import './common/var.css';
@import './mixins/clearfix.css';

.van-sku {
  &-container {
    background: $background-color;
  }

  &-layout {
    background: $white;
  }

  &-body {
    max-height: 350px;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  &-group-container {
    margin-left: 15px;
    padding: 12px 0 2px;
  }

  &-row-group {
    margin: 0 15px 10px 0;

    &:last-child {
      margin-bottom: 0;
    }
  }

  /* sku header */
  &-header {
    margin-left: 15px;

    &__img-wrap {
      position: relative;
      float: left;
      margin-top: -10px;
      width: 80px;
      height: 80px;
      background: $background-color;
      border-radius: 2px;

      .van-sku__goods-img {
        position: absolute;
        margin: auto;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        max-height: 100%;
      }
    }

    &__goods-info {
      padding: 10px 60px 10px 10px;
      min-height: 82px;
      overflow: hidden;
      box-sizing: border-box;
    }
  }

  &__goods-name {
    font-size: 12px;
  }

  &__price-symbol {
    font-size: 14px;
    vertical-align: middle;
  }

  &__price-num {
    vertical-align: middle;
  }

  &__goods-price {
    color: $red;
    margin-top: 10px;
    font-size: 16px;
    vertical-align: middle;
  }

  &__close-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAAUVBMVEUAAACfn5+bm5uampqZmZmoqKiampqampqZmZmampqampqbm5ubm5uZmZmqqqqampqampqZmZmampqampqampqbm5ubm5uampqdnZ2ampqZmZkjZXmqAAAAGnRSTlMAFYBC5wm+rdPv1Ckl8wzZxKWicm9eUjoN8nSyS9UAAAFVSURBVDjLvZXbrsIgEEWhtAUU6M1a3f//oSeHWKfuVhv7IC+TkJVhz4UZ9bsThq5uYmzqbgifSV04LI4r9Fs0FRHw/WhCugUz9h6IRdpmryVgzfLGWKC8brEF0E58ObVAsUIrC1y2fFwAW9GdhTfb6oyHZQ3+/C7us39VcgXE79o3sIgylayXdZdpIaJVH08rQnTE9BmeEPXsWMK1rV6m01Xz/dO1g5H3nH6yNcoZNnCPPoOXTjplemYlnR4h2wG9YppZ1WPItsOomGZWjeiyrWEU08wqgzrbBkERfWJWBTTZRiTFNLMqIWZ7x43atQYa+lA33EmG5KyB0yyDApT8/uvWFCCnTvIrtKRuLgqzQktRpNzMCi3l5kaymZXqiGS3blGX2Zl2ftGi6+avqtcsUvN/8a2++LCHRsH+kDkwvg4Mxt2Re3yY85pIsiaOLKD91faz8wcoUxux/aS9awAAAABJRU5ErkJggg==);
    background-size: 22px 22px;
    background-repeat: no-repeat;
    background-position: 7px 10px;
  }

  /* sku row */
  &-row {
    &__title {
      font-size: 14px;
      padding-bottom: 10px;
    }

    &__item {
      display: inline-block;
      padding: 5px 9px;
      margin: 0 10px 10px 0;
      height: 28px;
      min-width: 52px;
      line-height: 16px;
      font-size: 12px;
      color: $text-color;
      text-align: center;
      border: 1px solid $gray-dark;
      border-radius: 3px;
      box-sizing: border-box;

      &.van-sku-row__item--active {
        color: $white;
        border-color: $red;
        background: $red;
      }

      &.van-sku-row__item--disabled {
        background: $active-color;
        border-color: $gray-light;
        color: $gray;
      }
    }
  }

  /* sku stepper */
  &-stepper {
    &-stock {
      padding: 12px 0;
      margin-left: 15px;
    }

    &-container {
      height: 30px;
      margin-right: 20px;
    }
  }

  &__stepper {
    top: 7px;
    left: 4px;
    float: right;

    &-title {
      float: left;
      line-height: 30px;
      font-size: 14px;
    }
  }

  &__stock {
    display: inline-block;
    margin-right: 10px;
    color: $gray-dark;
    font-size: 12px;
  }

  &__quota {
    display: inline-block;
    color: $red;
    font-size: 12px;
  }

  &-messages {
    &__image-cell {
      .van-cell__title {
        width: 90px;
      }
      .van-cell__value {
        text-align: left;
      }
    }
  }

  &-img-uploader {
    display: inline-block;

    &__header {
      padding: 0 10px;
      border: 1px solid #e5e5e5;
      line-height: 24px;
      border-radius: 3px;
      font-size: 12px;

      .van-icon {
        top: 3px;
        margin-right: 5px;
        font-size: 14px;
      }
    }

    &__imglist {
      @mixin clearfix;
    }

    &__img-container {
      height: 60px;
      width: 60px;
      margin-top: 10px;
      margin-right: 10px;
      float: left;
      position: relative;
      border: #e5e5e5 1px solid;

      img {
        max-width: 100%;
        max-height: 100%;
        top: 50%;
        position: relative;
        transform: translateY(-50%);
      }
    }

    &__delete-picture {
      position: absolute;
      color: $red;
      top: -10px;
      right: -17px;
      z-index: 1;
      width: 22px;
      height: 22px;
    }

    &__uploading {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: auto;
      width: 20px;
      height: 20px;
    }
  }

  /* sku actions */
  &-actions {
    display: flex;
    margin-top: 10px;
  }
}
