@import './var.less';


.@{upload-prefix-cls} {

  &__picture {
    width: 284px;
    height: 184px;

    img {
      object-fit: contain;
    }

  }

  &__picture,
  &__placeholder {
    display: flex;
    background: #f1f2f4;
    border: 2px dashed rgba(26, 43, 78, 0.12);
    border-radius: 12px;

    &&--disabled {
      user-select: none;
      cursor: not-allowed;
    }
  }

  &__placeholder {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(26, 43, 78, 0.60);
    cursor: pointer;
    line-height: 22px;

    &-icon {
      color: #3960AC;
      font-size: 48px;
      line-height: 1;
    }

    >span+span {
      margin-top: 10px;
    }

    &:hover:not(&--disabled) {
      border-color: #0256ff;
      background-color: white;
      color: rgba(26, 43, 78, 0.80);
    }

  }

  &__button {
    background: rgba(26, 43, 78, 0.06);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    color: #0256ff;
    cursor: pointer;

    >*+* {
      margin-left: 6px;
    }

    &&--disabled {
      user-select: none;
      cursor: not-allowed;
      color: rgba(26, 43, 78, 0.20);
      background: rgba(26, 43, 78, 0.06);
    }

    &:hover:not(&--disabled) {
      background: #0256ff;
      color: #ffffff;
    }
  }

  &__list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    img {
      object-fit: contain;
    }

    &-container {
      display: inline-block;
      margin: 0 8px 8px 0;
      vertical-align: top;
    }

    &-item {
      height: 100%;
      margin: 0;
      padding: 8px;
      border: 1px solid #d9d9d9;
      border-radius: 2px;
      font-size: 14px;
    }
  }

  &__text-icon {
    color: rgba(26, 43, 78, 0.4) !important;
  }

  &__text {
    display: flex;
    flex-direction: column;

    &-list {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      color: rgba(0, 0, 0, 0.85);
      font-size: 14px;
      font-variant: tabular-nums;
      list-style: none;
      font-feature-settings: 'tnum', "tnum";
      line-height: 1.5715;

      &-container {
        transition: opacity 0.3s, height 0.3s;
      }

      &-item {
        position: relative;
        height: 32px;
        margin-top: 8px;
        font-size: 14px;

        &-info {
          height: 100%;
          padding: 0 8px;
          border-radius: 8px;
          transition: background-color 0.3s;

          >span {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            flex: auto;
          }
        }

        &-icon {
          color: #0256FF;

          .anticon {
            color: currentColor;
          }
        }

        &-name {
          color: #3960ac;
          cursor: default;
          flex: auto;
          padding: 0 8px;
        }

        &-actions {
          position: static;
          flex: none;
          right: 0;
          color: rgba(26, 43, 78, 0.4);

          &-btn {
            width: 24px;
            height: 24px;
            line-height: 24px;
            font-size: 14px;
            border-radius: 24px;
            text-align: center;
            opacity: 0;
            cursor: pointer;
            transition: opacity @animation-duration-slow;
            color: rgba(26, 43, 78, 0.4);

            &:hover {
              background-color: rgba(26, 43, 78, 0.12);
            }
          }
        }

        &&--delete {
          .@{upload-text}-list-item {
            &-actions {
              &-btn {
                background-color: rgba(26, 43, 78, 0.12);
              }
            }
          }
        }

        &&--loading,
        &&--delete,
        &:hover {
          .@{upload-text}-list-item {
            &-info {
              background-color: rgba(26, 43, 78, 0.04);
            }

            &-actions {
              &-btn {
                opacity: 1;
              }
            }
          }
        }
      }
    }
  }
}
