/**
 * 钱包连接弹窗样式
 *
 * 与 mobile/ 现有暗色主题一致（背景 #111827 / 卡片 #1f2937）。
 */

.wallet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(2px);
}

.wallet-overlay[hidden] {
    display: none;
}

.wallet-panel {
    position: relative;
    width: min(100%, 400px);
    max-height: min(86vh, 640px);
    overflow-y: auto;
    padding: 24px 20px 20px;
    border-radius: 14px;
    background: #1f2937;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    color: #f9fafb;
}

.wallet-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.wallet-modal-close:hover {
    background: #374151;
    color: #f9fafb;
}

.wallet-modal-title {
    margin: 0 32px 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.wallet-modal-subtitle {
    margin: 0 0 18px;
    color: #9ca3af;
    font-size: 13px;
}

.wallet-modal-body {
    min-height: 56px;
}

.wallet-modal-error {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    font-size: 13px;
    line-height: 1.5;
}

.wallet-modal-error[hidden] {
    display: none;
}

/* ---- 链选择 ---- */
.wallet-chain-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-chain {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #374151;
    border-radius: 10px;
    background: #151923;
    color: #f9fafb;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.wallet-chain:hover {
    border-color: #eab308;
    background: #1f2937;
}

.wallet-chain:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 2px;
}

.wallet-chain-icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 8px;
    background: #374151;
    color: #eab308;
    font-size: 14px;
}

/* ---- 钱包列表 ---- */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #374151;
    border-radius: 10px;
    background: #151923;
    color: #f9fafb;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.wallet-item:hover {
    border-color: #eab308;
    background: #1f2937;
}

.wallet-item:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 2px;
}

.wallet-item-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 7px;
    object-fit: contain;
}

.wallet-item-icon-fallback {
    display: grid;
    place-items: center;
    background: #374151;
    color: #eab308;
    font-size: 13px;
}

.wallet-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- 空状态 ---- */
.wallet-empty {
    padding: 18px 4px;
    text-align: center;
}

.wallet-empty-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 500;
}

.wallet-empty-hint {
    margin: 0;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.6;
}

/* ---- 状态提示 ---- */
.wallet-status {
    padding: 20px 4px;
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
}

.wallet-status-ok {
    color: #22c55e;
}

/* ---- 底部按钮 ---- */
.wallet-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wallet-btn {
    flex: 1;
    padding: 11px 16px;
    border: 0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-btn[hidden] {
    display: none;
}

.wallet-btn:focus-visible {
    outline: 2px solid #eab308;
    outline-offset: 2px;
}

.wallet-btn-ghost {
    background: #374151;
    color: #e5e7eb;
}

.wallet-btn-ghost:hover {
    background: #4b5563;
}

.wallet-btn-primary {
    background: #eab308;
    color: #111827;
}

.wallet-btn-primary:hover {
    background: #facc15;
}
