/**
 * @file
 * Visual styles for progress bar.
 *
 * @see progress.js
 */

.progress__track {
  border-color: #b3b3b3;
  border-radius: 10em;

  background-color: #f2f1eb;
  background-image: linear-gradient(#e7e7df, #f0f0f0);
  box-shadow: inset 0 0.0625rem 0.1875rem hsl(0deg 0% 0% / 16%);
}

.progress__bar {
  height: 1rem;
  margin-top: -0.0625rem;
  margin-left: -0.0625rem; /* LTR */
  padding: 0 1px;
  border: 1px #07629a solid;
  border-radius: 10em;

  background: #057ec9;
  background-image:
    linear-gradient(to bottom, rgb(0 0 0 / 0%), rgb(0 0 0 / 15%)),
    linear-gradient(
      to right bottom,
      #0094f0 0%,
      #0094f0 25%,
      #007ecc 25%,
      #007ecc 50%,
      #0094f0 50%,
      #0094f0 75%,
      #0094f0 100%
    );
  background-size: 2.5rem 2.5rem;

  transition: width 0.5s ease-out;
  animation: animate-stripes 3s linear infinite;
}

[dir="rtl"] .progress__bar {
  margin-right: -0.0625rem;
  margin-left: 0;
  animation-direction: reverse;
}

@media screen and (prefers-reduced-motion: reduce) {
  .progress__bar {
    transition: none;
    animation: none;
  }
}

/**
 * Progress bar animations.
 */
@keyframes animate-stripes {
  0% {
    background-position:
      0 0,
      0 0;
  }

  100% {
    background-position:
      0 0,
      -5rem 0;
  }
}
