@import '../style/var';

.vm-image-picker {
  &-list {
    padding: 9px 8px 0;
    margin-bottom: 15px;
  }

  &-item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;

    &-remove {
      font-size: 18px;
      color: rgba(0,0,0,0.5);
      position: absolute;
      right: 6px;
      top: 6px;
      text-align: right;
      vertical-align: top;
      z-index: 2;
    }

    &-content {
      height: 100%;
      width: 100%;
      border-radius: 3px;
      background-size: cover;
    }

    img {
      width: 100%;
    }
  }

  &-flex {
    margin-bottom: 6px;
    text-align: left;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;

    & &-item {
      box-sizing: border-box;
      flex: 1;
      margin-left: 8px;
      min-width: 10px;

      &:first-child {
        margin-left: 0;
      }
    }

    &-item {
      position: relative;
      margin-right: 5px;
      margin-left: 0;

      &::after {
        display: block;
        content: ' ';
        padding-bottom: 100%;
      }
    }
  }

  &-upload-btn {
    box-sizing: border-box;
    border-radius: 3px;
    border: 1Px solid #ddd;
    background-color: #fff;

    &::before,
    &::after {
      width: 1Px;
      height: 25px;
      content: " ";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background-color: #ccc;
    }

    &::after {
      width: 25px;
      height: 1Px;
    }

    &-active {
      background-color: #ddd;
    }

    input {
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;
      opacity: 0;
    }
  }
}
