
.bw_tagbox {
	border: #c5c5c5 solid 1px;
	background-color: #FFFFFF;
	padding: 4px 4px 0;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	-webkit-box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.2);
	-moz-box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.2);
	box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
}

.bw_tagbox:after {
	content: '';
	clear: both;
	display: block;
	width: 0;
	height: 0;
	overflow: hidden;
	font-size: 0;
}


.bw_tagbox .list {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	flex-direction: row;
	justify-content: flex-start;
	align-items: flex-start;
	overflow: hidden;
}

.bw_tagbox .list > .tag_item {
	border: #ccc solid 1px;
	background-color: #eee;
	padding: 2px 20px 2px 2px;
	margin-right: 4px;
	margin-bottom: 4px;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	cursor: default;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	box-sizing: border-box;
	font-family: sans-serif;
	min-height: 26px;
	/*word-break: break-all;*/
	position: relative;
}

.bw_tagbox .list > .tag_item span {
	min-height: 20px;
	display: inline-block;
}


.bw_tagbox .list > .tag_item .close {
	display: block;
	position: absolute;
	top: 50%;
	margin-top: -8px;
	right: 2px;
	width: 16px;
	height: 16px;
	background: url('reset.png') no-repeat;

}

.bw_tagbox .list > .tag_input {
	align-self: stretch;
	flex-grow: 1;
	min-width: 50px;
	min-height: 20px;
	position: relative;
	padding: 0px;
	margin-right: 0px;
	margin-bottom: 4px;
}

.bw_tagbox .list > .tag_input input[type="text"] {
	border: none;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	outline: none;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
}


.bw_tagbox .list:after {
	content: '';
	clear: both;
	display: block;
	width: 0;
	height: 0;
	overflow: hidden;
	font-size: 0;
}

.bw_tagbox .list > .tag_item.selected,
.bw_tagbox .list > .tag_item.drag
{
	background: #d5d5d5;
	border: #ccc solid 1px;
}



.bw_tagbox .hidden {
	display: none;
}

.bw_tagbox .list > .tag_item.hover {
	background-color: red !important;
}

/* Убирает крести в input в IE. */
.bw_tagbox input[type="text"]::-ms-clear {
	display: none;
}




.bw_tagbox .empty {
	border: dashed #ccc 1px !important;
	display: block;
	background: #fff !important;
	box-sizing: border-box;
	padding: 2px;
	margin-right: 4px;
	margin-bottom: 4px;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	font-family: sans-serif;
}