/**
 * Bootstrap Dropdown Select
 * 使用Bootstrap Dropdown组件模拟select元素的样式
 */

/* 下拉选择器容器 */
.bs-dropdown-select {
  position: relative;
  width: 100%;
}

/* 下拉按钮样式 */
.bs-dropdown-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  text-align: left;


  height: 2.5rem !important;
  border-radius: 0.31rem;
  border: 0.06rem solid #DCDFE6;
}

/* 下拉按钮:hover状态 */
.bs-dropdown-select-btn:hover {
  border-color: #b3b3b3;
}

/* 下拉按钮:focus状态 */
.bs-dropdown-select-btn:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 下拉菜单样式 */
.bs-dropdown-select-menu {
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.5rem 0;
  border-color: #ced4da;
  box-shadow: 0rem 0rem 0.63rem 0rem rgba(11, 88, 42, 0.1);
  border-radius: 2px;
  font-size: 0.88rem;
  /* Firefox滚动条样式 - 细滚动条 */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) #fff;
}

/* Webkit浏览器自定义滚动条样式 */
.bs-dropdown-select-menu::-webkit-scrollbar {
  width: 3px;
  background-color: #fff;
}

.bs-dropdown-select-menu::-webkit-scrollbar-track {
  background-color: #fff;
  border-radius: 10px;
}

.bs-dropdown-select-menu::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

/* 悬停时稍微加深颜色 */
.bs-dropdown-select-menu::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* 下拉选项样式 */
.bs-dropdown-select-menu .dropdown-item {
  padding: 0.375rem 0.75rem;
  color: #AAA;
  cursor: pointer;
}

/* 下拉选项:hover状态 */
.bs-dropdown-select-menu .dropdown-item:hover {
  background-color: #f8f9fa;
}

/* 下拉选项:active状态 */
.bs-dropdown-select-menu .dropdown-item:active,
.bs-dropdown-select-menu .dropdown-item.active {
  color: #198754;
  background-color: #f8f9fa;
}

/* 占位符文本样式 */
.bs-dropdown-select-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #AAA;
}

/* 当有值被选中时的文本样式 */
.bs-dropdown-select.has-value .bs-dropdown-select-text {
  color: #212529;
}

/* 表单验证样式 */
.was-validated .bs-dropdown-select.is-invalid .bs-dropdown-select-btn,
.bs-dropdown-select.is-invalid .bs-dropdown-select-btn {
  border-color: #dc3545;
}

.was-validated .bs-dropdown-select.is-invalid .bs-dropdown-select-btn:focus,
.bs-dropdown-select.is-invalid .bs-dropdown-select-btn:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.was-validated .bs-dropdown-select.is-valid .bs-dropdown-select-btn,
.bs-dropdown-select.is-valid .bs-dropdown-select-btn {
  border-color: #198754;
}

.was-validated .bs-dropdown-select.is-valid .bs-dropdown-select-btn:focus,
.bs-dropdown-select.is-valid .bs-dropdown-select-btn:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* 隐藏原生select元素 */
select.d-none {
  display: none !important;
}