/* ============================================
   Bridge Pool Panel — 轮询池负载均衡
   ============================================ */


/* ---- 摘要状态（在卡片标题上方） ---- */
.bridge-pool-summary {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.bridge-pool-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: var(--color-brand-light);
    color: var(--color-brand-dark);
    flex-shrink: 0;
}

.bridge-pool-summary-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: -0.01em;
}

/* ---- 轮询池触发按钮 ---- */
.bridge-pool-trigger {
    color: var(--color-brand);
    background: rgba(200, 121, 99, 0.08);
}

.bridge-pool-trigger:hover {
    background: rgba(200, 121, 99, 0.16);
}

.bridge-pool-panel {
    margin-top: 18px;
    padding: 18px 20px 16px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(216, 201, 184, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 253, 252, 0.9) 100%);
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-normal) var(--ease-smooth);
}

.bridge-pool-panel:hover {
    box-shadow: var(--shadow-card-hover);
}

/* ---- Header row ---- */
.bridge-pool-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-soft);
}

.bridge-pool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--color-brand-light);
    color: var(--color-brand-dark);
    flex-shrink: 0;
}

.bridge-pool-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.bridge-pool-hint {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-left: auto;
}

/* ---- Empty state ---- */
.bridge-pool-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: var(--radius-md);
    background: rgba(247, 240, 233, 0.5);
    border: 1px dashed var(--color-border);
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.bridge-pool-empty svg {
    flex-shrink: 0;
    opacity: 0.55;
}

/* ---- List ---- */
.bridge-pool-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* ---- Item row ---- */
.bridge-pool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast) var(--ease-smooth),
                box-shadow var(--transition-fast) var(--ease-smooth);
}

.bridge-pool-item:hover {
    background: rgba(200, 121, 99, 0.06);
}

.bridge-pool-item:active {
    background: rgba(200, 121, 99, 0.1);
}

.bridge-pool-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bridge-pool-item-status {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(137, 111, 94, 0.08);
    transition: all var(--transition-fast) var(--ease-smooth);
    flex-shrink: 0;
}

.bridge-pool-item-status.active {
    color: var(--color-brand-dark);
    background: var(--color-brand-light);
}

/* ---- Custom toggle switch ---- */
.bridge-pool-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 38px;
    height: 21px;
    border-radius: 11px;
    background: rgba(137, 111, 94, 0.22);
    border: 1px solid rgba(137, 111, 94, 0.16);
    cursor: pointer;
    position: relative;
    transition: background var(--transition-fast) var(--ease-smooth),
                border-color var(--transition-fast) var(--ease-smooth);
    flex-shrink: 0;
    margin: 0;
}

.bridge-pool-item input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast) var(--ease-spring);
}

.bridge-pool-item input[type="checkbox"]:checked {
    background: var(--color-brand);
    border-color: var(--color-brand);
}

.bridge-pool-item input[type="checkbox"]:checked::after {
    transform: translateX(17px);
}

.bridge-pool-item input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* ---- Mobile ---- */
@media (max-width: 860px) {
    .bridge-pool-panel {
        padding: 14px 16px 12px;
    }

    .bridge-pool-header {
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .bridge-pool-hint {
        margin-left: 0;
        width: 100%;
    }

    .bridge-pool-item {
        padding: 10px 12px 10px 14px;
    }
}

/* ---- 模态框中的轮询池 ---- */
.modal-bridge-pool {
    max-width: 380px;
}

.modal-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--color-brand-light);
    color: var(--color-brand-dark);
    margin-right: 8px;
    vertical-align: middle;
}

.bridge-pool-modal-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-soft);
}

.modal-bridge-pool .bridge-pool-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 16px;
}
