/* ===== 全局自适应修复 ===== */

/* Vant 数字键盘 - 强制固定在底部 */
.van-number-keyboard {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    z-index: 100000 !important;
    transform: none !important;
    padding-bottom: constant(safe-area-inset-bottom) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
}

/* 提现页面主容器 - 允许内容溢出显示键盘 */
.withdraw-new {
    overflow: visible !important;
    overflow-y: auto !important;
}

/* 页面内容区可滚动 */
.withdraw-new .page-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* 申请提现 tab 可滚动 */
.withdraw-new .tab-apply {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* ===== 固定宽度改为自适应 ===== */

/* 账户选择器 */
.account-selector {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 金额输入框 */
.amount-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 金额分隔线 */
.amount-divider {
    width: 100% !important;
    max-width: 100% !important;
}

/* 密码框容器 */
.pwd-boxes {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 单个密码框 - 弹性自适应 */
.pwd-box {
    width: auto !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 68px !important;
    height: 50px !important;
}

/* 操作按钮自适应 */
.action-buttons {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.action-buttons .btn-interest,
.action-buttons .btn-submit {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
}

/* ===== 收款账户页自适应 ===== */
.bound-card {
    width: calc(100% - 30px) !important;
    max-width: 407px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.bound-account-item {
    width: calc(100% - 24px) !important;
    max-width: 384px !important;
}
.account-option-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== 弹窗内密码输入自适应 ===== */
.pwd-popup-content {
    width: 100% !important;
    box-sizing: border-box !important;
}
.pwd-popup-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Vant 密码输入组件 */
.van-password-input {
    width: 100% !important;
    margin: 0 !important;
}
.van-password-input__security {
    width: 100% !important;
}

/* ===== 下拉菜单自适应 ===== */
.dropdown-item.add-item {
    width: calc(100% - 30px) !important;
    max-width: 337px !important;
}

/* ===== 安全区域 ===== */
.withdraw-new {
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 确保 #app 不裁切键盘 */
#app {
    overflow: visible !important;
}

/* ===== USDT 存款 ¥→U 替换（纯CSS，使用 :has() 检测USDT模式）===== */

/* === 存款弹窗：当选中 USDT 支付方式时，输入框前缀 ¥ 变成 U === */
.deposit-popup:has(.pay-method-item.active .method-icon.usdt) .input-prefix {
    font-size: 0 !important;
    color: transparent !important;
}
.deposit-popup:has(.pay-method-item.active .method-icon.usdt) .input-prefix::before {
    content: "U";
    font-size: 18px;
    color: #26a17b;
    font-weight: 700;
    font-style: normal;
}

/* === 确认页：当有链选择器（TRC20/ERC20）时，¥ 变成 U === */
.pay-info-popup:has(.chain-selector) .pay-amount-value .currency {
    font-size: 0 !important;
    color: transparent !important;
}
.pay-info-popup:has(.chain-selector) .pay-amount-value .currency::before {
    content: "U";
    font-size: 20px;
    color: #26a17b;
    font-weight: 700;
}

/* 确认页 USDT 金额数字颜色 */
.pay-info-popup:has(.chain-selector) .pay-amount-value .num {
    color: #26a17b;
}

/* === USDT 汇率提示条样式 === */
.usdt-rate-tip {
    padding: 8px 15px 0;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.usdt-rate-tip .rate-label {
    color: #26a17b;
    font-weight: 600;
}
.usdt-rate-tip .rate-convert {
    color: #f5222d;
    font-weight: 600;
}
