
.filters {
  $this: &;
  display: inline-block;
  width: 100%;
  z-index: 2;
  &__area {
    display: block;
    top: -1em;
    left: 0;
    right: 0;
    z-index: 2;
  }
  &__container {
      display: flex;
      padding: 1.5em 0 0.5em 0;
      margin-bottom: 1px;
      @extend %clearfix;
      margin: 0 !important;
  }
  &__row {
    display: flex;
    align-items: center;
  }
  &__tags {
      // min-height: 40px;
      @extend %clearfix;
      position: relative;
      text-align: left;
      // border-bottom: 1px solid palette(grey,lines);
      &--empty {
        border-bottom: none;
      }
      >* {
          width: auto;
      }
  }
  &__content {
    background: palette(white);
    padding: 1em 0 0.5em 0;
    border-bottom: 1px solid palette(grey, lines);
    position: relative;
    z-index: 2;
  }
  &__title {
    margin-right: auto;
    &__action {
      @include font-size(18px);
      font-weight: normal;
      font-family: $sff;
      color: palette(grey, medium);
    }
    &__info {
      // max-width: calc(100% - 200px);
      // overflow: hidden;
      // text-overflow: ellipsis;
      // display: inline-block;
      font-weight: 300;
      @include font-size(13px);
      color: palette(grey, medium);
      white-space: nowrap;
      display: flex;
      align-items: center;
      span {
        display: inline;
      }
    }
    &__datasource {
      @include font-size(13px);
      margin-right: 1em;
      margin-left: 1em;
      font-weight: 600;
      // max-width: 20vw;
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    &__model {
      @include font-size(13px);
      color: palette(grey, dark);
      border: 1px solid palette(grey, dark);
      border-radius: 3px;
      margin-right: 1em;
      margin-left: 1em;
      font-weight: 600;
      padding: 0.1em 0.3em;
      max-width: 17vw;
      overflow: hidden;
      display: inline-block;
      text-overflow: ellipsis;
    }
    &__records {
      @include font-size(14px);
      color: palette(purple);
      font-weight: 600;
    }
    &__project {
      color: palette(orange);
      text-decoration: none;
      @include font-size(13px);
    }
  }
  &__switch {
    margin-top: 1em;
    margin-right: 0;
    margin-left: auto;
  }
  &__searchbar {
    margin-left: 3em;
    margin-right: 0;
    ::v-deep .searchbar {
      min-height: 40px;
      margin-bottom: 0;
      min-width: 270px;
      border: 2px solid palette(grey, smooth);
      .svg-icon {
        fill: palette(grey, medium);
      }
      &.re-input-focused {
        border: 2px solid palette(purple);
        .svg-icon {
          fill: palette(purple);
        }
      }
      input.re-input {
        color: palette(grey, dark);
        @include input-placeholder {
          color: palette(grey, dark);
          @include font-size(13px);
        }
      }
    }
  }
  &--right {
    margin-right: 0;
    margin-left: 3em;
    display: flex;
    min-width: 270px;
    padding: 0;
    .filter:last-child {
      margin-right: 0;
      margin-left: auto;
      padding-right: 0;
    }
  }
}

.filter {
  vertical-align: bottom;
  float: left;
  margin-bottom: 0;
  text-align: left;
  position: relative;
  padding-right: 1em;
  min-width: 135px;
  width: 25%;
  margin-bottom: 1em;
  &__show-more {
    height: 40px;
    min-width: 120px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-right: auto;
    margin-left: 0;
    &.active:after {
      transform: rotate(-43deg);
      margin-top: 8px;
    }
    &:after {
      margin-right: 1em;
      content: '';
      border-color: #4a4a4a;
      border-style: solid;
      border-width: 1px 1px 0 0;
      display: inline-block;
      height: 8px;
      width: 8px;
      transform: rotate(133deg);
      margin-bottom: 2px;
      margin-left: auto;
    }
  }
  &__sort {
    // max-width: 144px;
    min-width: 150px;
    margin-right: 0;
    margin-left: 1em;
  }
  &__item {
      height: 45px;
      transition: height 0s ease-in-out;
      overflow: hidden;
      border: 2px solid palette(grey, smooth);
      text-align: center;
      position: relative;
      &--open {
        z-index: 3;
        background: palette(white);
        border-color: palette(purple);
      }
  }
  &__buttons {
    margin-top: 1em;
    text-align: right;
  }
  .re-switch {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0;
  }
  label {
    text-align: left;
    margin-bottom: 5px;
    display: inline-block;
    &.--active {
        z-index: 3;
        position: relative;
    }
  } // if confidence filter is active
  &.--selected {
    ::v-deep .checkbox-label {
      color: palette(purple);
    }
    ::v-deep .checkbox-container {
      display: none;
    }
    ::v-deep .dropdown__content .button-primary--small {
      background: palette(purple, disabled);
      pointer-events: none;
      cursor: default;
    }
    ::v-deep .dropdown__header {
      border-color: palette(purple);
      background: palette(white);
    }
    ::v-deep .filter__item--confidence {
      border-color: palette(purple);
      background: palette(white);
    }
    ::v-deep .filter__item--confusion {
      border-color: palette(purple);
      background: palette(white);
    }
  }
  &.--selected-meta {
    ::v-deep .dropdown__header {
      border-color: palette(purple);
      background: palette(white);
    }
  }
  .--selected {
    ::v-deep .checkbox-label {
      color: palette(purple);
    }
    ::v-deep .checkbox-container {
      display: none;
    }
  }
  &.disabled {
    opacity: 0.4;
    pointer-events: none;
  }
  .disabled-filter {
    opacity: 0.4;
    pointer-events: none;
    ::v-deep .dropdown__selectables {
      display: none
    }
  }
}

.re-button.clear {
  left: 0;
  outline: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  height: 45px;
  width: 100%;
  position: absolute;
}

.overlay {
  background: rgba(0, 0, 0, 0.19);
  height: 127vh;
  position: fixed;
  width: 100vw;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}
