progressbar {
  // sizing
  &.horizontal {
    > trough {
      min-width: 150px;
      &, > progress { min-height: 4px; }
    }
  }

  &.vertical {
    > trough {
      min-height: 80px;
      &, > progress { min-width: 4px; }
    }
  }

  > text {
    @extend .dim-label;
    @extend .numeric;
    font-size: smaller;
  }

  &:disabled {
    filter: opacity(.5);
  }

  > trough {
    @extend %scale_trough;

    > progress {
      @extend %scale_highlight; /* share most of scales' */

      border-radius: 1.5px;

      $_progress-radius: 5px;
      &.left {
        border-top-left-radius: $_progress-radius;
        border-bottom-left-radius: $_progress-radius;
      }

      &.right {
        border-top-right-radius: $_progress-radius;
        border-bottom-right-radius: $_progress-radius;
      }

      &.top {
        border-top-right-radius: $_progress-radius;
        border-top-left-radius: $_progress-radius;
      }

      &.bottom {
        border-bottom-right-radius: $_progress-radius;
        border-bottom-left-radius: $_progress-radius;
      }
    }
  }

  &.osd { // progressbar.osd used for epiphany page loading progress
    min-width: 3px;
    min-height: 3px;
    background-color: transparent;

    > trough {
      border-style: none;
      border-radius: 0;
      background-color: transparent;
      box-shadow: none;

      > progress {
        border-style: none;
        border-radius: 0;
      }
    }
  }

  > trough.empty > progress { all: unset; } // makes the progress indicator disappear, when the fraction is 0
}
