/* Shared recharge UI — H5 / PC modal / billing page */
.recharge-panel {
  font-size: 14px;
  color: var(--rp-fg, #111);
  --rp-radius: 12px;
  --rp-border: rgba(0, 0, 0, 0.1);
  --rp-surface: rgba(0, 0, 0, 0.03);
  --rp-accent: #2563eb;
  --rp-link: #2563eb;
}

body.h5-shell.wb-google-light .h5-panel-page .recharge-panel {
  --rp-fg: #111111;
  --rp-border: rgba(0, 0, 0, 0.1);
  --rp-surface: rgba(0, 0, 0, 0.03);
  --rp-btn-bg: #ffffff;
  --rp-input-bg: #ffffff;
}

body.h5-app-page .recharge-panel,
body.wb-google-dark .recharge-panel {
  --rp-fg: #e5e2e1;
  --rp-border: rgba(255, 255, 255, 0.12);
  --rp-surface: rgba(255, 255, 255, 0.05);
  --rp-link: #93c5fd;
}

.recharge-panel__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
}

.recharge-lead {
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--rp-radius);
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  opacity: 0.85;
}

.recharge-xianyu-line {
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 14px;
  word-break: break-all;
}

.recharge-xianyu-line a {
  color: var(--rp-link);
  text-decoration: underline;
}

.recharge-scan {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 14px;
  margin-bottom: 14px;
}

.recharge-scan__head {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}

.recharge-scan__hint {
  font-size: 12px;
  opacity: 0.65;
  margin: 0 0 12px;
  line-height: 1.5;
}

.recharge-qr-wrap {
  display: flex;
  justify-content: center;
}

.recharge-qr {
  width: 168px;
  height: 168px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  border: 1px solid var(--rp-border);
}

.recharge-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.recharge-plan-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid var(--rp-border);
  background: var(--rp-btn-bg, #fff);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

body.h5-app-page .recharge-plan-btn,
body.wb-google-dark .recharge-plan-btn {
  --rp-btn-bg: rgba(255, 255, 255, 0.06);
}

.recharge-plan-btn:hover:not(:disabled) {
  border-color: var(--rp-accent);
  background: rgba(37, 99, 235, 0.08);
}

.recharge-plan-btn.is-disabled,
.recharge-plan-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.recharge-plan-btn__name {
  font-size: 14px;
  font-weight: 600;
}

.recharge-plan-btn__meta {
  font-size: 11px;
  opacity: 0.7;
}

.recharge-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 12px;
  opacity: 0.55;
}

.recharge-or::before,
.recharge-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
}

.recharge-code__head {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}

.recharge-code__hint {
  font-size: 12px;
  opacity: 0.6;
  margin: 0 0 8px;
  line-height: 1.45;
}

.recharge-code-row {
  display: flex;
  gap: 8px;
}

.recharge-code-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--rp-border);
  font-size: 14px;
  font-family: ui-monospace, Menlo, monospace;
  background: var(--rp-input-bg, #fff);
  color: inherit;
}

body.h5-app-page .recharge-code-input,
body.wb-google-dark .recharge-code-input {
  --rp-input-bg: rgba(255, 255, 255, 0.06);
}

.recharge-code-submit {
  padding: 10px 18px;
  border-radius: 10px;
  border: 0;
  background: var(--rp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.recharge-code-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.recharge-msg {
  margin-top: 10px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
}

.recharge-msg--ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.recharge-msg--err {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

body.h5-app-page .recharge-msg--ok,
body.wb-google-dark .recharge-msg--ok {
  color: #86efac;
}

body.h5-app-page .recharge-msg--err,
body.wb-google-dark .recharge-msg--err {
  color: #fca5a5;
}

.recharge-empty {
  grid-column: span 2;
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* Modal shell (PC / H5 top bar) */
#rechargeModal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

#rechargeModal[hidden] {
  display: none !important;
}

.recharge-modal__card {
  background: var(--rp-modal-bg, #fff);
  color: var(--rp-fg, #111);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  max-height: min(92vh, 640px);
  overflow-y: auto;
  padding: 20px 18px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

body.h5-app-page .recharge-modal__card,
body.wb-google-dark .recharge-modal__card {
  --rp-modal-bg: #1e1e1e;
}

.recharge-modal__close {
  float: right;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  padding: 0 4px;
  color: inherit;
}

body.recharge-modal-open {
  overflow: hidden;
}

/* Billing page: history list */
.recharge-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 14px 24px;
  box-sizing: border-box;
}

.h5-bill-panel {
  padding: 8px 14px 16px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.recharge-page__title {
  font-size: 18px;
  font-weight: 600;
  margin: 6px 0 10px;
}

.bill-wrap .recharge-panel__title,
.recharge-page .recharge-panel__title {
  display: none;
}

.recharge-page .recharge-panel > .recharge-lead {
  margin-top: 0;
}

.recharge-history-title {
  font-size: 12px;
  opacity: 0.55;
  margin: 20px 4px 10px;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.recharge-history-list .recharge-history-row {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recharge-history-row__amt {
  font-weight: 600;
}

.recharge-history-row__time {
  font-size: 12px;
  opacity: 0.55;
  margin-top: 2px;
}

.recharge-history-row__status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}

.recharge-history-row__status.is-pending {
  background: rgba(255, 183, 77, 0.15);
  color: #ffc78a;
}

.recharge-history-row__status.is-paid {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.recharge-history-row__status.is-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.recharge-history-row__status.is-expired {
  background: rgba(255, 255, 255, 0.08);
  opacity: 0.7;
}

.recharge-banner-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #86efac;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0 0 12px;
}

.recharge-banner-err {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0 0 12px;
}

.recharge-history-empty {
  text-align: center;
  opacity: 0.5;
  font-size: 13px;
  padding: 18px;
}
