@import 'Variables';
@import 'FacetVariables';
@import 'mixins/breadcrumb';
@import 'mixins/_facetHeaderAnimation';
@import 'bourbon/bourbon';

@mixin facetValueLabelPadding {
  padding: 5px #{$facet-value-padding - 1px} 5px $facet-value-padding;
}

@mixin clickableCategoryFacetValue {
  vertical-align: middle;
  line-height: 22px;
  cursor: pointer;
  &:focus,
  &:hover {
    background-color: $color-blueish-white-grey;
  }
}

.CoveoCategoryFacet {
  &.coveo-hidden,
  &.coveo-hidden-dependant-facet {
    display: none;
    &.coveo-with-placeholder {
      display: block;
    }
  }
}

.coveo-category-facet-values-fade .coveo-category-facet-child-value {
  opacity: 0.5;
}

.coveo-category-facet-values {
  list-style: none;
  padding: 0;
  margin-top: 10px;
  margin-bottom: 0;
}

.coveo-category-facet-value-label {
  @include display(flex);
  @include facetValueLabelPadding();
  &.coveo-selectable {
    @include clickableCategoryFacetValue();
  }
}

.coveo-active-category-facet-parent {
  font-weight: bold;
  margin-left: 15px;
}

.coveo-category-facet-non-empty-path .coveo-category-facet-child-value .coveo-category-facet-value-label {
  padding-left: 53px;
}

.coveo-category-facet-last-value {
  color: black;
  .coveo-category-facet-value-label {
    &:hover,
    &:focus {
      background-color: white;
    }
  }
}

.coveo-category-facet-value-caption {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  @include flex-grow(1);
}

.coveo-category-facet-value-count {
  margin: 0 5px;
}

.coveo-category-facet-collapse-children {
  cursor: pointer;
  padding-right: 5px;
  vertical-align: top;
}

.coveo-category-facet-header {
  padding: 10px 20px 6px;
  color: $color-greyish-teal-blue;
  background-color: $color-blueish-white;
}

.coveo-category-facet-collapse-children-svg {
  transform: rotate(90deg);
  color: $color-light-grey;
  width: 10px;
  height: 6px;
  vertical-align: 2px;
}

.coveo-category-facet-title {
  display: inline-block;
}

.coveo-category-facet-header-wait-animation {
  margin-left: 10px;
  position: relative;
  display: inline-block;
  width: 18px;
  height: 20px;
  .coveo-category-facet-header-wait-animation-svg {
    @include facet-header-animation;
  }
}

.coveo-category-facet-more-less-container {
  width: 100%;
  background: $color-blueish-white;
  text-align: center;
  border-bottom-left-radius: $default-border-radius;
  border-bottom-right-radius: $default-border-radius;
}

.coveo-category-facet-more,
.coveo-category-facet-less {
  cursor: pointer;
  height: 15px;
  &:hover,
  &:focus {
    background: $color-light-grey;
    outline: none;
  }
}

.coveo-category-facet-header-eraser {
  float: right;
}

.coveo-category-facet-non-empty-path .coveo-category-facet-header-eraser {
  visibility: visible;
}

.coveo-category-facet-all-categories {
  @include facetValueLabelPadding();
  @include clickableCategoryFacetValue();
}

.coveo-category-facet-ellipsis-caption {
  @include facetValueLabelPadding();
  padding-left: 36px;
}

.coveo-category-facet-breadcrumb {
  display: block;
}

.coveo-category-facet-breadcrumb-title {
  @include breadcrumb-title();
}

.coveo-category-facet-breadcrumb-values {
  @include breadcrumb-value();
}
