/*!
 * dwk-pay.css — 定旺坤支付弹窗样式 v1.0
 * 2026-10-01 · 白象1号执行
 * 三页共用一套，禁止逐页复制
 */

/* ---------- 遮罩 ---------- */
.dwkpay-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 22, 14, 0.62);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: dwkpayFadeIn .18s ease-out;
}

@keyframes dwkpayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- 弹窗主体 ---------- */
.dwkpay-box {
  width: min(90vw, 360px);
  max-height: 92vh;
  overflow-y: auto;
  background: #fffdf8;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  border: 1px solid #e8ddc8;
  animation: dwkpayPop .22s cubic-bezier(.2, .9, .3, 1.2);
  box-sizing: border-box;
}

@keyframes dwkpayPop {
  from { transform: scale(.92) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ---------- 头部 ---------- */
.dwkpay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f0e7d6;
}

.dwkpay-title {
  font-size: 17px;
  font-weight: 700;
  color: #6b4b2a;
  letter-spacing: .5px;
}

.dwkpay-close {
  width: 44px;
  height: 44px;
  margin: -10px -10px -10px 0;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #b0a08a;
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.dwkpay-close:hover,
.dwkpay-close:active {
  background: #f5ede0;
  color: #8a6a45;
}

/* ---------- 内容区 ---------- */
.dwkpay-body {
  padding: 18px 20px 22px;
  text-align: center;
}

.dwkpay-info {
  margin-bottom: 16px;
}

.dwkpay-gname {
  font-size: 15px;
  color: #7a6a55;
  margin-bottom: 6px;
  line-height: 1.4;
}

.dwkpay-price {
  font-size: 30px;
  font-weight: 800;
  color: #b03d2d;
  line-height: 1.1;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.dwkpay-yen {
  font-size: 17px;
  font-weight: 600;
  margin-right: 2px;
}

/* ---------- 二维码 ---------- */
.dwkpay-qr {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid #ece2d0;
  border-radius: 12px;
  margin-bottom: 14px;
  line-height: 0;
  box-shadow: 0 2px 10px rgba(150, 120, 80, .08);
}

.dwkpay-canvas {
  display: block;
  width: 240px;
  height: 240px;
  max-width: 60vw;
  max-height: 60vw;
}

/* ---------- 状态文字 ---------- */
.dwkpay-status {
  font-size: 14px;
  color: #8a7d6b;
  line-height: 1.6;
  min-height: 22px;
  margin-bottom: 6px;
}

.dwkpay-status.dwkpay-ok {
  color: #2e7d4f;
  font-weight: 700;
  font-size: 15px;
}

.dwkpay-status.dwkpay-err {
  color: #b03d2d;
  font-weight: 600;
}

/* ---------- 提示 ---------- */
.dwkpay-tip {
  font-size: 12px;
  color: #a89a86;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ---------- 订单号 ---------- */
.dwkpay-order {
  font-size: 11px;
  color: #bdb0a0;
  word-break: break-all;
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px dashed #f0e7d6;
}

/* ---------- 手机端适配 ---------- */
@media (max-width: 480px) {
  .dwkpay-mask {
    padding: 10px;
    align-items: center;
  }

  .dwkpay-box {
    width: min(94vw, 340px);
    max-height: 94vh;
    border-radius: 16px;
  }

  .dwkpay-head {
    padding: 14px 16px 10px;
  }

  .dwkpay-title {
    font-size: 16px;
  }

  .dwkpay-body {
    padding: 14px 16px 18px;
  }

  .dwkpay-price {
    font-size: 26px;
  }

  .dwkpay-canvas {
    width: 200px;
    height: 200px;
    max-width: 56vw;
    max-height: 56vw;
  }

  .dwkpay-qr {
    padding: 10px;
  }
}

/* 超小屏（iPhone SE 等） */
@media (max-width: 360px) {
  .dwkpay-canvas {
    width: 170px;
    height: 170px;
    max-width: 52vw;
    max-height: 52vw;
  }
}

/* 横屏矮屏 */
@media (max-height: 520px) {
  .dwkpay-box {
    max-height: 96vh;
  }
  .dwkpay-canvas {
    width: 150px;
    height: 150px;
    max-width: 40vh;
    max-height: 40vh;
  }
  .dwkpay-price {
    font-size: 22px;
  }
}

/* ==========================================================
   支付成功浮层（2026-10-01 新增）
   规格：全屏黑55%遮罩 + 居中白卡 + 大绿勾 + 按钮
   铁律：绝对不自动消失，等用户点「开始阅读」
   ========================================================== */

.dwkpay-ovl-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  animation: dwkpayOvlFade .2s ease-out;
}

@keyframes dwkpayOvlFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dwkpay-ovl-card {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 24px 28px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: dwkpayOvlPop .26s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes dwkpayOvlPop {
  from { transform: scale(.9) translateY(12px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* 大绿勾：直径 64px 圆 + 白色对勾 */
.dwkpay-ovl-tick {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #2e9e5b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(46, 158, 91, .35);
}

.dwkpay-ovl-tick-mark {
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  font-weight: 700;
  transform: translateY(-2px);
}

.dwkpay-ovl-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2a22;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

.dwkpay-ovl-sub {
  font-size: 15px;
  color: #7b8a80;
  line-height: 1.6;
  margin-bottom: 28px;
}

.dwkpay-ovl-btn {
  display: block;
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-radius: 12px;
  background: #2e9e5b;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}

.dwkpay-ovl-btn:hover {
  background: #278a4f;
}

.dwkpay-ovl-btn:active {
  transform: scale(.98);
}
