@use "src/styles/variables" as *;

.vm-autocomplete {
  position: relative;
  max-height: 300px;
  overflow: auto;
  overscroll-behavior: none;

  &_mobile {
    max-height: calc(($vh * 100) - 70px);
  }

  &__no-options {
    padding: $padding-global;
    text-align: center;
    color: $color-text-disabled;
  }

  &__loader {
    display: grid;
    grid-template-columns: 14px auto;
    align-items: center;
    justify-content: center;
    gap: $padding-small;
    padding: $padding-global;
    color: $color-text-secondary;
    z-index: 2;
    pointer-events: none;

    svg {
      animation: half-circle-spinner-animation 1s infinite linear, vm-fade 0.5s ease-in;
    }
  }

  &-info,
  &-message {
    padding: $padding-global;
    background-color: $color-background-block;
    border-top: $border-divider;
  }

  &-message {
    position: relative;
    color: $color-warning;
    font-size: $font-size-small;

    &:after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: $color-warning;
      opacity: 0.1;
    }
  }

  &-info {
    min-width: 450px;
    max-width: 500px;
    overflow-wrap: anywhere;

    &__type {
      color: $color-text-secondary;
      margin-bottom: $padding-small;
    }

    &__description {
      line-height: 130%;

      p {
        margin: $padding-global 0;

        &:last-child {
          margin: 0;
        }
      }
    }
  }
}
