/* 与现有表单一致的行业下拉：查询框、二十条候选项和独立分页。 */
.reference-picker {
  position: relative;
  min-width: 0;
  width: 100%;
}

.reference-picker select.reference-picker-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clip-path: inset(50%);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.app-shell .reference-picker > .reference-picker-trigger,
.public-application-form .reference-picker > .reference-picker-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: var(--ui-control-height, 36px);
  height: var(--ui-control-height, 36px);
  padding: 0 54px 0 11px;
  border: 1px solid #d5dce6;
  border-radius: 3px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: none;
  font: inherit;
  font-size: var(--ui-font-menu, 13px);
  cursor: pointer;
}

.reference-picker-trigger:focus-visible,
.reference-picker-trigger[aria-expanded="true"] {
  border-color: #4090ff !important;
  outline: 1px solid #4090ff;
  outline-offset: -1px;
}

.reference-picker-trigger[aria-invalid="true"] {
  border-color: #d94a48;
}

.reference-picker .reference-picker-trigger.is-empty {
  color: #8b97a9;
}

.reference-picker-caption {
  display: block;
  margin: 0 !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-picker-arrow {
  position: absolute;
  right: 13px;
  top: 13px;
  width: 7px;
  height: 7px;
  margin: 0 !important;
  border-right: 1px solid #718096;
  border-bottom: 1px solid #718096;
  transform: rotate(45deg);
}

.reference-picker-trigger[aria-expanded="true"] .reference-picker-arrow {
  top: 16px;
  transform: rotate(225deg);
}

.reference-picker > .reference-picker-clear {
  position: absolute;
  top: 5px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 26px;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: #8a96a8;
  background: #fff;
  border: 0;
  border-radius: 2px;
  font: inherit;
  cursor: pointer;
}

.reference-picker > .reference-picker-clear[hidden],
.reference-picker-popup[hidden] {
  display: none !important;
}

.reference-picker-popup {
  position: fixed;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  color: #40516a;
  background: #fff;
  border: 1px solid #d5dce6;
  border-radius: 3px;
  box-shadow: 0 3px 10px rgba(25, 45, 75, .12);
  font: 13px/1.5 var(--font, "Microsoft YaHei", sans-serif);
}

.reference-picker-search {
  position: relative;
  flex: 0 0 auto;
  padding: 8px;
}

.reference-picker-search::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 19px;
  width: 9px;
  height: 9px;
  border: 1px solid #8d9cb1;
  border-radius: 50%;
  pointer-events: none;
}

.reference-picker-search::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 27px;
  width: 5px;
  border-top: 1px solid #8d9cb1;
  transform: rotate(45deg);
  pointer-events: none;
}

.reference-picker-search input {
  width: 100%;
  min-height: 30px;
  height: 30px;
  margin: 0;
  padding: 4px 8px 4px 30px;
  color: inherit;
  background: #fff;
  border: 1px solid #d5dce6;
  border-radius: 2px;
  font: inherit;
}

.reference-picker-search input:focus {
  outline: 1px solid #4090ff;
  outline-offset: -1px;
  border-color: #4090ff;
  box-shadow: none;
}

.reference-picker-options {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.reference-picker-option {
  display: block;
  width: 100%;
  min-height: 30px;
  margin: 0;
  padding: 5px 12px;
  color: inherit;
  background: #fff;
  border: 0;
  border-radius: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.reference-picker-option:hover,
.reference-picker-option:focus-visible {
  color: #246ac1;
  background: #f0f5fd;
  outline: 0;
}

.reference-picker-option[aria-selected="true"] {
  color: #246ac1;
  background: #e8f0fc;
}

.reference-picker-message,
.reference-picker-retry {
  padding: 12px;
  color: #8b97a9;
  border: 0;
  background: #fff;
  font: inherit;
}

.reference-picker-retry {
  cursor: pointer;
}

.reference-picker-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 4px 8px;
  border-top: 1px solid #e9edf3;
  color: #8b97a9;
  background: #fafbfe;
}

.reference-picker-paging {
  display: flex;
  gap: 4px;
}

.reference-picker-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  min-height: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  color: #62758f;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: 2px;
  font: inherit;
  cursor: pointer;
}

.reference-picker-page:disabled {
  color: #c3cad5;
  cursor: default;
}
