@import 'bourbon/bourbon';
@import 'Variables';
@import 'mixins/mediaQuery';
@import 'mixins/breadcrumb';

$max-width: 280px;
$min-width: 180px;

.coveo-simplefilter-header-wrapper {
  width: 100%;
  margin: auto;
  max-width: 1200px;
  position: relative;
  display: block;
  @include flex-wrap(nowrap);
  @include justify-content(flex-start);
  @include mediumScreenWidth() {
    &.coveo-no-results {
      max-width: 100%;
    }
  }
  &.coveo-no-results {
    max-width: 75%;
    margin: auto;
  }
}

.coveo-results-column .coveo-simplefilter-header-wrapper {
  &.coveo-no-results {
    margin: 0;
    padding-left: 0;
    text-align: left;
  }
}

.coveo-dropdown-background {
  display: none;
}

.coveo-dropdown-background-active {
  opacity: 0.9;
  display: block;
}

.CoveoSimpleFilter {
  cursor: pointer;
  padding: 5px 0;
  box-sizing: content-box;
  display: inline-block;
  position: relative;
  border: $default-border;
  background-color: white;
  max-width: $max-width;
  min-width: $min-width;
  &:hover {
    background-color: $color-blueish-white-grey;
  }
}

.coveo-simplefilter-selecttext {
  margin-left: 5px;
  max-width: $max-width;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  @include justify-content(flex-start);
}

.coveo-simplefilter-select {
  color: $color-greyish-teal-blue;
  @include display(flex);
  @include justify-content(center);
  @include align-items(center);
  overflow: hidden;
  width: inherit;
  pointer-events: none;
  text-overflow: ellipsis;
  @include user-select(none);
  white-space: nowrap;
  height: 20px;
}

.coveo-simplefilter-toggle-svg-container {
  @include display(flex);
  padding-top: 1px;
}

.coveo-simplefilter-circle {
  display: inline-block;
  letter-spacing: 0.4px;
  background-color: white;
  border: 2px solid $color-greyish-teal-blue;
  border-radius: 50%;
  color: $color-greyish-teal-blue;
  font-size: 13px;
  font-weight: bold;
  min-height: 20px;
  min-width: 20px;
  line-height: 16px;
  padding: 0 3px;
  text-align: center;
  margin: 0 3px;
  pointer-events: none;
}

.coveo-simplefilter-circle-hidden {
  display: none;
}

.coveo-simplefilter-value-container {
  display: none;
  border: $default-border;
  position: absolute;
  right: -1px;
  box-sizing: content-box;
  background-color: white;
  top: 28px;
  width: 100%;
  text-align: left;
  .coveo-checkbox-button {
    @include defaultRoundedBorder();
  }
  .coveo-checkbox-span-label {
    white-space: nowrap;
    vertical-align: middle;
    text-overflow: ellipsis;
    display: inline-block;
    overflow: hidden;
    width: 75%;
    margin-left: 6px;
  }
  .coveo-checkbox-button {
    vertical-align: middle;
  }
  .coveo-checkbox-label {
    white-space: nowrap;
    width: 100%;
    padding: 5px;
    @include user-select(none);
  }
}

.coveo-simplefilter-value-container label {
  display: inline-block;
}

.coveo-simplefilter-value-container-expanded {
  display: inline-block;
  z-index: 20;
}

.coveo-simplefilter-value-container label:hover {
  background-color: $color-blueish-white-grey;
}

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

.coveo-simplefilter-breadcrumb-value {
  @include breadcrumb-value();
}

.coveo-simplefilter-breadcrumb-clear {
  @include breadcrumb-value-clear();
}

.coveo-simplefilter-toggle-down-svg {
  margin: 0 5px;
  @include justify-content(flex-end);
  color: $color-greyish-teal-blue;
  width: 12px;
  height: 8px;
}

.coveo-simplefilter-eraser {
  @include justify-content(flex-end);
  position: relative;
  top: 1px;
  padding: 0 10px;
  pointer-events: auto;
  vertical-align: middle;
  border: none;
  background-color: transparent;

  @include clearButton('&', 'normal');
}

.coveo-simplefilter-empty {
  display: none;
}

.coveo-main-section {
  .CoveoSimpleFilter {
    margin-left: 15px;
  }
}

.coveo-facet-column {
  .CoveoSimpleFilter {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

.coveo-results-column {
  .CoveoSimpleFilter {
    margin-left: 0;
  }
}
