/*
 * 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);
    }
  }

  &[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: 31px;
    top: 7px;
    z-index: 1;
  }

  .toggleHiddenBtn {
    position: absolute;
    cursor: pointer;
    right: 41px !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: 81px;
    top: 7px;
  }

  .toggleLogo {
    position: absolute;
    right: 80px !important;
    top: 3.7px !important;
  }

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