/* 号池下拉：自定义列表（名称后跟缩小状态条） */

.lite-select-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.lite-select-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-card2) 0%, var(--bg-page) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

[data-theme="light"] .lite-select-wrap {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  box-shadow:
    0 1px 2px rgba(31, 35, 40, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lite-select-wrap:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
}

.lite-select-wrap:focus-within,
.lite-pool-picker.is-open {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

/* 隐藏原生 select，仅作数据源 */
.lite-select--sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lite-pool-trigger {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 36px 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
}

.lite-pool-trigger-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 状态条紧挨「空闲/繁忙」：文字 + 竖条成一组 */
.lite-pool-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-page) 65%, transparent);
}

.lite-pool-status-label {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}

.lite-pool-open-cd {
  flex-shrink: 0;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-3, #8b949e);
  white-space: nowrap;
}

.lite-pool-open-cd .lite-open-num {
  color: #ef4444;
  font-weight: 700;
}

.lite-pool-remain {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.lite-pool-status .status-text { font-weight: 600; }
.lite-pool-status .status-text.idle { color: var(--green); }
.lite-pool-status .status-text.crowded { color: var(--yellow); }
.lite-pool-status .status-text.busy { color: var(--red); }

.lite-pool-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

[data-theme="light"] .lite-pool-chevron {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23656d76' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.lite-pool-picker.is-open .lite-pool-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.lite-pool-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card, #161b22);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .lite-pool-menu {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(31, 35, 40, 0.12);
}

.lite-pool-group-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.lite-pool-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lite-pool-item:hover,
.lite-pool-item.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.lite-pool-item-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 套餐名后的计费倍率（外模×0.1 / 国模每千万N积分） */
.lite-pool-item-name .lite-billing-tag,
.lite-pool-trigger-name .lite-billing-tag {
  color: #ef4444;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 福利组订阅模式 pill：颜色与后台 subscriptions.html 的 sub-plan-pill 统一 */
.lite-pool-item-name .lite-plan-pill,
.lite-pool-trigger-name .lite-plan-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
}
.lite-plan-pill--free { background: rgba(148,163,184,0.18); color: #94a3b8; }
.lite-plan-pill--pro { background: rgba(59,130,246,0.18); color: #60a5fa; }
.lite-plan-pill--ultra { background: rgba(245,158,11,0.2); color: #fbbf24; }
.lite-plan-pill--biz { background: rgba(139,92,246,0.18); color: #a78bfa; }
.lite-plan-pill--api { background: rgba(14,165,233,0.18); color: #38bdf8; }
.lite-plan-pill--other { background: rgba(16,185,129,0.15); color: #34d399; }
.lite-plan-pill--unknown { background: rgba(148,163,184,0.12); color: #94a3b8; }

.lite-pool-item-name .lite-welfare-free-tag,
.lite-pool-trigger-name .lite-welfare-free-tag {
  color: #ef4444;
  font-weight: 700;
  margin-left: 4px;
  white-space: nowrap;
}

.lite-pool-item .lite-pool-status {
  margin-left: 0;
  font-size: 11.5px;
}

/* 缩小版状态条：绿=可用，红=繁忙/满载 */
.psh-bars--mini {
  display: inline-flex;
  align-items: center;
  gap: 1.5px;
  width: 40px;
  height: 12px;
  flex-shrink: 0;
}

.psh-bars--mini .psh-bar {
  flex: 1 1 0;
  min-width: 2px;
  max-width: 3px;
  border-radius: 999px;
  display: block;
  height: 10px;
}

.psh-bars--mini .psh-bar.ok {
  background: #22c55e;
  box-shadow: 0 0 0 0.5px rgba(34, 197, 94, 0.25);
}

.psh-bars--mini .psh-bar.bad {
  background: #ef4444;
  box-shadow: 0 0 0 0.5px rgba(239, 68, 68, 0.25);
}

.lite-select-inline-status {
  display: none;
}
