/* ==========================================================================
 * custom_select2.less — Select2 下拉选择框自定义样式
 *
 * 目录:
 *   1.  初始化 & 多选模式      (.select2-basic-multiple, .select2 全局覆盖, .select2-container 多选)
 *   2.  默认主题               (.select2-container--default: 单选、多选、下拉图标、hover/选中)
 *   3.  Classic 主题           (.select2-container--classic: 宽度、下拉列表)
 *   4.  全局覆盖               (选项标签、清除按钮、删除按钮、分组头)
 *   5.  下拉面板               (dropdown-below/above: 圆角阴影、搜索框)
 *   6.  禁用 & 结果列表         (disabled 背景、.select2-results 首项/滚动条)
 * ========================================================================== */
/* ========== 1. 初始化 & 多选模式 ========== */
.select2-basic-multiple {
  opacity: 0;
}
.select2 {
  width: 100% !important;
  min-width: auto !important;
}
.select2-selection {
  border-radius: 4px !important;
}
.select2-search__field {
  outline: none;
}
/*select框*/
.select2-container {
  /*取消下拉框的自带高度*/
}
.select2-container .select2-selection--multiple {
  height: auto;
}
.select2-container .select2-selection--multiple .select2-selection__rendered {
  display: block;
  padding: 5px;
  padding-right: 14px;
}
.select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline {
  margin-top: 0;
  height: 16px;
  width: 100%;
  text-align: left;
}
.select2-container .select2-selection--multiple .select2-selection__rendered .select2-search--inline .select2-search__field {
  height: 16px;
  padding-bottom: 0;
}
.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
  margin: 0 3px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select2-container .select2-search--inline .select2-search__field {
  margin-bottom: 0 !important;
  min-width: 103px !important;
  margin-top: 0;
  vertical-align: text-top;
  padding-left: 5px;
  padding-bottom: 2px;
}
.select2-container .select2-dropdown .select2-search .select2-search__field {
  outline: aliceblue;
  border-radius: 4px;
}
.select2-container .select2-dropdown .select2-search .select2-search__field:focus {
  border-color: #5897fb;
}
/* ========== 2. 默认主题 ========== */
.select2-container--default {
  /*背景颜色和字体颜色*/
  /*hover*/
  /*点击选择后的样式*/
}
.select2-container--default .select2-selection--single {
  border: 1px solid #d5d5d5;
  outline: none;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-width: 0 !important;
  width: 10px;
  height: 6px;
  position: absolute;
  left: 50%;
  top: 50%;
  background: url("../images/select2downIcon.png") no-repeat;
  background-size: 100%;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 26px !important;
  line-height: 26px !important;
  color: #646464 !important;
  padding-right: 36px;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
  font-size: 14px;
  font-family: var(--font-family-base) !important;
  position: absolute;
  right: 22px;
}
.select2-container--default .select2-selection--single .select2-search__field {
  width: 100%;
  height: 100%;
  border: 0;
  padding-left: 8px;
  border-radius: 4px;
  color: #646464;
}
.select2-container--default .select2-selection--single .select2-search__field::placeholder {
  color: #999;
}
.select2-container--default .select2-selection--multiple {
  border: 1px solid #d5d5d5;
  min-height: 28px;
}
.select2-container--default .select2-dropdown {
  border-radius: 0;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #f0f0f0;
  color: #707070;
}
.select2-container--default .select2-results__option[aria-required=true],
.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #e1e9fc;
  color: #707070;
  font-weight: 700;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #5897fb;
}
.select2-container--default.select2-container--open {
  z-index: 9999;
}
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: #5897fb !important;
  border-width: 1px 1px 1px 1px;
}
/* ========== 3. Classic 主题 ========== */
.select2-container--classic {
  /*!*下拉菜单列表*!*/
}
.select2-container--classic .select2-selection--multiple {
  /*border-radius: 0 !important;*/
  width: 240px !important;
  min-width: 240px;
  border: 1px solid #eeeeee;
  min-height: 32px;
}
.select2-container--classic .select2-dropdown--below {
  min-width: 240px;
}
/* ========== 4. 全局覆盖 ========== */
/*图标*/
.input-group-addon {
  border: 0 !important;
  background-color: #ffffff !important;
  position: absolute;
  z-index: 5;
  padding: 0;
  top: 10px;
  right: 15px;
}
/*选中标签*/
.select2-selection__choice {
  border: 0 !important;
  background-color: #e1e9fc !important;
  margin-top: 5px;
  /*padding: 0 !important;*/
  height: 24px;
  line-height: 24px;
  color: var(--color-primary);
}
.select2-selection__choice__remove {
  color: var(--color-primary) !important;
  font-size: 11px;
}
/*清除按钮*/
.select2-selection__clear {
  font-size: 14px;
  position: absolute;
  right: 0;
  top: 1px;
}
.select2-container--disabled .select2-selection__clear {
  display: none;
}
/*组头选项*/
.select2-results_group {
  font-weight: 700 !important;
  padding-left: 3px;
}
/* ========== 5. 下拉面板 ========== */
.select2-dropdown--below {
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
}
.select2-dropdown--above {
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);
}
.select2-search.select2-search--dropdown {
  border-bottom: 1px solid #eeeeee;
  padding: 0 !important;
  border-radius: 4px;
}
.select2-search.select2-search--dropdown .select2-search__field {
  border: 0;
  background-color: #f5f5f5;
  border-radius: 4px !important;
}
/* ========== 6. 禁用 & 滚动条 ========== */
.select2-container--default.select2-container--disabled .select2-selection--multiple,
.select2-container--default.select2-container--disabled .select2-selection--single {
  background-color: #f8f8f8;
}
/*select2下拉框的第一项"请选择"样式*/
.select2-results {
  /* 滚动条样式 */
}
.select2-results .defaultSelect2 {
  color: #999 !important;
  background-color: #f8f8f8;
}
.select2-results .loading-results {
  display: none;
}
.select2-results__options {
  /* 滚动槽 */
  /* 滚动条滑块 */
}
.select2-results__options::-webkit-scrollbar {
  width: 4px !important;
}
.select2-results__options::-webkit-scrollbar-track {
  border-radius: 10px !important;
  width: 4px !important;
  background-color: #f1f1f1;
}
.select2-results__options::-webkit-scrollbar-thumb {
  border-radius: 10px !important;
  width: 4px !important;
  background-color: #c1c1c1 !important;
}
