/* TQ-PAY 同款视觉（cf-tq） */
*,::after,::before{box-sizing:border-box;margin:0;padding:0}
:root{
  --brand-blue:#2367d8;
  --brand-blue-dark:#174fb5;
  --brand-red:#ff3b5c;
  --ink:#1a1d29;
  --muted:#94a3b8;
  --muted-dark:#6b7280;
  --line:#eef0f5;
  --panel:#f6f8fb;
  --orange:#f5a623;
  --orange-dark:#c47b09;
}
body,html{height:100%}
body.tq-body{
  font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans Myanmar",Pyidaungsu,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(135deg,#667eea 0,#764ba2 100%);
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom));
  -webkit-font-smoothing:antialiased;
}
.d-none,.hidden{display:none!important}
.checkout-wrapper{width:100%;max-width:768px;margin:0 auto}
.card,.tq-card{
  background:#f8f8f8;
  border-radius:16px;
  width:100%;
  padding:16px;
  position:relative;
  box-shadow:0 8px 32px rgba(102,92,92,.15);
  border:0;
}
.lang-switcher{position:absolute;top:10px;right:20px;z-index:10}
.lang-switcher::after{
  content:"";position:absolute;right:10px;top:50%;width:6px;height:6px;
  border-right:1px solid #666;border-bottom:1px solid #666;pointer-events:none;
  transform:translateY(-65%) rotate(45deg);
}
.lang-select{
  appearance:none;-webkit-appearance:none;
  background:rgba(255,255,255,.9);border:1px solid #ddd;border-radius:15px;
  min-width:92px;padding:6px 28px 6px 10px;font-size:12px;font-weight:400;color:#666;
  cursor:pointer;font-family:inherit;line-height:1.25;
}
.lang-select:focus,.lang-select:hover{background:#fff;border-color:#c9cdd6;outline:0}

.full-state,.state-overlay{
  min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:40px 20px;text-align:center;background:#f8f8f8;border-radius:16px;
}
#checkout-loading{
  position:fixed;z-index:9999;inset:0;width:100%;height:100vh;
  background:#34495e;display:flex;align-items:center;justify-content:center;flex-direction:column;
  color:#efeffa;
}
.loader{width:64px;height:64px;border-radius:50%;perspective:800px;position:relative;margin-bottom:12px}
.loader .inner{position:absolute;box-sizing:border-box;width:100%;height:100%;border-radius:50%}
.loader .inner.one{left:0;top:0;animation:rotate-one 1s linear infinite;border-bottom:3px solid #efeffa}
.loader .inner.two{right:0;top:0;animation:rotate-two 1s linear infinite;border-right:3px solid #efeffa}
.loader .inner.three{right:0;bottom:0;animation:rotate-three 1s linear infinite;border-top:3px solid #efeffa}
@keyframes rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotateZ(0)}100%{transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}
@keyframes rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotateZ(0)}100%{transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}
@keyframes rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotateZ(0)}100%{transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}

.state-icon,.icon-huge{
  width:68px;height:68px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;font-size:34px;font-weight:700;color:#fff;
  box-shadow:0 12px 28px rgba(0,0,0,.15);
}
.state-icon.success,.text-success.icon-huge{background:linear-gradient(135deg,#16a34a,#22c55e);font-size:34px!important}
.state-icon.failed,.state-icon.expired,.text-warning.icon-huge,.text-danger.icon-huge{
  background:linear-gradient(135deg,#ef4444,#f97316);font-size:34px!important
}
.state-title,h3.fw-bold,h4.fw-bold{font-size:20px;font-weight:700;color:var(--ink);margin-bottom:8px}
.state-desc,.text-muted.small{font-size:14px;color:var(--muted-dark);line-height:1.6;max-width:320px}

#checkout-main{padding-top:42px}
.steps{display:flex;align-items:center;justify-content:center;height:24px;margin:12px 0 16px}
.step-group{display:flex;flex-direction:column;align-items:center}
.step-circle{
  width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:16px;font-weight:700;flex-shrink:0;line-height:1;
}
.step-circle.active{background:#2196f3;color:#fff}
.step-circle.inactive{background:#fff;color:#999;border:0}
.step-line{width:120px;height:2px;background:#fff;margin:0 20px}
.step-label{display:none}

.badge-row{
  position:relative;display:flex;justify-content:space-between;align-items:center;
  margin-bottom:16px;min-height:40px;
}
.channel-badge{
  background:var(--brand-blue);color:#fff;font-weight:700;padding:8px 16px;border-radius:20px;
  display:inline-flex;align-items:center;min-height:40px;font-size:14px;
}
.countdown-bar{
  background:var(--brand-red);color:#fff;font-weight:700;font-size:14px;padding:8px 12px;
  border-radius:20px;display:inline-flex;align-items:center;gap:6px;min-height:40px;
}
.countdown-bar::before{
  content:'';width:14px;height:16px;flex-shrink:0;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M6 2h12v2H6V2zm0 18h12v2H6v-2zM7 4h10v2c0 2.76-2.24 5-5 5s-5-2.24-5-5V4zm0 14v-2c0-2.76 2.24-5 5-5s5 2.24 5 5v2H7z'/></svg>") center/contain no-repeat;
}
.countdown-bar strong{color:#fff;font-weight:700;font-size:14px}

.info-card{background:#fff;border:0;border-radius:10px;padding:16px 20px;margin-bottom:8px}
.info-label{color:#333;font-size:11px;margin-bottom:6px;font-weight:400}
.account-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;min-height:54px}
.account-row .info-label{grid-column:1;margin-bottom:4px}
.account-row .copy-btn{grid-row:1/span 2;grid-column:2;align-self:center}
.account-number{
  grid-column:1;font-size:21px;font-weight:700;color:#f44336;word-break:break-all;line-height:1.2;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.holder-row{margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}
.holder-name{font-size:17px;font-weight:700;color:#1f2937;line-height:1.3;overflow-wrap:anywhere}

.amount-card{
  text-align:center;min-height:128px;padding:16px 20px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.amount-value{
  font-size:26px;font-weight:800;color:var(--brand-red);margin-bottom:8px;line-height:1.1;
}
.amount-card .copy-btn{margin-bottom:8px}
.amount-helper{font-size:14px;color:#666;text-align:center}
.copy-btn{
  background:#2196f3;color:#fff;border:none;border-radius:20px;padding:0 16px;width:64px;height:28px;
  font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;
  font-family:inherit;white-space:nowrap;flex-shrink:0;
}
.copy-btn:hover{background:var(--brand-blue-dark)}

.tx-section{margin-bottom:16px;background:#fff;border-radius:25px;padding:2px 5px}
.tx-input-card{
  background:#fff;border:1px solid #dadce0;border-radius:12px;padding:10px;
  display:flex;align-items:center;gap:6px;width:100%;
}
.tx-input-card:focus-within{border-color:#4285f4;box-shadow:0 2px 6px rgba(66,133,244,.15)}
.tx-input-icon{width:18px;height:18px;color:#2196f3;flex-shrink:0}
.tx-input{
  flex:1;border:none;outline:0;padding:0;font-size:14px;font-family:inherit;background:transparent;
  color:#333;min-width:0;letter-spacing:.2em;text-transform:uppercase;font-weight:700;
}
.tx-submit-btn{
  width:34px;height:34px;border-radius:50%;background:#2196f3;border:none;
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
  box-shadow:0 2px 8px rgba(66,133,244,.3);color:#fff;
}
.tx-submit-btn:hover{background:#3367d6}
.tx-submit-btn svg{width:18px;height:18px}
.tx-helper{font-size:13px;color:#757575;margin:8px 0 8px 4px;padding:0 4px;line-height:1.5}

.supported-apps{margin-bottom:12px}
.supported-apps-label{color:#2196f3;font-size:15px;font-weight:700;margin-bottom:12px;display:block}
.channel-icon{
  display:inline-flex;width:55px;height:55px;border-radius:50%;overflow:hidden;
  border:3px solid var(--brand-blue);
}
.channel-icon img{width:100%;height:100%;object-fit:cover;display:block}

.tips-card{
  background:#fff;border-left:4px solid var(--orange);border-radius:12px;padding:16px;margin:20px 0;
  color:var(--orange-dark);box-shadow:0 2px 8px rgba(0,0,0,.1);
}
.tips-title{color:var(--orange-dark);font-weight:700;font-size:15px;margin-bottom:12px}
.tips-list{list-style:none;padding:0 0 0 16px;margin:0;line-height:1.5}
.tips-list li{color:var(--orange-dark);font-size:13px;line-height:1.5;margin-bottom:8px}
.tips-list li::before{content:attr(data-idx);font-weight:700;margin-right:4px}

.order-footer{
  background:var(--panel);border-radius:8px;border:1px solid #fff;padding:12px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;
}
.order-label{color:var(--muted-dark);font-size:14px;font-weight:500;flex-shrink:0}
.order-no{color:var(--brand-red);font-weight:600;font-size:14px;word-break:break-all;flex:1;text-align:center}
.copy-icon-btn{background:transparent;border:none;cursor:pointer;padding:4px;color:var(--muted)}
.copy-icon-btn:hover{color:var(--brand-blue)}
.copy-icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none}

.selection-placeholder{
  background:#fff;border-radius:10px;padding:28px 16px;text-align:center;margin-bottom:12px;color:var(--muted-dark);
}
.selection-placeholder .icon-circle{
  width:56px;height:56px;border-radius:50%;background:#eef4ff;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;
  color:var(--brand-blue);font-size:22px;font-weight:700;
}
.alert{border-radius:10px;padding:10px 12px;margin:0 0 8px;font-size:13px}
.alert-warning{background:#fff7ed;color:#c2410c}
.alert-danger{background:#fef2f2;color:#b91c1c}

/* 兼容旧 JS 依赖的隐藏节点 */
#bank-pills-list,#qr-display-area,#timer-stroke,#wake-app-btn,#quick-action-panel,
#deeplink-fallback,#cross-bank-fee-hint,#status-container,#btn-support-link,
.side-panel-container,#panel-overlay,.bank-selector-wrapper>.d-flex{display:none!important}

#tq-amount-block{display:contents}
.amount-display{display:contents}
#btn-copy-amount{display:none}

.toast-lite{
  position:fixed;top:36px;left:50%;transform:translateX(-50%) translateY(-20px);
  background:rgba(0,0,0,.82);color:#fff;padding:9px 22px;border-radius:8px;font-size:14px;
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:9999;
}
.toast-lite.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:420px){
  .card,.tq-card{border-radius:10px;min-height:calc(100dvh - 20px)}
  .step-line{width:100px}
  .account-number{font-size:20px}
  .amount-value{font-size:24px}
}

/* TQ 60s 提醒弹窗 */
.modal-overlay{
  position:fixed;inset:0;z-index:9998;display:flex;align-items:center;justify-content:center;
  padding:18px 14px;background:rgba(0,0,0,.58);backdrop-filter:blur(2px);
}
.modal-overlay.hidden{display:none!important}
.modal-dialog{
  width:min(390px,100%);background:#fff;border-radius:18px;position:relative;overflow:hidden;
  box-shadow:0 28px 78px rgba(0,0,0,.34);animation:modalIn .18s ease-out;
}
@keyframes modalIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.modal-header{padding:20px 52px 16px 22px;border-bottom:1px solid #edf0f5;display:flex;flex-direction:column;gap:10px}
.modal-close{position:absolute;top:16px;right:16px;width:34px;height:34px;border:0;background:transparent;color:#9a9a9a;font-size:28px;cursor:pointer;line-height:1}
.modal-close:hover{color:var(--ink)}
.modal-kicker{display:inline-flex;padding:4px 12px;border-radius:999px;background:var(--brand-blue);color:#fff;font-size:12px;font-weight:700;align-self:flex-start}
.modal-title{font-size:18px;font-weight:800;color:var(--ink);line-height:1.3}
.modal-body{padding:20px 22px 24px}
.modal-desc{color:var(--muted-dark);font-size:14px;line-height:1.5;text-align:center}
.modal-note{margin-top:16px;color:var(--brand-red);font-weight:600;font-size:13px;text-align:center}
.modal-input-row{display:flex;flex-direction:column;gap:10px;margin:22px 0 0}
.modal-input{
  width:100%;min-height:52px;border:2px solid var(--brand-blue);border-radius:12px;padding:0 16px;
  font-size:16px;font-weight:700;color:var(--ink);font-family:inherit;letter-spacing:.28em;text-transform:uppercase;text-align:center;
}
.modal-input:focus{outline:0;box-shadow:0 0 0 4px rgba(35,103,216,.15)}
.modal-submit-btn{
  width:100%;min-height:50px;margin-top:12px;border:0;border-radius:12px;background:var(--brand-blue);
  color:#fff;font-size:15px;font-weight:800;font-family:inherit;cursor:pointer;
}
.modal-submit-btn:disabled{opacity:.6;cursor:wait}
.modal-submit-btn.submitting{opacity:.85}
