@import './Variables';
@import './Animations';
@import 'mixins/resultsHeaderElement';
@import 'coveo-styleguide/scss/common/palette';
@import 'coveo-styleguide/scss/variables';

.coveo-relevance-inspector {
  text-align: center;
  padding: 10px;
  line-height: 20px;
  height: 40px;
  top: 0;
  z-index: 1000;
  &.coveo-hidden {
    display: none;
  }
}

.relevance-inspector-modal {
  .coveo-logo {
    height: 64px;
    width: 178px;
  }
}

.ag-theme-fresh {
  .ag-cell {
    overflow: auto;
    white-space: normal;
    word-break: break-word;
  }
  .ag-font-style {
    user-select: auto;
  }
}

.coveo-relevance-inspector-tab-navigation-section {
  margin-bottom: 20px;
}

.coveo-relevance-inspector-tab-content {
  display: none;
  &.coveo-selected {
    display: block;
    @include animation(slideInLeft 0.3s ease-in);
  }
}

.coveo-relevance-inspector-tab {
  @include resultsHeaderElement();
  display: inline-block;
  margin-right: 10px;
}

.coveo-relevance-inspector-highlight {
  display: inline-block;
  font-weight: bold;
}

.coveo-relevance-inspector-result-thumbnail {
  min-width: 500px;
  white-space: normal;
}

.coveo-relevance-inspector-dt {
  font-weight: bold;
}

.coveo-relevance-inspector-dt,
.coveo-relevance-inspector-dd {
  font-size: 14px;
  line-height: 14px;
  padding: 2px 0 4px;
}

.coveo-relevance-inspector-metadata-name,
.coveo-relevance-inspector-metadata-value {
  background-color: #e9ecef;
  display: block;
  padding: 10px;
  line-height: 1.5;
  border: 1px solid #ced4da;
  border-radius: 2px;
  position: relative;
  flex: 1 1 auto;
  margin-bottom: 0;
}

.coveo-relevance-inspector-metadata-name {
  max-width: 25%;
  min-width: 25%;
}

.coveo-relevance-inspector-metadata-value {
  width: 75%;
  overflow: auto;
}

.coveo-relevance-inspector-input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.coveo-relevance-inspector-tab-content {
  .coveo-input {
    margin: 40px 0 10px;
  }
}

.coveo-relevance-inspector-available-fields-popup {
  background: white;
  @include defaultRoundedBorder();
  padding: 10px 5px 10px 20px;
  width: 200px;
  overflow: hidden;
  list-style-type: none;
}

.coveo-relevance-inspector-available-fields-popup-value {
  padding: 0 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.coveo-available-fields-table-button {
  overflow: hidden;
  display: inline-block;
  @include align();
}

.coveo-relevance-inspector-effective-query-collapsible {
  display: none;
  &.coveo-active {
    display: inherit;
  }
}

.coveo-relevance-inspector-table {
  width: 100%;
  text-align: left;
  border: none;
  border-spacing: 0;
  tr {
    height: $table-row-height;
    font-size: $table-row-font-size;
    line-height: $table-row-line-height;
    &:first-child {
      padding-left: 10px;
    }
    &:hover td {
      background-color: $light-grey;
    }
  }
  td {
    position: relative;
    text-align: left;
    vertical-align: middle;
    padding: $table-row-top-bottom-padding $table-cell-left-right-padding;
    margin-left: 15px;
    text-align: left;
    border-bottom: $table-border;
    &:first-child {
      border-left: $table-selected-border-width solid transparent;
    }
  }
}

.coveo-relevance-inspector-inline-ranking {
  @include defaultRoundedBorder();
  @include display(flex);
  @include flex-wrap(wrap);
  padding: 10px;
  margin-bottom: 10px;
}

.coveo-relevance-inspector-inline-ranking-section {
  margin: 10px;
}

.coveo-relevance-inspector-inline-ranking-terms {
  display: none;
  padding: 10px;
  width: 100%;
  &.coveo-active {
    display: block;
    @include animation(fadein 0.5s);
  }
  h2 {
    border-bottom: $default-border;
  }
  dl {
    @include display(flex);
    @include flex-wrap(wrap);
    @include align-items(center);
  }
  dt {
    margin: 10px 20px;
  }
  dd {
    margin-left: 0;
  }
}

.coveo-relevance-inspector-inline-ranking-button {
  height: 35px;
  margin: 5px 0;
}

.relevance-inspector-list-output {
  padding-left: 5px;
  margin-top: 0;
}

.coveo-relevance-inspector-inline-ranking-qre-expression {
  font-weight: bold;
  word-break: break-all;
}
