/* ============================================================
   统一黑金支付台 & RiPro 弹窗样式美化（不改动原生支付事件）
   ============================================================ */
.ri-popup .ri-popup-body {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 12px 0 44px !important;
}

.ri-popup .ri-popup-body:has(.nsp-pay-wrap),
.ri-popup .ri-popup-body.is-nsp-pay {
  width: min(460px, calc(100vw - 28px)) !important;
  max-width: 460px !important;
}

.ri-popup .ri-popup-body:has(.pay-body-html),
.ri-popup .ri-popup-body.is-nsp-qr {
  width: min(340px, calc(100vw - 28px)) !important;
  max-width: 340px !important;
}

.ri-popup .ri-popup-content {
  background: #12141a !important;
  color: #f6f3ec !important;
  border: 1px solid rgba(246, 243, 236, .18) !important;
  border-radius: 14px !important;
  box-shadow: 0 28px 72px rgba(0, 0, 0, .72) !important;
  padding: 20px !important;
}

.ri-popup .ri-popup-close {
  bottom: 0;
  transform: none !important;
}

.ri-popup .ri-popup-close .svg-close {
  color: #a6a39b !important;
}

.ri-popup .ri-popup-close .svg-close:hover {
  color: #f6f3ec !important;
}

.nsp-pay-wrap {
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  color: #f6f3ec;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.nsp-pay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 10px;
  background: #191c24;
  border: 1px solid rgba(246, 243, 236, .10);
  margin-bottom: 12px;
}

.nsp-pay-summary__info {
  min-width: 0;
}

.nsp-pay-summary__title {
  font-size: 14px;
  font-weight: 800;
  color: #f6f3ec;
  line-height: 1.35;
  word-break: break-word;
}

.nsp-pay-summary__sub {
  margin-top: 3px;
  font-size: 12px;
  color: #a6a39b;
}

.nsp-pay-summary__price {
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.nsp-pay-summary__price strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: #ebd298;
}

.nsp-pay-summary__price small {
  font-size: 12px;
  font-weight: 600;
  color: #a6a39b;
}

.nsp-pay-summary__price span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #a6a39b;
}

.nsp-pay-bal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.nsp-pay-bal.is-enough {
  background: rgba(90, 200, 140, .10);
  border: 1px solid rgba(90, 200, 140, .35);
  color: #cdeed9;
}

.nsp-pay-bal.is-enough strong {
  color: #70d69e;
}

.nsp-pay-bal.is-short {
  background: rgba(229, 83, 75, .10);
  border: 1px solid rgba(229, 83, 75, .36);
  color: #f6c2bf;
}

.nsp-pay-bal.is-short strong {
  color: #ffe2e0;
}

.nsp-pay-bal.is-short a {
  color: #ebd298 !important;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.nsp-pay-bal.is-short a:hover {
  text-decoration: underline;
}

.nsp-pay-label {
  font-size: 12px;
  font-weight: 700;
  color: #a6a39b;
  margin-bottom: 8px;
}

.nsp-pay-wrap .pay-select-box {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.nsp-pay-wrap .pay-select-box .pay-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(246, 243, 236, .16) !important;
  background: #191c24 !important;
  color: #f6f3ec !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.nsp-pay-wrap .pay-select-box .pay-item img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.nsp-pay-wrap .pay-select-box .pay-item:hover {
  border-color: rgba(223, 192, 124, .62) !important;
  background: #212530 !important;
  transform: translateY(-1px);
}

.nsp-pay-wrap .pay-select-box .pay-item[data-id="12"],
.nsp-pay-wrap .pay-select-box .pay-item[data-id="2"] {
  border-color: rgba(7, 193, 96, .52) !important;
  background: rgba(7, 193, 96, .12) !important;
  color: #d7f9e6 !important;
}

.nsp-pay-wrap .pay-select-box .pay-item[data-id="12"]:hover,
.nsp-pay-wrap .pay-select-box .pay-item[data-id="2"]:hover {
  background: rgba(7, 193, 96, .22) !important;
  border-color: #07c160 !important;
}

.nsp-pay-cdk {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(246, 243, 236, .10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #a6a39b;
}

.nsp-pay-cdk a {
  color: #dfc07c !important;
  font-weight: 700;
  text-decoration: none;
}

.nsp-pay-cdk a:hover {
  text-decoration: underline;
}

.nsp-pay-upsell {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(90, 200, 140, .10);
  border: 1px solid rgba(90, 200, 140, .38);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #d2f1de;
}

.nsp-pay-upsell strong {
  color: #70d69e;
}

.nsp-pay-upsell a {
  color: #70d69e !important;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.nsp-pay-upsell.is-gold {
  background: rgba(223, 192, 124, .11);
  border-color: rgba(223, 192, 124, .44);
  color: #f4e4bd;
}

.nsp-pay-upsell.is-gold strong,
.nsp-pay-upsell.is-gold a {
  color: #ebd298 !important;
}

/* 扫码弹窗美化 */
.ri-popup .pay-body-html {
  color: #f6f3ec !important;
  text-align: center;
}

.ri-popup .pay-body-html .title {
  color: #f6f3ec !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 10px 0 14px !important;
}

.ri-popup .pay-body-html .title b {
  color: #ebd298 !important;
  font-size: 20px !important;
}

.ri-popup .pay-body-html .qrcode {
  display: inline-block;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
}

.ri-popup .pay-body-html .desc {
  margin-top: 12px;
  font-size: 12.5px;
  color: #a6a39b !important;
}

/* 通用轻提示 Toast */
.nsp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  max-width: 90vw;
  padding: 10px 18px;
  border-radius: 9px;
  background: #1b1f29;
  border: 1px solid rgba(223, 192, 124, .48);
  color: #f6f3ec;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s cubic-bezier(.22, 1, .36, 1);
}

.nsp-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .ri-popup .ri-popup-content { padding: 16px !important; }
  .nsp-pay-wrap { min-width: 0; }
  .nsp-pay-wrap .pay-select-box { grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)) !important; }
  .nsp-pay-bal, .nsp-pay-upsell { flex-direction: column; align-items: flex-start; }
  .nsp-toast { bottom: 74px; }
}
