/**
 * 可搜索下拉选择组件样式（与购票登记渠道选择一致）
 * 布局约定：按库内实际长度截断展示（渠道简称/昵称约 ≤5 字，导游别名约 ≤7 字），
 * 避免手机端输入框与下拉选项意外撑破容器。
 */
.search-select {
  position: relative;
  min-width: 0;
}

.search-select-input {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}

.search-select-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  max-height: 240px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1200;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  /* 防止页面覆盖 width:max-content 时贴右出屏 */
  max-width: min(280px, calc(100vw - 24px));
  box-sizing: border-box;
}

.search-select-dropdown.show {
  display: block;
}

.search-select-option {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f3f3;
  overflow: hidden;
}

.search-select-option:last-child {
  border-bottom: none;
}

.search-select-option:hover,
.search-select-option.active {
  background: #f5f7ff;
}

.search-select-option > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-option small {
  display: block;
  color: #888;
  margin-top: 2px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select-option.is-empty {
  color: #666;
}

.search-select.size-sm .search-select-input {
  padding: 6px 8px;
  font-size: 12px;
}

.search-select.size-sm .search-select-option {
  padding: 8px 10px;
  font-size: 12px;
}

.search-select.size-sm .search-select-dropdown {
  max-height: 200px;
}
