/*
 * 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.
 */

.link {
  padding: var(--spacing-small) var(--spacing-small);
  opacity: 0.8;
  z-index: 1;
  height: 40px;
  display: flex;
  align-items: center;
  border-radius: 4px;

  &[aria-disabled='true'] {
    cursor: not-allowed !important;
    opacity: 0.4;

    &:active {
      pointer-events: none !important;
    }

    &:hover {
      background-color: transparent !important;
    }
  }

  > p {
    flex-grow: 1;

    > span {
      padding-right: var(--spacing-small) !important;
    }
  }

  &.subLink {
    margin-left: var(--spacing-small) !important;
  }

  &:hover {
    text-decoration: none;
    opacity: 1;
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
    background-color: #dbebff;
  }

  &.highlighted {
    .text {
      --text-color: var(--primary-8);
      font-weight: 600;
    }
  }

  &.selected {
    .text {
      --text-color: var(--primary-8);
      font-weight: 600;
    }

    background-color: #dbebff;
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
    opacity: 1;
  }

  .customIcon {
    height: 16px;
    padding-right: var(--spacing-small) !important;
    color: var(--grey-700);
  }

  &.selected .customIcon,
  &.highlighted .customIcon {
    color: var(--primary-8);
  }

  .text {
    --text-color: var(--grey-700);
    color: var(--text-color) !important;
    font-size: 13px !important;
  }
}
