$bar_stripe_color: $dark !default;
$bar-body-hover-color: rgba($gray-100, 0.5) !default;
$bar-transition: $accordion-transition !default;


._card-link {
  cursor: pointer;
}

.bar {
  border: 1px solid $border-color;
  > .bar-body, > .bar-menu, > .accordion-header > .accordion-button {
    @include transition($bar-transition);
  }
  &:hover:not(.no-bar-hover) {
    cursor: pointer;
    > .bar-body, > .bar-menu, > .accordion-header > .accordion-button {
      background-color: $bar-body-hover-color;
    }
  }
  &.accordion-item > .accordion-header {
    .bar-left, .bar-right {
      padding: 0;
    }
  }
}

.selected .bar, .selected .box {
  border: 3px solid $primary !important;
}

// not sure this ever gets used:
.bar-accordion {
  .accordion-body {
    padding: 0;
    .bar {
      border-left: 1px solid $border-color !important;
    }
  }
}


.bar {
  border-left: 3px solid $bar_stripe_color !important;

  .media {
    width: 100%
  }
  .media-left {
    max-width: 25%
  }
}

.bar-left, .bar-right, .bar-middle {
  display: flex;
  padding: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.bar-left {
  font-weight: bold;
  align-items: flex-start;
}

.bar-middle {
  justify-content: center;
}

.bar-right {
  justify-content: flex-end;
}

.bar-menu {
  min-width: 3em;
  width: 3em;
  display: flex;
  align-items: center;
}

.bar-body {
  width: 100%;
  display: flex;
}

.bar.with-bar-menu .bar-body {
  width: calc(100% - 3em);
}


.bar-menu-dropdown.dropdown {
  position: absolute;
}

.bar-menu-button {
  padding: 0.25em;
  // border-radius: 5px;
  &:hover {
    background-color: $secondary;
    color: $white;
  }
  // disable bootstrap dropdown caret
  &:after {
    display: none;
  }
}

// links in bar menu
.bar-menu-list a i {
  padding-right: 0.4em;
}

// card submenu in accordion bar
.accordion-subheader > .card-menu {
  position: static;
  background: inherit !important;
}

@include media-breakpoint-up(md) {
  .bar-menu-button {
    display: none;
  }

  .bar:hover .bar-menu-button {
    display: flex;
  }
}
