tags {
  display: block;
  border: 1px solid #DDD;
  padding-right: 0.3em 0.5em;
  cursor: text;
  overflow: hidden;
}

tags:hover {
  border-color: #CCC;
}

tags tag {
  display: inline-block;
  margin: 5px 0 5px 5px;
  vertical-align: top;
  position: relative;
  z-index: 1;
  cursor: default;
  -webkit-transition: .13s ease-out;
  -o-transition: .13s ease-out;
  transition: .13s ease-out;
  -webkit-animation: .3s tags--bump 1 ease-out;
          animation: .3s tags--bump 1 ease-out;
}

tags tag > div {
  vertical-align: top;
  position: relative;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  max-width: 100%;
  padding: 0.3em 0.5em;
  color: black;
  -webkit-transition: .13s ease-out;
  -o-transition: .13s ease-out;
  transition: .13s ease-out;
  padding-right: 1.5em;
}

tags tag > div > span {
  white-space: nowrap;
  overflow: hidden;
  -o-text-overflow: ellipsis;
     text-overflow: ellipsis;
  display: inline-block;
  vertical-align: top;
  width: 100%;
  -webkit-transition: .1s;
  -o-transition: .1s;
  transition: .1s;
}

tags tag > div::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #E5E5E5;
  border-radius: 3px;
  z-index: -1;
  pointer-events: none;
  -webkit-transition: 80ms ease;
  -o-transition: 80ms ease;
  transition: 80ms ease;
}

tags tag:hover div::before {
  top: -2px;
  right: -2px;
  bottom: -2px;
  left: -2px;
  background: #D3E2E2;
  -webkit-box-shadow: 0 0 0 0 #D39494 inset;
          box-shadow: 0 0 0 0 #D39494 inset;
}

tags tag.tagify--noAnim {
  -webkit-animation: none;
          animation: none;
}

tags tag.tagify--hide {
  width: 0 !important;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
  opacity: 0;
  -webkit-transform: scale(0);
      -ms-transform: scale(0);
          transform: scale(0);
  -webkit-transition: .3s;
  -o-transition: .3s;
  transition: .3s;
  pointer-events: none;
}

tags tag.tagify--mark div::before {
  -webkit-animation: .3s tagify--pulse 2 ease-out;
          animation: .3s tagify--pulse 2 ease-out;
}

tags tag.tagify--notAllowed div > span {
  opacity: .5;
}

tags tag.tagify--notAllowed div::before {
  background: rgba(211, 148, 148, 0.44);
  -webkit-transition: .2s;
  -o-transition: .2s;
  transition: .2s;
}

tags tag x {
  font: 14px/14px Serif;
  width: 14px;
  height: 14px;
  text-align: center;
  border-radius: 50px;
  position: absolute;
  z-index: 1;
  right: calc(0.5em - 2px);
  top: 50%;
  cursor: pointer;
  -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
          transform: translateY(-50%);
  -webkit-transition: .2s ease-out;
  -o-transition: .2s ease-out;
  transition: .2s ease-out;
}

tags tag x::after {
  content: "\00D7";
}

tags tag x:hover {
  color: white;
  background: #c77777;
}

tags tag x:hover + div > span {
  opacity: .5;
}

tags tag x:hover + div::before {
  background: rgba(211, 148, 148, 0.44);
  -webkit-transition: .2s;
  -o-transition: .2s;
  transition: .2s;
}

tags.readonly {
  cursor: default;
}

tags.readonly > div {
  visibility: hidden;
  width: 0;
  margin: 5px 0;
}

tags.readonly x {
  display: none;
}

tags.readonly tag > div {
  padding: 0.3em 0.5em;
}

tags input,tags textarea {
  border: 0;
  display: none;
}

tags input::-webkit-calendar-picker-indicator {
  display: none;
}

tags > div {
  display: inline-block;
  min-width: 10px;
  margin: 5px;
  padding: 0.3em 0.5em;
  position: relative;
  vertical-align: top;
}

tags > div > input {
  display: block;
  min-width: 130px;
}

tags > div > input:focus {
  outline: none;
}

tags > div > input.placeholder ~ span {
  opacity: .5;
  -webkit-transform: none;
      -ms-transform: none;
          transform: none;
}

tags > div > span {
  opacity: 0;
  line-height: 1.8;
  position: absolute;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  pointer-events: none;
  -webkit-transform: translatex(6px);
      -ms-transform: translatex(6px);
          transform: translatex(6px);
  -webkit-transition: .15s ease-out;
  -o-transition: .15s ease-out;
  transition: .15s ease-out;
}

@-webkit-keyframes tags--bump {
  30% {
    -webkit-box-shadow: 0 0 0 4px #E5E5E5;
            box-shadow: 0 0 0 4px #E5E5E5;
  }
}

@keyframes tags--bump {
  30% {
    -webkit-box-shadow: 0 0 0 4px #E5E5E5;
            box-shadow: 0 0 0 4px #E5E5E5;
  }
}

@-webkit-keyframes tagify--pulse {
  25% {
    background: rgba(211, 148, 148, 0.6);
  }
}

@keyframes tagify--pulse {
  25% {
    background: rgba(211, 148, 148, 0.6);
  }
}
