/*
 * Copyright (C) 2017-2019 Dremio Corporation
 *
 * 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.
 */
.function-item {
  display: flex;
  flex-direction: column;
  padding: 8px;
  cursor: pointer;

  &:hover,
  &:focus-visible {
    background-color: var(--fill--primary--hover);
    .function-item__add-icon {
      display: flex !important;
    }
  }

  &:focus-within {
    .function-item__add-icon {
      display: flex !important;
    }
  }

  &.--isActive {
    background-color: var(--fill--primary--selected);
  }

  &__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 24px;

    &__tags {
      display: flex;
      gap: 4px;
    }
  }

  &__icon {
    padding: 0;
    color: var(--icon--primary) !important;

    &:hover,
    &:focus-visible {
      color: var(--icon--hover) !important;
    }

    &:disabled {
      color: var(--icon--disabled) !important;
    }
  }

  &__add-icon {
    display: none;
    width: 24px;
    height: 24px;
  }

  &__label {
    padding: 4px 0;
    font-size: 14px;
    line-height: 20px;
    font-family: var(--dremio--font-family--monospace);
  }

  &__description,
  &__samples {
    color: var(--text--faded);
    font-size: 12px;
  }

  &__label,
  &__description,
  &__header {
    overflow: hidden;
    flex-wrap: wrap;
    display: flex;
  }

  &__divider {
    background-color: var(--border--neutral);
    border: none;
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }

  &__extraHeader {
    color: var(--color--brand--300);
    font-weight: 600;
    margin-bottom: 4px;
  }

  ul {
    list-style: disc;
    margin-left: 24px;
    li {
      margin-bottom: 12px;
      &:last-child {
        margin-bottom: 12px;
      }
    }
  }

  &__samples {
    margin-bottom: 8px;
    white-space: pre-wrap;
  }

  &__learnMore {
    margin-top: 4px;
  }

  :global {
    .tag-list__tag {
      border-color: var(--fill--primary--selected--hover) !important;
    }
    .tag__textWrapper {
      padding: 0 4px !important;
    }
  }
}
