@import "../../constants/index.scss";

.text {
  margin-bottom: 14px;
  flex: 1;
  position: relative;
  max-width: 360px;
  overflow: hidden;
  font-family: "Roboto", serif;
}

.textWithMargin {
  margin-right: 16px;
  outline: none;
}

.textActive {
  .textLabel {
    color: $primary-color;
  }
  .textInputWrapper {
    border-color: $primary-color;
    background-color: rgba($primary-color, 0.05);
  }
}

.textError {
  .textLabel {
    color: $warning-color;
  }
  .textInputWrapper {
    border-color: $warning-color;
    background-color: rgba($warning-color, 0.05);
  }
}

.textLabelWrapper {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  justify-content: space-between;
  span:nth-child(2) {
    opacity: 0.5;
    font-size: 10px;
    transition: 0.2s ease-out;
    cursor: pointer;
    &:hover {
      opacity: 1;
    }
  }
}

.textLabel {
  display: block;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  margin-left: 2px;
  transition: 0.2s ease-out;
  margin-right: 8px;
}

.textHint {
  display: block;
  color: #999;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 8px;
  margin-left: 2px;
  margin-top: -6px;
  transition: 0.2s ease-out;
}

.inputWrapper {
  display: flex;
  // align-items: center;
  flex-direction: column;
  margin-bottom: 0px;

  &.last {
    margin-bottom: 0px;
  }
}

.inputVariant {
  position: relative;
  font-size: 12px;
  margin-bottom: 8px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  color: #333;

  .inputVariantIcon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .inputVariantEndLine {
    position: relative;
    height: 1px;
    flex: 100;
    margin-left: 8px;
    margin-right: 8px;
    top: 1px;
    background-color: #ccc;
  }
  .inputVariantStartLine {
    content: "";
    height: 1px;
    min-width: 8px;
    margin-right: 8px;
    background-color: #ccc;
  }

  .inputVariantEndText {
    color: #666;
    margin-right: 4px;
    text-decoration: underline;
    cursor: pointer;
  }
}

.addVariant {
  position: relative;
  font-size: 12px;
  margin-bottom: 8px;
  margin-top: 4px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  color: #666;
  font-weight: 700;

  .addVariantIcon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .addVariantEndLine {
    position: relative;
    top: 1px;
    height: 0px;
    flex: 100;
    min-width: 8px;
    margin-left: 8px;
    margin-right: 8px;
    border-bottom: 1px dashed #ddd;
  }

  .addVariantButton {
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
  }
}

.textInputWrapper {
  flex: 1;
  transition: 0.2s ease-out;
  cursor: pointer;
  &.disabled {
    pointer-events: none;
    background-color: #eee;
  }
}

.textInputSubtext {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px;
  font-size: 12px;

  position: absolute;
  bottom: 0;
  transform: translate3d(0, 100%, 0);
  padding-top: 4px;
}

.textInputSubtextCount {
  opacity: 0.5;
}

.textInputSubtextError {
  color: #ff0c0c;
  opacity: 0.8;
}

.addHSLButton {
  margin-bottom: 8px;
}

.reply {
  position: relative;
  z-index: 10000;
  &:hover {
    .replyActions {
      opacity: 1;
      transform: translate3d(-25px, -50%, 0);
      &.isSorting {
        opacity: 0;
        transform: translate3d(-100%, -50%, 0);
      }
    }
  }
}

.replyActions {
  position: absolute;
  top: 50%;
  right: 0;
  background-color: #fff;
  box-shadow: 0 0px 12px rgba(#000, 0.2);
  transform: translate3d(0, -50%, 0);
  border-radius: 6px;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(50%, -50%, 0);
  transition: 0.2s ease-out;
  z-index: 2;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  pointer-events: none;

  // &.active {
  //   opacity: 1 !important;
  //   transform: translate3d(0, -50%, 0) !important;
  // }

  .replyActionsIcon {
    width: 32px;
    height: 32px;
    padding: 6px;
    border-right: 1px solid #eee;
    cursor: pointer;
    box-sizing: border-box;

    &:hover {
      background-color: #f5f5f5;
    }

    &:not(:first-child) {
      pointer-events: auto;
    }
  }
}

.settingsPopup {
  max-height: unset;
  z-index: 10000;
  pointer-events: auto;
}

.unsupported {
  display: flex;
  align-items: center;
  background-color: #fad8db;
  width: 300px;
  height: 50px;
  border-radius: 2px;
  padding: 10px;
  box-sizing: border-box !important;
  margin-bottom: 10px;
  margin-top: -6px;
  cursor: default;

  &_hsl {
    border: 1px solid #ef8b93;
  }

  &_text {
    color: #d91e2d;
    margin-left: 8px;
    line-height: 18px;
    font-size: 14px;
    padding: 4px 0;
  }

  &_icon {
    align-self: flex-start;
  }
}
