@mixin progressbar() {
  progressbar {
    padding: 0;
    border: none;
    color: gtkmix($fg_color, $selected_fg_color, 0.5);
    background-color: transparent;
    
    &.horizontal {
      progress {
        border: 1px solid #89310d;
        border-radius: $progressbar_radius;
        color: $selected_fg_color;
        background-image: linear-gradient(to bottom, #dba76b, #ce8533 45%, #c06600 50%, #e88e28);
        box-shadow: inset 0 -2px 2px 0 gtkalpha($light_shadow, 0.4), inset 0 1px gtkalpha($light_shadow, 0.2);
        border-right-width: 0;
        border-left-width: 0;
      }

      trough {
        border-radius: $progressbar_radius;
        border: 1px solid gtkshade($borders, 0.9);
        color: $fg_color;
        background-image: linear-gradient(to bottom, #eff0f2, #dddee1 45%, #ced0d4 50%, #e3e5e9);
        box-shadow: inset 0 -2px 2px 0 gtkalpha($light_shadow, 0.6), inset 0 1px $light_shadow;
      }
    }
    
    &.vertical {
      progress {
        border: 1px solid #89310d;
        border-radius: $progressbar_radius;
        color: $selected_fg_color;
        background-image: linear-gradient(to right, #dba76b, #ce8533 45%, #c06600 50%, #e88e28);
        box-shadow: inset -2px 0 2px 0 gtkalpha($light_shadow, 0.4), inset 1px 0 gtkalpha($light_shadow, 0.2);
        border-top-width: 0;
        border-bottom-width: 0;
      }

      trough {
        border-radius: $progressbar_radius;
        border: 1px solid gtkshade($borders, 0.9);
        color: $fg_color;
        border-radius: $progressbar_radius;
        background-image: linear-gradient(to right, #eff0f2, #dddee1 45%, #ced0d4 50%, #e3e5e9);
    box-shadow: inset -2px 0 2px 0 gtkalpha($light_shadow, 0.6), inset 1px 0 $light_shadow;
      }
    }

    &.horizontal trough,
    &.horizontal progress {
      min-height: 21px;
    }

    &.vertical trough,
    &.vertical progress {
      min-width: 21px;
    }
  }

  treeview.view {
    &.progressbar {
      &, &:disabled {
        color: $selected_fg_color;
        border-radius: 0;
        background-color: $selected_bg_color;
      }

      &:focus, &:selected:focus, &:focus:selected, &:focus:selected:focus, &:disabled:selected {
        border-radius: 0;
        color: $selected_bg_color;
        background-color: $selected_fg_color;
      }
    }

    &.trough {
      color: $fg_color;
      background-color: gtkalpha($dark_shadow, 0.1);
      border-radius: 0;
      border: none;

      &:selected, &:selected:focus {
        color: $selected_fg_color;
        background-color: gtkalpha($dark_shadow, 0.1);
        border-radius: 0;
        border: none;
      }
    }

    infobar & trough, row:selected & trough {
      background-color: gtkalpha($dark_shadow, 0.1);
    }
  }
}
