@mixin progress-value {
  background: linear-gradient(to bottom, var(--primary-2), var(--primary-3), var(--primary-4), var(--primary-5), var(--primary-6), var(--primary-5), var(--primary-4), var(--primary-3), var(--primary-2), var(--primary-1));
  border-right: 1px solid #000;
  box-shadow: inset 1px 0 var(--primary-3), inset 2px 0 #fff3, inset -1px 0 var(--primary-1), inset -2px 0 var(--primary-2), 1px 0 #555555, 2px 0 #888888;
}

@mixin progress-value-indeterminate {
  width: 50%;
  border-left: 1px solid #000;
  animation: 1s infinite linear indeterminate;
}

progress,
.progress-bar {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: #BBBBBB;
  border: 1px solid #000;
  box-shadow: 1px 1px #fff, -1px -1px #AAAAAA, inset 1px 1px #888888, inset -1px -1px #DDDDDD;
  height: 12px;
}

.progress-bar {
  position: relative;
  overflow: hidden;

  &:not([aria-valuenow])::after,
  & > .progress-bar-value {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    @include progress-value;
  }

  &:not([aria-valuenow])::after {
    @include progress-value-indeterminate;
  }
}

progress::-webkit-progress-bar {
  background: #BBBBBB;
  box-shadow: inset 1px 1px #888888, inset -1px -1px #DDDDDD;
}

progress::-webkit-progress-value {
  @include progress-value;
}

progress::-moz-progress-bar {
  @include progress-value;
}

progress:indeterminate::-moz-progress-bar {
  @include progress-value-indeterminate;
}

progress:not([value])::-webkit-progress-value {
  @include progress-value-indeterminate;
}

@keyframes indeterminate {
  from {
    margin-left: -50%;
  }

  to {
    margin-left: 100%;
  }
}
