@import "../../scss/mnd-bootstrap/variables/variables";

$font-source-sans-pro: $font-family-sans-serif;

.mnd-c-tags-input {
  width: 100%;

  .react-tagsinput {
    min-height: 2rem;
    height: auto;
    font-size: 1rem;
    padding: 0.25rem 1rem;
    cursor: text;
    background-color: $color-white;
    border: 1px solid $color-gray-4000;
    border-radius: 0.25rem;

    > span {
      align-content: stretch;
      display: flex;
      flex-flow: row wrap;
      justify-content: flex-start;
      position: relative;
      background-color: transparent;
    }

    &-remove {
      cursor: pointer;
      display: inline-block;
      font-weight: bold;
      margin-left: 0.25rem;
      font-size: 0.875rem;
      color: $color-white;
      opacity: 1;
      text-shadow: none;
    }

    &-tag {
      align-self: center;
      flex: 0 1 auto;
      padding: 0.25rem 0.5rem;
      font-weight: normal;
      background: $color-gray-2000;
      border: 0;
      color: $color-white;
      border-radius: 0.25rem;
      font-size: 0.875rem;
      margin: 0.25rem 0.75rem 0.25rem 0;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      word-break: break-word;
      hyphens: auto;
    }

    &-input {
      align-self: auto;
      flex: 1 1 auto;
      border: none;
      outline: none;
      display: flex;
      align-items: center;
      min-height: 2.125rem;
      background-color: transparent;
    }

    &-input::placeholder {
      height: 1.25rem;
      color: $color-gray-3000;
      font-family: $font-source-sans-pro;
      font-size: 0.875rem;
      font-style: italic;
      line-height: 1.25rem;
      align-self: center;
      padding-left: 0.25rem;
    }

    &--focused {
      border: 1px solid $color-gray-2000;
      background-color: $color-gray-6000;
      box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.2);
    }

    .has-error &--focused,
    .has-error &--input {
      box-shadow: none;
      border: 1px solid $color-copenhagen-red;
    }

    .close:hover,
    .close:focus {
      color: $color-white;
      opacity: 0.9;
      outline: none;
    }
  }
}
