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

.popover {
  > div[class*='popover-arrow'] {
    display: none;
  }

  .listContainer {
    min-height: 50px;
    overflow-y: auto;

    :global {
      .bp3-menu {
        li {
          padding: var(--spacing-small) !important;
        }
      }

      a.bp3-menu-item:hover,
      .bp3-active {
        background: var(--primary-1) !important;
        color: var(--grey-1000) !important;
      }
    }
  }
}

.buttonDiv {
  width: 100% !important;
  height: auto !important;
  :global {
    [class*='FormError--errorDiv'] {
      margin-left: var(--spacing-2) !important;
    }
  }
}

.button {
  width: 100% !important;
  height: 50px !important;
  justify-content: space-between !important;
  font-size: var(--font-size-normal);
  --border: 1px solid var(--grey-200) !important;
  --background-color-active: var(--white) !important;
  --box-shadow: none !important;
  white-space: nowrap !important;

  &:active,
  &:hover,
  &[class*='bp3-active'] {
    --border: 1px solid var(--primary-7) !important;
  }

  :global(> .bp3-button-text) {
    width: 100%;
    margin-left: var(--spacing-small);
  }
}

.buttonWithoutIcon {
  padding-left: var(--spacing-medium) !important;
  :global(> .bp3-button-text) {
    width: 100%;
    margin-left: 0 !important;
  }
}

.buttonPopoever {
  width: 50%;
  :global(> .bp3-popover-target) {
    width: 100%;
  }
}
