/*select2 custom styles */
.select2-container {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.select2 {
    min-width: 135px;
}
select.largeSelect + span.select2-container--default{
    min-width: 400px;
    max-width: 400px;
}
.select2-container--default .select2-selection--single, .select2-dropdown , .select2-container--default .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: solid 1px #9999ff;
    border-radius: 0;
}

.select2-container .select2-selection--single {
    height: 26px;
}

.narrow .select2-container .select2-selection--single {
    height: 29px;
}

.narrow #all .select2-container .select2-selection--single {
    height: 29px;
}

#all .select2-container .select2-selection--single {
    height: 32px;
}

#all .select2-container .select2-selection--single .select2-selection__rendered {
    max-height: 28px;
    line-height: 28px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 4px;
    color: #000;
    line-height: 24px;
    box-shadow: none;
    max-height: 24px;         /* bugFix при по-дълга опция да не излиза извън селекта */
}

.select2-selection__clear {
    color: #999;
    position: absolute;
    right: 18px;
    top: 2px;
    z-index: 10;
}

.select2-selection__clear:hover {
    color: #333;
}
.select2-container *{
    box-shadow: none !important;
    outline: none !important;
}

.select2-results__option {
    padding: 4px 6px;
}

.select2-container:focus {
    outline: none;
}

.select2-search__field {
    margin-top: 0 !important;
}

.select2-search__field, .select2-selection__rendered {
    box-shadow: none !important;
}

.select2-container .select2-selection--multiple {
    min-height: 22px !important;
}
.select2-container .select2-selection--multiple input {
    height: 1.26em;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    position: relative;
    top: 2px;
}
.select2-container .select2-selection--multiple .select2-selection__choice {
    margin-top: 2px !important;
    font-size: 0.8em;
    position: relative;
    top: -1px;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
    margin-top: 0 !important;
    margin-right: -2px ;
    top: 0 !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 3px;
}
.select2-results__option, .select2-container--default .select2-results__group {
    padding: 0;
}
.select2-results__option  span{
    padding: 4px 6px;
    display: block;
}

.select2-results__group, span.team , .select2-results__option span.group {
    cursor: default;
    color: #fff;
    background-color: #777;
    font-weight: bold;
}

span.all-users, span.all-reg-users, span.all-human, span.all-teams, span.system-user, span.anonym-user {
    color: #777;
}

.select2-selection {
    -moz-transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) inset !important;
}

.select2-selection:focus, .select2-container--default.select2-container--focus .select2-selection--multiple {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) inset, 0 0 7px rgba( 153, 153, 255, 0.7) !important;
}

.inputError + .select2 {
    border: 1px solid red;
}
.inputError + .select2 {
    border: 1px solid red;
}

.inputAdvanced + .select2 > .selection > .select2-selection {
    background-color:#dfd !important;
}

.select2-selection--multiple  {
	    background-image: url('../../img/16/darrow.png') !important;
	    background-repeat: no-repeat !important;
	 	background-position: right 15px center !important;
        padding-right:10px;
        cursor: pointer;
}

.inputWarning + .select2{
    border: solid 1px blue;
}

.inputError + .select2 .select2-selection , .inputWarning + .select2 .select2-selection {
    box-shadow: none !important;
    border: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 0;
    margin-left: 2px;
    float: right;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute;
    right: 0px;
    margin-top: 5px;
    font-size: 1.1em;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    right: 20px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected] span:not(.expand-collapse, .non-leaf) {
    background-color: #5897fb !important;
    color: #fff;
}

.modern-theme .select2-container--default .select2-selection--single, .modern-theme .select2-dropdown, .modern-theme  .select2-container--default .select2-selection--multiple {
    border: solid 1px #bbbbbb;
    border-radius: 2px;
}

.modern-theme .select2-selection:focus{
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08), 0 0 8px rgba(102, 175, 233, 0.5) !important;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08), 0 0 8px rgba(102, 175, 233, 0.5) !important;
}

.color-preview {
    padding: 5px;
    vertical-align: bottom;
    display: inline-block;
    height: 6px;
    margin-top: 1px;
    border: 1px solid #000;
}
#all .color-preview {
    margin-top: -5px;
    margin-bottom: 4px !important;
}
.select2-selection--multiple .color-preview {
    height: 10px;
    box-sizing: border-box;
}
.narrow #all .color-preview {
    margin-top: 4px;
    margin-bottom: 0 !important;
}
.narrow .color-preview {
	height: 3px;
	vertical-align: top;
	position: relative;
	top:2px;
}
.narrow .select2-selection--multiple .color-preview {
    top:2px;
}

.narrow .select2-selection--multiple .select2-selection__choice .color-preview {
    top:4px;

}
.select2-container.contextCursor .select2-selection--single{
    cursor: context-menu !important;
}

.select2 > .selection > .select2-selection {
    transition: background-color linear 500ms;
}

.wide .select2-container--default .select2-results>.select2-results__options {
    max-height: 300px;
}

/* select2ToTree */
.s2-to-tree.select2-container .select2-results__option--highlighted[aria-selected] > span.item-label {
       background-color: #5897fb !important;
}
.s2-to-tree .expand-collapse {
    font-size: 1.3em;
    top: -3px;
    position: relative;
}
.select2-results__option.l2, .select2-results__option.l3, .select2-results__option.l4 {
    font-size: 1em !important;
}
.s2-to-tree  .select2-results__option--highlighted,  .s2-to-tree  .select2-results__option--highlighted:hover,.s2-to-tree  .expand-collapse{
    background: none !important;
}
.s2-to-tree .select2-results__option  span{
    padding: 0px ;
}
.s2-to-tree .select2-results__option  span.item-label{
    padding: 3px ;
}
@-moz-document url-prefix() {
	.narrow .color-preview {
		vertical-align: -2px;
	}
}