/*
 * Copyright 2017-2021 EPAM Systems, Inc. (https://www.epam.com/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

@import "variables";

.cp-search-clear-filters-button {
  background: @primary-color;
  color: @primary-text-color;
}

.cp-search-clear-button {
  color: @application-color-faded;
}

.cp-search-clear-button:hover {
  color: @application-color;
}

.cp-search-filter .cp-search-filter-header {
  border-bottom: 1px dashed transparent;
}

.cp-search-filter .cp-search-filter-header:hover {
  background-color: @card-header-background;
}

.cp-search-filter .cp-search-filter-header.cp-search-filter-header-expanded {
  border-bottom: 1px dashed @panel-border-color;
}

.cp-search-filter .cp-search-filter-header .cp-search-filter-header-caret {
  color: @application-color;
}

.cp-search-filter .cp-search-filter-header.cp-search-filter-header-expanded .cp-search-filter-header-caret {
  transform: rotate(90deg);
}

.cp-search-results-table-header {
  background-color: @card-background-color;
  color: @application-color;
  position: sticky;
  top: 0;
  font-weight: bold;
  z-index: 2;
}

.cp-search-results-table-header-cell {
  margin: 0;
  padding: 5px;
  user-select: none;
  cursor: default;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  border-bottom: 1px solid transparent;
}

.cp-search-results-table-cell,
.cp-search-results-table-divider,
.cp-search-results-table-header .cp-search-results-table-header-cell {
  background-color: @card-background-color;
}

.cp-search-results-table-header .cp-search-results-table-header-cell {
  border-color: @card-border-color;
}

.cp-search-result-list-item {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.cp-search-results-table-cell {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.cp-search-results-table-divider {
  height: 100%;
  user-select: none;
  width: 4px;
}

.cp-search-results-table-header .cp-search-results-table-divider {
  cursor: col-resize;
  border-left: 1px solid @card-border-color;
}

.cp-search-results-table-header .cp-search-results-table-divider:not(:last-child) {
  border-bottom: 1px solid @card-border-color;
}

.cp-search-results-table-header .cp-search-results-table-divider:hover,
.cp-search-results-table-divider.active {
  border-left: 1px solid @primary-color;
}

.cp-search-result-item,
a.cp-search-result-item {
  color: @application-color;
}

.cp-search-result-item-main {
  color: currentColor;
}

.cp-search-result-table-item {
  cursor: pointer;
  color: inherit;
  text-decoration: none !important;
  display: grid;
  transition: background 0.2s ease;
}

a.cp-search-result-item:not(.disabled):hover,
.cp-search-result-item:not(.disabled):hover .cp-search-result-item-main {
  color: @primary-color;
}

.cp-search-result-item-sub {
  color: @application-color-faded;
}

a.cp-search-result-item.disabled,
.cp-search-result-item.disabled,
.cp-search-result-item.disabled .cp-search-result-item-main,
.cp-search-result-item.disabled .cp-search-result-item-sub {
  color: @application-color-disabled;
}

.cp-search-result-item-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  align-self: stretch;
}

.cp-search-result-item-action {
  margin-right: 0;
  padding: 0 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.cp-search-result-item:not(.disabled) .cp-search-result-item-action:hover {
  background-color: @primary-color;
  color: @primary-text-color;
}

.cp-search-result-item-tag .cp-search-result-item-tag-key,
.cp-search-result-item-tag .cp-search-result-item-tag-value {
  border: 1px solid @card-border-color;
}

.cp-search-result-item-tag .cp-search-result-item-tag-key {
  background-color: @card-header-background;
}

.cp-search-result-item-tag .cp-search-result-item-tag-value {
  background-color: @card-background-color;
}

.cp-search-preview-wrapper {
  background: @modal-mask-background;
}

.cp-search-preview {
  background-color: fade(@panel-background-color, 100%);
  border: 1px solid fade(@panel-border-color, 100%);
}

.cp-search-preview-button {
  color: @application-color;
}

.cp-search-preview-button:hover {
  color: @application-color-accent;
}

.cp-search-preview-error {
  color: @color-red;
}

.cp-search-comment-header {
  color: @application-color-faded;
}

.cp-search-header-image {
  background-color: transparent;
}

.cp-search-header-title,
.cp-search-header-sub-title,
.cp-search-header-description,
.cp-search-container .cp-search-content {
  color: @application-color;
}

.cp-search-content-preview-run,
.cp-search-content-preview-run i,
.cp-search-content-preview-run-task {
  color: @application-color;
}

.cp-search-description-tag {
  background-color: darken(@card-background-color, 5%);
  color: @application-color;
}

.cp-search-attribute-name {
  background-color: @tag-key-background-color;
  border-bottom: 1px solid @tag-key-value-divider-color;
}

.cp-search-attribute-value {
  background-color: @tag-value-background-color;
}

.cp-search-highlight {
  background-color: @card-background-color;
}

.cp-search-highlight-text {
  background-color: @search-highlight-text-background-color;
  color: @search-highlight-text-color;
}

.cp-search-highlight-text.inactive {
  background-color: @search-highlight-text-inactive-background-color;
  color: @search-highlight-text-color;
}

.cp-search-csv-table {
  border: 1px solid @card-border-color;
  background-color: @card-background-color;
  color: @application-color;
}

.cp-search-csv-table-cell {
  border: 1px solid @card-border-color;
  color: @application-color;
}

.cp-search-faceted-button {
  color: @application-color;
}

.cp-search-faceted-button.selected,
.cp-search-faceted-button .selected {
  color: @primary-color;
}

.cp-search-faceted-button.disabled,
.cp-search-faceted-button:hover.disabled {
  color: @btn-disabled-color;
  cursor: default;
}

.cp-search-type-button {
  background-color: fade(@card-background-color, 50%);
  color: @application-color;
  border: 2px solid transparent;
}

.cp-search-type-button.selected {
  background-color: @card-background-color;
  color: @application-color;
  border: 2px solid @application-color;
}

.cp-search-type-button:hover {
  background-color: @card-background-color;
}

.cp-search-type-button.disabled {
  background-color: transparent;
  color: @application-color-disabled;
  cursor: not-allowed;
}

.cp-fast-search-result-item {
  background-color: @card-background-color;
  border-color: @card-border-color;
  color: @application-color;
}

.cp-fast-search-result-item:hover,
.cp-fast-search-result-item.cp-table-element-hover {
  background-color: @table-element-hover-background-color;
  color: @table-element-hover-color;
}

.cp-tabs-no-content.cp-faceted-filters .ant-tabs-content {
  padding: 0!important;
}
