/*
 * Copyright 2023 Harness, Inc.
 *
 * 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.
 */

.searchCtn {
  position: relative;
  width: 100%;

  &[data-search-mode='keyword'] {
    input {
      background-color: transparent !important;
      color: transparent !important;
      caret-color: var(--black);
    }
    .toggleRegexIconContainer {
      right: 39px !important;
      top: 4.5px !important;
      z-index: 1;
    }
  }

  &[data-search-mode='semantic'] {
    input {
      caret-color: var(--black);
      border-color: var(--ai-purple-600) !important;
    }
  }

  > div:nth-child(2),
  > div:nth-child(2) > div,
  > div:nth-child(2) > div > div {
    width: 100%;
  }

  > div:nth-child(2) > div > div {
    padding-left: 0 !important;
  }

  .textCtn {
    position: absolute;
    left: 31px;
    top: 8px;
    color: black;
    font-size: 13px;
    z-index: 1;
  }

  .highltedText {
    background-color: var(--primary-1);
    border-radius: 4px;
    color: var(--primary-7);
  }

  .andOr {
    color: var(--red-700);
  }

  .toggleBtn {
    position: absolute;
    right: 62px;
    top: 7px;
    z-index: 1;
  }

  .toggleHiddenBtn {
    position: absolute;
    cursor: pointer;
    right: 66px !important;
    top: 8px;
    border-radius: 8px;
    right: 49px;
    font-size: 9px;
    padding: 7.5px 14px;
    color: transparent;
    border: none;
    background-color: transparent;
    z-index: 2;
  }

  :global {
    .bp3-control.bp3-switch input:checked ~ .bp3-control-indicator {
      background-color: var(--ai-purple-600);
    }
    .bp3-control.bp3-switch input:checked ~ .bp3-control-indicator {
      background-color: var(--ai-purple-800);
    }
  }
  .toggleTitle {
    position: absolute;
    right: 105px;
    top: 7px;
  }

  .toggleRegexIconContainer {
    position: absolute;
    right: 39px !important;
    top: 4.5px !important;
    z-index: 1;
  }
  .toggleRegexIconContainer:hover {
    fill: var(--primary-7) !important;
  }
  .toggleLogo {
    position: absolute;
    right: 105px !important;
    top: 3.7px !important;
  }
  .bp3-popover-wrapper {
    right: 29px;
    position: absolute;
  }

  .searchIcon {
    position: absolute;
    left: 12px;
    top: 11px;
    z-index: 1;
  }
}

.popover {
  z-index: 2;
  position: relative;
  top: -23px;
  right: 50px !important;
}

.layoutCtn {
  display: flex;
}

.messageContainer {
  width: 100%;
}

.emptyContainer {
  height: 0px !important;
  width: 100%;
}
