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

.recipient-container{
  font-family: 'NunitoSans';
  font-size: 15px;
  border-bottom: 1px solid transparent;
  min-height: 40px;
  position: relative;

  > .recipient-content{
    padding-top: 6px;

    .recipient-tags{
      width: calc(100% - 100px);
    }
  }

  > .recipient-more {
    transition: height linear 130ms;

    &.collapsed{
      height: 0px;
    }

    &.expanded {
      height: 77px;
    }
  }
}

.recipient-content{
  align-items: center;
  box-sizing: initial;
  display: flex;
  min-height: 30px;
  padding: 3px 0;
  width: 100%;

  &:nth-child(2){
    padding-bottom: 8px;
  }

  .recipient-tags{
    height: 100%;
    margin-left: 0px;
    width: calc(100% - 40px);
  
    > span {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      height: 100%;
      position: relative;
  
      > div {
        display: flex;
        flex-grow: 3;
  
        input{
          background-color: transparent;
          border: none;
          border-radius: 0;
          box-shadow: none;
          flex-grow: 1;
          font-family: NunitoSans;
          font-size: 12px;
          font-weight: 100;
          height: 20px;
          margin: 2px 0;
        }
      }
    }
  }
}

.cptx-recipient-toggle{
  align-items: center;
  display: flex;
  cursor: pointer;
  height: 41px;
  margin-right: 8px;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  
  i{
    color: #6a707e;
    font-size: 32px;
    margin: 0 auto;
  }
}

.cptx-recipient-input-label {
  box-sizing: initial;
  font-size: 13px;
  font-weight: 200;
  padding-left: 20px;
  width: 4%;
}

.react-tagsinput {
  background-color: #fff;
  border: 1px solid #ccc;
  overflow: hidden;
  padding-left: 5px;
  padding-top: 5px;
}

.react-tagsinput--focused {
  border-color: #a5d24a;
}

.react-tagsinput-tag {
  background-color: #cde69c;
  border-radius: 2px;
  border: 1px solid #a5d24a;
  color: #638421;
  display: inline-block;
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 5px;
  margin-right: 5px;
  padding: 5px;
}

.react-tagsinput-remove {
  cursor: pointer;
  font-weight: bold;
}

.react-tagsinput-tag a::before {
  content: " ×";
}

.react-tagsinput-input {
  background: transparent;
  border: 0;
  color: #777;
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 6px;
  margin-top: 1px;
  outline: none;
  padding: 5px;
  width: 80px;
}

/* THEME
   ----------------------------- */
@mixin themable($_THEME, $_COLOR_TEXT_RECIPIENT_LABEL, $_BORDER_COLOR_SEPARATE, $_COLOR_TEXT_RECIPIENT_INPUT){
  [data-theme^=#{$_THEME}],
  [data-theme] [data-theme^=#{$_THEME}] {
    .recipient-container, .cptx-from-container{
      border-bottom-color: $_BORDER_COLOR_SEPARATE;
    }

    .recipient-content{
      .recipient-tags{
        > span {
          > div {
            input{
              color: $_COLOR_TEXT_RECIPIENT_INPUT;
            }
          }
        }
      }
    }

    .cptx-recipient-input-label {
      color: $_COLOR_TEXT_RECIPIENT_LABEL;
    }
  }
}
  
@include themable($_THEME_LIGHT, $_COLOR_TEXT_RECIPIENT_LABEL_LIGHT, $_BORDER_COLOR_SEPARATE_LIGHT, $_COLOR_TEXT_RECIPIENT_INPUT_LIGHT);
@include themable($_THEME_DARK, $_COLOR_TEXT_RECIPIENT_LABEL_DARK, $_BORDER_COLOR_SEPARATE_DARK, $_COLOR_TEXT_RECIPIENT_INPUT_DARK);