/*
 * bootstrap-tagsinput v0.8.0
 *
 */

/* Contenedor principal: Flexbox para alinear y saltar de línea SOLO cuando no quede espacio real */
.bootstrap-tagsinput {
  background-color: #fff;
  border: 1px solid #ced4da;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  padding: 4px 8px;
  color: #495057;
  border-radius: 0.25rem;
  cursor: text;
  height: auto !important; /* Anula el alto fijo restrictivo de Bootstrap 4 */
  min-height: calc(1.5em + .75rem + 2px);
}
/* Input interno: Truco Flex para ignorar el atributo "size" del JS */
.bootstrap-tagsinput input {
  border: none;
  box-shadow: none;
  outline: none;
  background-color: transparent;
  padding: 0;
  margin: 2px 0;
  /* Estas 3 líneas son la magia para que no salte a la otra línea: */
  flex: 1 1 auto;        /* Crece para ocupar exactamente el espacio restante */
  width: 1% !important;  /* Anula el atributo 'size' impuesto por el JS */
  min-width: 60px;       /* Solo saltará de renglón si quedan menos de 60px libres */
}
.bootstrap-tagsinput.form-control input::-moz-placeholder {
  color: #777;
  opacity: 1;
}
.bootstrap-tagsinput.form-control input:-ms-input-placeholder {
  color: #777;
}
.bootstrap-tagsinput.form-control input::-webkit-input-placeholder {
  color: #777;
}
.bootstrap-tagsinput input:focus {
  border: none;
  box-shadow: none;
}
/* Estética de las etiquetas */
.bootstrap-tagsinput .tag {
  margin-right: 4px;
  margin-bottom: 2px;
  margin-top: 2px;
  font-size: 14px;
  padding: 3px 6px;
}
.bootstrap-tagsinput .tag [data-role="remove"] {
  margin-left: 8px;
  cursor: pointer;
}
.bootstrap-tagsinput .tag [data-role="remove"]:after {
  content: "x";
  padding: 0px 2px;
}
.bootstrap-tagsinput .tag [data-role="remove"]:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.bootstrap-tagsinput .tag [data-role="remove"]:hover:active {
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
/* Ocultar el placeholder automáticamente si ya hay etiquetas */
.bootstrap-tagsinput .tag ~ input::-webkit-input-placeholder { color: transparent; }
.bootstrap-tagsinput .tag ~ input::-moz-placeholder { color: transparent; }
.bootstrap-tagsinput .tag ~ input:-ms-input-placeholder { color: transparent; }
.bootstrap-tagsinput .tag ~ input::placeholder { color: transparent; }
