@use '../../abstracts/if_screen' as *;
@use '../../abstracts/next_to_sidebar' as *;

.chat-input {
  @include next_to_sidebar;
  background: var(--chat-input-bg);
  border: var(--chat-input-border);
  border-radius: var(--chat-input-border-radius);
  margin-top: var(--gutter);
  margin-bottom: 4px;
  height: 3.8rem;
  display: flex;
  align-items: center;
  bottom: 0;
  z-index: 3;

  @include if_screen("<=two-columns") {
    margin-bottom: 0;
    border-radius: 2px;
  }

  > * {
    display: block;
  }

  textarea {
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.2rem;
    border: 0;
    padding: 0;
    margin: 0;
    height: 1.2rem;
    max-height: 100%;
    width: 100%;
    display: block;
    resize: none;

    &::placeholder {
      color: var(--text-color);
      font-size: 1.1rem;
      font-weight: 400;
      transition: all 0.2s ease-in;
    }

    &:focus {
      outline: 0;
    }
  }

  .btn-hallow {
    font-size: 1.2rem;
    color: var(--link-color);
    margin-left: var(--gutter-small);
  }
}

.chat-input_menu {
  background: var(--autocomplete-bg);
  border-radius: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: -3px;
  min-width: 50%;
  max-width: 30em;
  opacity: 0.95;
  position: absolute;
  bottom: 100%;

  > * {
    padding: 0.3em 0.5em;
  }

  a,
  label {
    color: var(--input-color);
    text-decoration: none;
    display: block;

    &:hover,
    &.has-focus {
      background: var(--autocomplete-focus-bg);
    }
  }

  img {
    height: 1.5em;
    vertical-align: middle;
  }
}

.chat-input_menu.for-actions {
  right: 0.3rem;

  > * {
    line-height: 1.8em;
  }

  .far,
  .fas {
    width: 2em;
    text-align: center;
  }
}

.chat-input_menu.for-emojis {
  a {
    display: inline-block;

    &:first-of-type {
      display: block;
    }
  }
}
