/* 可搜索下拉框（配合 searchable-select.js 使用） */
.ss-wrap {
  position: relative;
  width: 100%;
}

/* 原生 select 仅用于表单提交与校验，视觉上隐藏 */
.ss-wrap > select.ss-native {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* 触发按钮复用原 select 的样式类，这里只补充必要的布局属性 */
.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
}

.ss-trigger .ss-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-trigger .ss-value.ss-placeholder {
  color: #8b8b95;
}

.ss-trigger .ss-chevron {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  opacity: 0.7;
}

.ss-trigger:disabled {
  cursor: not-allowed;
}

.ss-panel {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 100%;
  background: #111415;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.ss-panel--up {
  top: auto;
  bottom: calc(100% + 4px);
}

.ss-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.9rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e2e4;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
}

.ss-search::placeholder {
  color: #8b8b95;
}

.ss-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  max-height: 260px;
  overflow-y: auto;
}

.ss-option {
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
  color: #e2e2e4;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-option:hover,
.ss-option.ss-active {
  background: rgba(118, 18, 250, 0.18);
}

.ss-option.ss-selected {
  color: #cbbeff;
}

.ss-option.ss-option--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ss-option.is-hidden {
  display: none;
}

.ss-empty {
  display: none;
  padding: 0.9rem;
  color: #8b8b95;
  font-size: 0.875rem;
}

.ss-empty.is-visible {
  display: block;
}

.ss-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #ff6b6b;
}

.ss-error.is-visible {
  display: block;
}

.ss-wrap.ss-invalid .ss-trigger {
  border-color: #ff6b6b !important;
}
