:host {
  --indicator-color: var(--wa-color-brand-fill-loud);

  display: contents;
  height: 1.25rem;
  border-radius: var(--wa-border-radius-pill);
  background-color: var(--wa-color-neutral-fill-normal);
  color: var(--wa-color-brand-on-loud);
}

.progress-bar {
  all: inherit;
  display: flex;
  position: relative;
  overflow: hidden;
}

.indicator {
  width: calc(var(--value, 0) * 1%);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--indicator-color);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1;
  font-weight: var(--wa-font-weight-semibold);
  transition: var(--wa-transition-slow, 200ms) var(--wa-transition-easing, ease);
  transition: 1s;
  /* transition-property: width, background; */
  user-select: none;
  -webkit-user-select: none;
}

/* Indeterminate */
:host([indeterminate]) .indicator {
  position: absolute;
  inset-block: 0;
  inline-size: 50%;
  animation: wa-progress-indeterminate 2.5s infinite cubic-bezier(0.37, 0, 0.63, 1);
}

@media (forced-colors: active) {
  .progress-bar {
    outline: solid 1px SelectedItem;
    background-color: var(--wa-color-surface-default);
  }

  .indicator {
    outline: solid 1px SelectedItem;
    background-color: SelectedItem;
  }
}

@keyframes wa-progress-indeterminate {
  0% {
    inset-inline-start: -50%;
  }

  75%,
  100% {
    inset-inline-start: 100%;
  }
}
