@import '../global.scss';

.tea-progress-mask {
  display: flex;
  align-items: center;
}
$line-height: 28px;

.tea-progress-layout {
  --percent: 0;
  position: relative;
  max-width: 400px;
  flex: auto;
  margin: auto;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background-color: $component-background;
  padding: $padding 0;
  box-shadow: 0 4px 16px -1px rgba(18, 22, 33, 0.05);
  overflow: hidden;
  transition: all 0.4s;
  &:not(.tea-progress-open) {
    .tea-progress-title {
      padding-bottom: 0;
    }
  }
  & > * {
    z-index: 1;
  }
  $progress-transition: background 0.6s ease, transform 0.16s linear;
  .tea-progress-back {
    z-index: 0;
    background: #f5f9ff;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    transform-origin: 0 50%;
    overflow: hidden;
    transition: $progress-transition;
  }
  .tea-progress-title {
    padding: 0 $padding;
    font-size: 18px;
    font-weight: 600;
  }
  .tea-progress-avg-percent {
    margin-top: $tiny-padding;
    display: block;
    font-size: 14px;
    font-weight: 400;
  }
  .tea-progress-success {
    float: right;
    transform: translate(12px, 4px);
  }
  .tea-progress-fold {
    display: block;
    float: right;
    transform: translate(20px, -8px) rotate(45deg);
  }
  .tea-progress-progress-item {
    flex: auto;
    display: flex;
    flex-direction: column;
    padding: 0 $padding;
    overflow: hidden;
    margin-bottom: $small-padding;
  }
  .tea-progress-progress-header {
    display: flex;
    .tea-progress-progress-fileName {
      font-weight: 500;
      font-size: 18px;
      flex: 1 1 auto;
      display: inline-block;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      align-items: center;
      display: block;
      line-height: $line-height;
      padding-right: $padding;
    }
    .tea-progress-progress-percent {
      display: block;
      flex: 0 0 auto;
      line-height: $line-height;
    }
  }

  .tea-progress-progress-progress {
    margin-top: $small-padding;
    height: 2px;
    width: 100%;
    background-color: #cdd9ed;
    .fill {
      height: 2px;
      width: 100%;
      background-color: #5628ee;
      transform-origin: 0 50%;
      transition: $progress-transition;
    }
  }
}

.tea-filerender {
  display: flex;
  justify-content: space-between;
}

.tea-filerender-info {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
