/* WeChat Pay Direct QR Modal Styling */
.wx-pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wx-pay-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.wx-pay-modal {
  background: radial-gradient(130% 120% at 50% 0%, rgba(16, 185, 129, 0.1) 0%, rgba(10, 15, 26, 0.98) 60%);
  border: 1px solid rgba(16, 229, 153, 0.25);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85), 0 0 30px rgba(16, 229, 153, 0.15);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 28rem;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
  color: #f8fafc;
  text-align: center;
  box-sizing: border-box;
}

.wx-pay-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wx-pay-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.wx-qr-box {
  background: #ffffff;
  border-radius: 1.125rem;
  padding: 0.875rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  display: inline-block;
  position: relative;
  margin: 0.75rem auto;
}

.wx-qr-img {
  width: 176px;
  height: 176px;
  display: block;
  border-radius: 0.5rem;
  object-fit: contain;
}

.wx-qr-overlay {
  position: absolute;
  inset: 0.875rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(3px);
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  color: #ffffff;
  gap: 0.5rem;
}

.wx-qr-overlay.hidden {
  display: none !important;
}

.wx-key-box {
  background: rgba(16, 229, 153, 0.08);
  border: 1.5px dashed rgba(16, 229, 153, 0.4);
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wx-key-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  font-size: 1.125rem;
  color: #10e599;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.wx-btn-copy {
  background: #10e599;
  color: #022c22;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wx-btn-copy:hover {
  background: #34d399;
  transform: translateY(-1px);
}

.wx-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 229, 153, 0.12);
  border: 1px solid rgba(16, 229, 153, 0.3);
  color: #10e599;
}

.wx-mobile-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 0.875rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  color: #fde68a;
  line-height: 1.4;
}

.wx-pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #10e599;
  display: inline-block;
  animation: wx-pulse 1.8s infinite;
}

/* Explicit input styling to prevent browser white-background override */
.wx-email-input {
  width: 100% !important;
  background-color: #0f172a !important; /* dark slate-900 */
  color: #ffffff !important;           /* pure white readable text */
  border: 1px solid #334155 !important; /* slate-700 */
  border-radius: 0.75rem !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.wx-email-input:focus {
  border-color: #10e599 !important;
  box-shadow: 0 0 0 2px rgba(16, 229, 153, 0.25) !important;
  background-color: #0b1120 !important;
}

.wx-email-input::placeholder {
  color: #64748b !important; /* slate-500 */
  opacity: 1 !important;
}

.wx-btn-sub {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.wx-btn-sub:hover {
  background: rgba(16, 229, 153, 0.15);
  border-color: #10e599;
  color: #10e599;
}

.wx-btn-primary {
  background: linear-gradient(135deg, #10e599 0%, #059669 100%);
  color: #022c22;
  font-weight: 800;
  font-size: 0.8125rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  box-shadow: 0 4px 15px rgba(16, 229, 153, 0.25);
  transition: all 0.2s ease;
}

.wx-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 229, 153, 0.35);
}

.wx-btn-refresh {
  background: #10e599;
  color: #022c22;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.wx-btn-refresh:hover {
  background: #34d399;
}

@keyframes wx-pulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(16, 229, 153, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(16, 229, 153, 0); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(16, 229, 153, 0); }
}
