@use 'src/styles/abstracts' as *;

.QueryForm {
  padding: 0.625rem $space-lg;
  display: flex;
  height: toRem(92px);
  width: 100%;
  border-bottom: $border-main;
  &__topPanel {
    flex: 1 100%;
    &__plusIcon {
      margin-right: $space-xs;
    }
  }
  &__container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 1rem;
    .MuiBox-root {
      justify-content: flex-start;
    }
  }
  &__search {
    width: 103px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    &__button {
      // width: 100%;
    }
    &__actions {
      display: flex;
      justify-content: space-between;

      button {
        border: $border-main;
        width: 2em;
        &:nth-child(2) {
          margin: 0 0.25rem;
        }
        &.active {
          border: 0.0625rem solid $primary-color;
          background-color: tint($primary-color, 95);
        }
      }
    }
  }

  &__Popper {
    border: $border-main;
    width: 40%;
    max-width: 600px;
    border-radius: $radius-main;
    z-index: 10;
    color: #586069;
    background-color: #ffffff;
    .MuiAutocomplete-paper {
      box-shadow: unset;
      margin: unset;
    }
  }

  &__clearAll {
    height: 24px;
    width: 24px;
    background: #e8f1fc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;

    &:after {
      content: '';
      position: absolute;
      width: 20px;
      height: 34px;
      background: rgba(255, 255, 255, 0.5);
      background: linear-gradient(
                      90deg,
                      rgba(255, 255, 255, 0) 0%,
                      rgba(255, 255, 255, 1) 92%
      );
      left: -20px;
      top: -5px;
      border-radius: 0;
      color: white;
      pointer-events: none;
    }

    i {
      color: #1473e6;
      font-size: 10px;
    }
  }
  &__tags {
    display: flex;
    align-items: center;
    overflow: auto;
    max-width: calc(100vw - 32rem);
    min-width: 12rem;
    .Badge {
      margin-right: 0.5rem;
      &:last-child {
        margin-right: 20px;
      }
    }
    .TagLabel {
      margin-right: 0.5rem;
      &:last-child {
        margin-right: 20px;
      }
    }
    &__empty {
      font-size: $text-md;
      color: $pico-50;
      font-weight: normal;
    }
  }
  &__textarea {
    flex: 1;
    .MuiOutlinedInput-multiline.MuiOutlinedInput-marginDense {
      padding-top: toRem(7.5px);
      padding-bottom: toRem(7.5px);
    }
  }

  &__metric__select {
    width: 100%;

    input {
      padding: 0.5rem;
      font-size: $text-md;
      border-bottom: $border-main;
    }
  }
}

