/*! 
*  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;
  min-height: 38px;
  border: 1px solid #999;
  color: #666;
  margin-top: 4px;
  box-sizing: border-box;
  min-width: 150px!important;
  background-color: #fff;
}
.filter-multi-select .dropdown-toggle {
  padding: 3px 20px 3px 8px;
  background: url(/themes/lift8/images/icons/down-arrow.svg) no-repeat;
  background-position-x: 0%;
  background-position-y: 0%;
  background-size: auto;
  background-position: right 5px center;
  background-size: 10px 10px;
  background-color: #fff;
  min-height: 36px;
  box-sizing: border-box;
}

.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;
  font-size: 0.875rem;
  font-weight: 400;
  height: auto;
  cursor: pointer;
}

.filter-multi-select > .viewbar > .selected-items > .item {
  background-color: #f0f3f5;
  border: 1px solid #aaa;
  border-radius: 4px;
  cursor: default;
  float: left;
  margin: 2px 5px 2px 0px;
  padding: 3px 5px;
  list-style: none;
  color: #000;
}

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

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

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

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

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

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

.filter-multi-select > .dropdown-menu > .filter > input {
  font-size: 0.875rem;
  height: 30px!important;
  width: 100%!important;
  opacity: 1!important;
  position: relative!important;
  box-sizing: border-box;
  border-color: #999;
}

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

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

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

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

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

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

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

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

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

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

.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;
  background-color: #167D86;
}

.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;
  background-color: #fff;
  filter: grayscale(80%) brightness(150%);
}

.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");
  background-size: 12px;
  background-position: 3px 3px;
}

.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");
  background-size: 12px;
  background-position: 3px 3px;
}