// Bars
.bar {
  background: $bg-0-color;
  border-radius: $border-radius-sm;
  display: flex;
  flex-wrap: nowrap;
  height: $unit-4;
  width: 100%;

  &.bar-sm {
    height: $unit-1;
  }

  &.bar-lg {
    height: $unit-7;
  }

  // TODO: attr() support
  .bar-item {

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: $primary-color;
    color: $light-color;
    display: block;
    font-size: $font-size-sm;
    flex-shrink: 0;
    height: inherit;
    position: relative;
    text-align: center;
    width: 0;

    &:first-child {
      border-bottom-left-radius: $border-radius-sm;
      border-top-left-radius: $border-radius-sm;
    }
    &:last-child {
      border-bottom-right-radius: $border-radius-sm;
      border-top-right-radius: $border-radius-sm;
      flex-shrink: 1;
    }
  }
}

// Slider bar
.bar-slider {
  height: $border-width-lg;
  margin: $layout-spacing 0;
  position: relative;

  .bar-item {
    left: 0;
    padding: 0;
    position: absolute;

    &:not(:last-child):first-child {
      background: $bg-color-dark;
      z-index: $zindex-0;
    }
  }

  .bar-slider-btn {
    background: $primary-color;
    border: 0;
    border-radius: 50%;
    height: $unit-3;
    padding: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: $unit-3;

    &:active {
      box-shadow: 0 0 0 .1rem $primary-color;
    }
  }
}
