@mixin progressbar() {
  progressbar {
    padding: 0;
    border: none;
    color: gtkmix($fg_color, $selected_fg_color, 0.5);
    background-color: transparent;

    progress {
      border: none;
      border-radius: $progressbar_radius;
      background-color: $selected_bg_color;

      &:backdrop {
        background-color: $unfocused_selected_bg_color;
      }
    }

    trough {
      border-radius: $progressbar_radius;
      background-color: gtkmix($bg_color, $fg_color, 0.1);

      &:backdrop {
        background-color: gtkmix($unfocused_fg_color, $unfocused_bg_color, 0.95);
      }
    }

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

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

  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);
    }
  }
}
