/*! 
*  Multiple select dropdown with filter jQuery plugin.
*  Copyright (C) 2022  Andrew Wagner  github.com/andreww1011
*
*  This library is free software; you can redistribute it and/or
*  modify it under the terms of the GNU Lesser General Public
*  License as published by the Free Software Foundation; either
*  version 2.1 of the License, or (at your option) any later version.
* 
*  This library is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*  Lesser General Public License for more details.
* 
*  You should have received a copy of the GNU Lesser General Public
*  License along with this library; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
*  USA
*/
:root {
  --fms-badge-text-color: white;
  --fms-badge-color: var(--primary)
}

.filter-multi-select [hidden] {
  display: none!important;
}

.filter-multi-select.dropup, .filter-multi-select.dropdown {
  position: relative!important;
  min-height: 38px!important;
  border: 1px solid var(--thm-blue-5)!important;
  border-radius: 3px!important;
  color: #666!important;
  box-sizing: border-box!important;
  min-width: 150px!important;
  background-color: #fff!important;
}
.filter-multi-select .dropdown-toggle {
  padding: 3px 20px 3px 8px!important;
  background: url(/themes/jg/images/down-arrow.svg) no-repeat!important;
  background-position-x: 0%!important;
  background-position-y: 0%!important;
  background-size: auto!important;
  background-position: right 5px center!important;
  background-size: 10px 10px!important;
  background-color: #fff!important;
  min-height: 38px!important;
  box-sizing: border-box!important;
}

.filter-multi-select .dropdown-toggle::after {
  all: unset;
}

.filter-multi-select .dropdown-toggle:empty::after {
  all: unset;
}

.filter-multi-select > .dropdown-toggle:empty::before {
  margin-right: 0.255em;
}

.filter-multi-select > .dropdown-toggle .placeholder {
  padding: 5px 0;
  display: inline-block;
}

.filter-multi-select > .viewbar {
  white-space: normal!important;
  font-size: 0.875rem!important;
  font-weight: 400!important;
  height: auto!important;
  cursor: pointer!important;
  display: flex!important;
  border-radius: 3px!important;
}

.filter-multi-select > .viewbar > .selected-items {
  background-image: none!important;
}

.filter-multi-select > .viewbar > .selected-items > .item {
  background-color: var(--thm-grey)!important;
  border: 1px solid var(--thm-mid-grey)!important;
  border-radius: 3px!important;
  cursor: default!important;
  float: left!important;
  margin: 2px 5px 2px 0px!important;
  padding: 1px 5px!important;
  list-style: none!important;
  color: #000!important;
  background-image: none!important;
}

.filter-multi-select > .viewbar > .selected-items > .item > button {
  background-color: transparent!important;
  border: 0!important;
  font-weight: normal!important;
  cursor: pointer!important;
  float: left!important;
  font-size: 1.25rem!important;
  color: #999!important;
  line-height: 0.5!important;
  padding: 2px 3px 0 0!important;
  background-image: none!important;
}

.filter-multi-select > .viewbar > .selected-items > .item > button:hover {
  filter: contrast(50%)!important;
}

.filter-multi-select > .viewbar > .selected-items > .item.disabled {
  display: inline-flex!important;
  padding: 0px .5em 0px .5em!important;
  filter: grayscale(80%) brightness(150%)!important;
}

.filter-multi-select > .viewbar > .selected-items > .item.disabled > button {
  display: none!important;
}

.filter-multi-select > .dropdown-menu {
  position: absolute!important;
  top: 100%!important;
  left: 0%!important;
  z-index: 1000!important;
  display: none!important;
  float: left!important;
  max-height: 50vh!important;
  min-width: 10rem!important;
  overflow-y: auto!important;
  padding: 0.5rem 0!important;
  margin: 0.125rem 0 0!important;
  font-size: 0.875rem!important;
  text-align: left!important;
  list-style: none!important;
  background-color: #FFFFFF!important;
  background-clip: padding-box!important;
  border: 1px solid rgba(0, 0, 0, 0.15)!important;
  border-radius: 3px!important;
}

.filter-multi-select > .dropdown-menu.show {
  display: block!important;
}

.filter-multi-select > .dropdown-menu > .filter > input {
  font-size: 0.875rem!important;
  height: 30px!important;
  width: 100%!important;
  opacity: 1!important;
  position: relative!important;
  box-sizing: border-box!important;
  border: 1px solid var(--thm-blue-5)!important;
  border-radius: 3px!important;
  padding: 5px 10px!important;
  height: 40px!important;
  box-sizing: border-box!important;
  background-color: var(--thm-white)!important;
}

.filter-multi-select > .dropdown-menu > .filter > button {
  position: absolute!important;
  border: 0!important;
  background-color: transparent!important;
  font-weight: normal!important;
  color: #ccc!important;
  right: 30px!important;
  top: 7px!important;
  font-size: 2rem!important;
}

.filter-multi-select > .dropdown-menu > .filter > button:hover {
  color: #aaa!important;
}

.filter-multi-select .dropdown-item {
  display: block;
  width: 100%!important;
  padding: 0px 20px 5px 20px!important;
  clear: both!important;
  font-weight: 400!important;
  color: #000!important;
  text-align: inherit!important;
  white-space: nowrap!important;
  background-color: transparent!important;
  border: 0!important;
  box-sizing: border-box!important;
  line-height: 1!important;
}

.filter-multi-select .dropdown-item.disabled, .filter-multi-select .dropdown-item:disabled {
  color: #6c757d!important;
  pointer-events: none!important;
  background-color: transparent!important;
}

.filter-multi-select .dropdown-item:hover, .filter-multi-select .dropdown-item:focus  {
  background-color: inherit!important;
}

.filter-multi-select .dropdown-item.active, .filter-multi-select .dropdown-item:active {
  color: inherit!important;
}

.filter-multi-select .dropdown-item .custom-control-input {
  position: absolute!important;
  z-index: -1!important;
  opacity: 0!important;
}

.filter-multi-select .dropdown-item .custom-control-label {
  position: relative!important;
  margin-bottom: 0!important;
  vertical-align: top!important;
  display: inline-block!important;
  font-weight: normal!important;
  padding-top: 4px!important;
}

.filter-multi-select .dropdown-item .custom-control-label::before {
  border-radius: 3px!important;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out!important;
  position: absolute!important;
  top: 0.15625rem!important;
  left: -1.5rem!important;
  display: block!important;
  width: 1rem!important;
  height: 1rem!important;
  pointer-events: none!important;
  content: ""!important;
  background-color: #FFFFFF!important;
  border: #adb5bd solid 1px!important;
}

.filter-multi-select .dropdown-item .custom-control-label::after {
  position: absolute!important;
  top: 0.15625rem!important;
  left: -1.5rem!important;
  display: block!important;
  width: 1rem!important;
  height: 1rem!important;
  content: ""!important;
  background: no-repeat 50% / 50% 50%!important;
}

.filter-multi-select .dropdown-item .custom-checkbox:checked ~ .custom-control-label::before,
.filter-multi-select .dropdown-item .custom-checkbox:indeterminate ~ .custom-control-label::before {
  border-color: #666!important;
  background-color: #167D86!important;
}

.filter-multi-select .dropdown-item .custom-checkbox:checked:disabled ~ .custom-control-label::before,
.filter-multi-select .dropdown-item .custom-checkbox:indeterminate:disabled ~ .custom-control-label::before {
  border-color: #666!important;
  background-color: #fff!important;
  filter: grayscale(80%) brightness(150%)!important;
}

.filter-multi-select .dropdown-item .custom-checkbox:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23FFFFFF' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e")!important;
  background-size: 12px!important;
  background-position: 3px 3px!important;
}

.filter-multi-select .dropdown-item .custom-checkbox:indeterminate ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23FFFFFF' d='M0 2h4'/%3e%3c/svg%3e")!important;
  background-size: 12px!important;
  background-position: 3px 3px!important;
}