@import '../../theme.scss';

/* TODO: (2) remove this once 3rd party cross-browser custom scroll bar is Added */
.textarea::-webkit-scrollbar {
  width: 11px;
}

/* Track TODO: as (2)*/
.textarea::-webkit-scrollbar-track {
}

/* Handle TODO: as (2) */
.textarea::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.3);
  border: 4px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}

.textarea-container {
  position: relative;
}

.textarea {
  height: 34px;
  min-height: 36px;
  width: 100%;

  overflow: hidden;
  outline: none;
  outline-offset: -1px;
  resize: none;
  border: none;

  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 7px 8px 8px 8px;
  color: rgb(255, 255, 255);
  background-color: rgb(86, 86, 86);
  font-size: 15px;

  &::selection {
    background-color: white;
    color: black;
  }

  &:focus {
    background-color: black;
    color: white;
  }

  &::placeholder {
    color: #cccccc;
    font-size: 15px;
  }

  &.black-input-theme {
    border-color: rgba(255, 255, 255, 0.4);
    border-radius: 0;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    background-color: black;
    color: white;
    /* these 2 lines support ie11 outline from breaking */
    margin-left: 1px;
    width: calc(100% - 1px);
  }
}

.textarea::-ms-input-placeholder {
  color: #cccccc;
  font-size: 15px;
}

.private-icon {
  width: 40px;
  height: 40px;
  background-size: 28px;
  position: absolute;
  top: -5px;
  right: 2px;
}

.beating-private-icon {
  animation: heartbeat 0.7s;
}

.input-actions-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-content: center;
  flex-flow: row wrap;
  margin-top: 5px;
  max-height: 35px;
}

.input-actions-container-animation {
  transform: translateY(35px);
  animation: come-in 0.1s ease-in-out forwards;
  transition: max-height 0.1s ease-in-out;
}

.ignore-clicks {
  pointer-events: none;
}

.send-button {
  background-color: $primary-color;
  color: $primary-text-contrast-color;
  border: none;
  border-radius: $roundness-1;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  margin-left: 8px;
  padding: 4px 12px;

  &:hover {
    background-color: $primary-darker-color;
  }

  &:active,
  &:focus {
    background-color: $primary-brighter-color;
  }

  &:disabled {
    background-color: #999999;
    cursor: default;
  }
}

.hide {
  max-height: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-content: center;
  overflow: hidden;
}

.hide-animation {
  transition: max-height 0.1s ease-in-out;
}

@keyframes come-in {
  to {
    transform: translateY(0);
  }
}
