/* ============================================================
   测试支付页样式（自包含，无外部依赖）
   ============================================================ */
:root {
  --tp-primary: #09bb07;
  --tp-primary-600: #06a005;
  --tp-primary-bg: #eaf9ea;
  --tp-text: #1f2430;
  --tp-text-2: #4b5563;
  --tp-text-3: #6b7280;
  --tp-text-4: #9aa3b2;
  --tp-bg: #eef1f8;
  --tp-card: #ffffff;
  --tp-line: #eceef3;
  --tp-line-2: #f4f6fa;
  --tp-grey: #f6f8fc;
  --tp-danger: #e5484d;
  --tp-danger-bg: #fdecec;
  --tp-warn: #e8833a;
  --tp-warn-bg: #fdf3e9;
  --tp-radius: 14px;
  --tp-shadow: 0 10px 30px rgba(31, 56, 120, .09);
  --tp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --tp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--tp-bg);
  background-image: radial-gradient(1200px 500px at 50% -160px, #e2ecff 0%, rgba(238, 241, 248, 0) 62%);
  color: var(--tp-text);
  font-family: var(--tp-font);
  font-size: 14.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding: 22px 16px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
a { color: var(--tp-primary-600); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--tp-mono); font-size: .92em; background: var(--tp-grey); border-radius: 4px; padding: 1px 5px; }

.tp-wrap { width: 100%; max-width: 560px; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.tp-card {
  background: var(--tp-card);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  overflow: hidden;
}
.tp-head {
  display: flex; align-items: center; gap: 11px; padding: 17px 20px;
  border-bottom: 1px solid var(--tp-line);
}
.tp-logo {
  width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--tp-primary), #34d058);
}
.tp-logo svg { width: 19px; height: 19px; fill: #fff; }
.tp-head-text { min-width: 0; flex: 1; }
.tp-head-text b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.tp-head-text em { font-style: normal; font-size: 11.5px; color: var(--tp-text-4); }
.tp-back { flex: none; font-size: 13px; color: var(--tp-text-3); }
.tp-back:hover { color: var(--tp-primary-600); }

.tp-body { padding: 20px; }

/* ---------- 表单 ---------- */
.tp-field { margin-bottom: 16px; }
.tp-field > label { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--tp-text-3); margin-bottom: 7px; }
.tp-field > label b { font-weight: 600; color: var(--tp-text-2); font-size: 12.5px; }
/* 注：label 右侧的 .tip 小字已按需求全部去掉，样式保留以便后续要加回时直接用 */

.tp-input { display: flex; align-items: stretch; border: 1px solid var(--tp-line); border-radius: 10px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tp-input:focus-within { border-color: var(--tp-primary); box-shadow: 0 0 0 3px var(--tp-primary-bg); }
.tp-input .prefix { flex: none; width: 42px; display: grid; place-items: center; background: var(--tp-grey); color: var(--tp-text-3); font-size: 15px; border-right: 1px solid var(--tp-line); }
.tp-input input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  padding: 11px 13px; font-size: 16px; font-family: inherit; color: var(--tp-text);   /* 16px 避免 iOS 聚焦缩放 */
}
.tp-input input::placeholder { color: var(--tp-text-4); font-size: 14px; }
.tp-input input:disabled { color: var(--tp-text-3); background: #fbfcfe; }
.tp-input .suffix { flex: none; display: grid; place-items: center; padding: 0 12px; font-size: 13px; color: var(--tp-text-3); cursor: pointer; border-left: 1px solid var(--tp-line); background: var(--tp-grey); }
.tp-input .suffix:hover { color: var(--tp-primary-600); }
.tp-input.plain input { padding-left: 13px; }
.tp-money input { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
/* 付款金额由后台设定，前台只读展示 */
.tp-money input[readonly] { cursor: default; color: var(--tp-primary-600); }
/* 只读的普通输入框（商品名称由平台设定，不允许商户改动） */
.tp-input.plain input[readonly] { background: var(--tp-grey); color: var(--tp-text-2); cursor: default; }
.tp-input:has(input[readonly]):focus-within { border-color: var(--tp-line); box-shadow: none; }

/* ---------- 支付方式 ---------- */
.tp-pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tp-pay {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 13px 6px; border: 1.5px solid var(--tp-line); border-radius: 11px; background: #fff;
  cursor: pointer; transition: all .14s; text-align: center; min-height: 74px;
}
.tp-pay img { height: 24px; width: auto; max-width: 100%; }
.tp-pay span { font-size: 12.5px; color: var(--tp-text-2); line-height: 1.3; }
.tp-pay:hover { border-color: #cfe6d0; background: #fbfffb; }
.tp-pay.on { border-color: var(--tp-primary); background: var(--tp-primary-bg); box-shadow: 0 0 0 3px rgba(9, 187, 7, .1); }
.tp-pay.on span { color: var(--tp-primary-600); font-weight: 600; }
.tp-pays.loading { opacity: .5; pointer-events: none; }

/* ---------- 验证码 ---------- */
.tp-captcha { display: flex; gap: 9px; }
.tp-captcha .tp-input { flex: 1; }
.tp-captcha img {
  flex: none; width: 132px; height: 44px; border: 1px solid var(--tp-line); border-radius: 10px;
  cursor: pointer; background: var(--tp-grey); object-fit: cover;
}

/* ---------- 提交 ---------- */
.tp-submit {
  width: 100%; height: 48px; margin-top: 6px; border: none; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 15.5px; font-weight: 600; color: #fff; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--tp-primary-600), var(--tp-primary));
  box-shadow: 0 6px 16px rgba(9, 187, 7, .26); transition: transform .1s, box-shadow .15s, opacity .15s;
}
.tp-submit:hover { box-shadow: 0 8px 22px rgba(9, 187, 7, .34); }
.tp-submit:active { transform: translateY(1px); }
.tp-submit:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.tp-foot-hint { text-align: center; font-size: 12px; color: var(--tp-text-4); margin-top: 12px; line-height: 1.7; }

/* ---------- 状态块 ---------- */
.tp-block { padding: 20px; text-align: center; }
.tp-block svg { width: 40px; height: 40px; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.tp-block .bt { font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.tp-block .bd { font-size: 13px; color: var(--tp-text-3); line-height: 1.8; }
.tp-block.warn svg { stroke: var(--tp-warn); }
.tp-block.err svg { stroke: var(--tp-danger); }
.tp-block.ok svg { stroke: var(--tp-primary); }
.tp-block .tp-btn { display: inline-block; margin-top: 14px; padding: 8px 18px; border-radius: 9px; background: var(--tp-primary); color: #fff; font-size: 13.5px; font-weight: 600; }
.tp-block .tp-btn:hover { text-decoration: none; opacity: .92; }

.tp-alert { display: none; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 11px; font-size: 13px; margin-bottom: 16px; line-height: 1.7; }
.tp-alert.show { display: flex; }
.tp-alert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tp-alert.err { background: var(--tp-danger-bg); color: #b3261e; }
.tp-alert.ok { background: var(--tp-primary-bg); color: #1c7a4f; }
.tp-alert.warn { background: var(--tp-warn-bg); color: #a4631f; }

/* ---------- 加载 / 遮罩 ---------- */
.tp-skeleton { padding: 24px 20px; text-align: center; color: var(--tp-text-4); font-size: 13px; }
.tp-dots { display: inline-flex; gap: 5px; margin-bottom: 10px; }
.tp-dots i { width: 7px; height: 7px; border-radius: 50%; background: #c8d2e4; animation: tpDot 1.1s infinite ease-in-out; }
.tp-dots i:nth-child(2) { animation-delay: .16s; }
.tp-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes tpDot { 0%, 80%, 100% { opacity: .28; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.tp-mask { position: fixed; inset: 0; z-index: 90; background: rgba(16, 24, 42, .42); display: none; place-items: center; backdrop-filter: blur(2px); }
.tp-mask.show { display: grid; }
.tp-mask-box { background: #fff; border-radius: 13px; padding: 20px 24px; font-size: 13.5px; color: var(--tp-text-2); display: flex; flex-direction: column; align-items: center; gap: 9px; box-shadow: var(--tp-shadow); }

/* ---------- 页脚 ---------- */
.tp-page-foot { text-align: center; font-size: 12px; color: var(--tp-text-4); margin-top: 20px; line-height: 1.9; }
.tp-page-foot a { color: var(--tp-text-3); }

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  body { padding: 14px 12px 34px; }
  .tp-body { padding: 16px; }
  .tp-head { padding: 14px 16px; }
  .tp-pays { grid-template-columns: repeat(2, 1fr); }
  .tp-money input { font-size: 20px; }
}
@media (max-width: 340px) {
  .tp-pays { grid-template-columns: 1fr; }
  .tp-captcha { flex-direction: column; }
  .tp-captcha img { width: 100%; }
}
