@use "sass:color";

@use '@uppy/core/src/_variables.scss' as *;
@use '@uppy/core/src/_utils.scss' as *;

.uppy-Dashboard-Item-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: $zIndex-3;
  width: 120px;
  color: $white;
  text-align: center;
  transform: translate(-50%, -50%);
  transition: all 0.35 ease;
}

.uppy-Dashboard-Item-progressIndicator {
  display: inline-block;
  width: 38px;
  height: 38px;
  opacity: 0.9;
  color: $white;

  .uppy-size--md & {
    width: 55px;
    height: 55px;
  }
}

button.uppy-Dashboard-Item-progressIndicator {
  @include clear-focus;

  cursor: pointer;

  &:focus {
    .uppy-Dashboard-Item-progressIcon--bg,
    .uppy-Dashboard-Item-progressIcon--retry {
      fill: color.adjust($blue, $lightness: 20%, $space: hsl);
    }
  }
}

// ProgressCircle svg styles

.uppy-Dashboard-Item-progressIcon--circle {
  width: 100%;
  height: 100%;
}

.uppy-Dashboard-Item-progressIcon--bg {
  stroke: rgba($white, 0.4);
}

.uppy-Dashboard-Item-progressIcon--progress {
  transition: stroke-dashoffset 0.5s ease-out;
  stroke: $white;
}

.uppy-Dashboard-Item-progressIcon--play {
  transition: all 0.2s;
  fill: $white;
  stroke: $white;
}

.uppy-Dashboard-Item-progressIcon--cancel {
  transition: all 0.2s;
  fill: $white;
}

.uppy-Dashboard-Item-progressIcon--pause {
  transition: all 0.2s;
  fill: $white;
  stroke: $white;
}

.uppy-Dashboard-Item-progressIcon--check {
  transition: all 0.2s;
  fill: $white;
}

.uppy-Dashboard-Item-progressIcon--retry {
  fill: $white;
}

// Svg styles that depend on the state of the file.

.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progress {
  top: -9px;
  width: auto;
  transform: initial;
  inset-inline-end: -8px;
  inset-inline-start: initial;
}

.uppy-Dashboard-Item.is-error .uppy-Dashboard-Item-progressIndicator {
  width: 18px;
  height: 18px;

  .uppy-size--md & {
    width: 28px;
    height: 28px;
  }
}

.uppy-Dashboard-Item.is-complete .uppy-Dashboard-Item-progressIndicator {
  width: 18px;
  height: 18px;
  opacity: 1;

  .uppy-size--md & {
    width: 22px;
    height: 22px;
  }
}

.uppy-Dashboard-Item.is-processing .uppy-Dashboard-Item-progress {
  opacity: 0;
}
