$color-row-filter-border: $color-pf-black-300;
$color-row-filter-border--active: $color-pf-blue-300;

.co-m-row-filter__controls {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: space-between;
  z-index: 1;
}

.co-m-row-filter__items {
  font-weight: var(--pf-global--FontWeight--bold);
  padding: 7px 10px;
  white-space: nowrap;
}

.co-m-row-filter__selector {
  white-space: nowrap !important;
}

.row-filter {
  background-color: #fff;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: $grid-gutter-width;
  // use pseudo element for border so .row-filter__box-es can overlaps
  &::before {
    border: 1px solid $color-row-filter-border;
    bottom: ($grid-gutter-width - 1);
    content: '';
    left: ($grid-gutter-width / 2);
    position: absolute;
    right: ($grid-gutter-width / 2);
    top: 0;
  }
}

.row-filter__box {
  background: $color-pf-black-150;
  display: inline-block;
  margin: 0 -1px -1px 0;
  padding: 7px 10px;
  //  relative is to trigger z-index
  position: relative;
  &,
  &:focus,
  &:hover {
    border: 1px solid $color-row-filter-border;
    color: inherit;
    text-decoration: none;
  }
  &:focus {
    border-color: darken($color-row-filter-border, 40%);
    border-style: dotted;
    z-index: 2;
  }
  &:hover {
    text-decoration: none;
  }
}

.row-filter__box--active {
  background: $color-pf-blue-50;
  border-color: $color-row-filter-border--active !important;
  // z-index is because latter blocks overlap the joining outline of former blocks
  z-index: 1;
  &:focus {
    border-color: darken($color-row-filter-border--active, 25%) !important;
  }
}

.row-filter__box--empty {
  color: $color-pf-black-500 !important;
  .row-filter__number-bubble {
    background: inherit;
  }
}

.row-filter__number-bubble {
  background: $color-pf-white;
  border-radius: 4px;
  border: 1px solid $color-row-filter-border;
  display: inline-block;
  line-height: 16px;
  margin-right: 6px;
  padding: 2px 5px 0;
  text-align: center;
}
