/* ============================================================================
 * Web3 Wallet Connect Modal Styles
 * Replicating ADSToken2.0 Dual-View UI (BSCScan & Reown AppKit)
 * ============================================================================ */

/* Modal Backdrop */
.w3m-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.w3m-backdrop.w3m-open {
  opacity: 1;
  visibility: visible;
}

/* Modal Card Container */
.w3m-card {
  width: 100%;
  max-width: 380px;
  background-color: #12161f;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.08);
  overflow: hidden;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f1f5f9;
}

.w3m-backdrop.w3m-open .w3m-card {
  transform: scale(1) translateY(0);
}

/* Modal Inner Body */
.w3m-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Modal Header */
.w3m-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.w3m-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.2px;
}

.w3m-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pill / Icon Buttons */
.w3m-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.w3m-icon-btn:hover {
  background: #334155;
  color: #ffffff;
  transform: scale(1.05);
}

.w3m-switch-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.w3m-switch-pill:hover {
  background: #334155;
  color: #ffffff;
}

/* Info Box */
.w3m-info-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.w3m-info-box svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #94a3b8;
}

.w3m-info-box p {
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

/* Mobile Banner */
.w3m-mobile-banner {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 88, 12, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.w3m-mobile-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.w3m-mobile-title {
  font-size: 12px;
  font-weight: 700;
  color: #fcd34d;
  display: flex;
  align-items: center;
  gap: 6px;
}

.w3m-mobile-badge {
  font-size: 9px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  padding: 2px 6px;
  border-radius: 4px;
}

.w3m-mobile-text {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.w3m-mobile-actions {
  display: flex;
  gap: 8px;
}

.w3m-mobile-copy-btn, .w3m-mobile-app-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: none;
}

.w3m-mobile-copy-btn {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

.w3m-mobile-copy-btn:hover {
  background: rgba(245, 158, 11, 0.35);
}

.w3m-mobile-app-btn {
  background: rgba(234, 88, 12, 0.3);
  border: 1px solid rgba(234, 88, 12, 0.4);
  color: #fed7aa;
}

.w3m-mobile-app-btn:hover {
  background: rgba(234, 88, 12, 0.45);
}

/* Wallet Options List */
.w3m-wallet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.w3m-wallet-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  background-color: #171d29;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s ease;
  color: #ffffff;
  outline: none;
  text-align: left;
}

.w3m-wallet-btn:hover {
  background-color: #1e2636;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.w3m-wallet-btn:active {
  transform: translateY(0);
}

.w3m-wallet-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.w3m-wallet-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.w3m-wallet-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w3m-wallet-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.w3m-wallet-sub {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

/* Badges */
.w3m-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.9);
  padding: 2.5px 7px;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

/* Search Box (All Wallets view) */
.w3m-search-wrap {
  position: relative;
  width: 100%;
}

.w3m-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #64748b;
}

.w3m-search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 12px;
  background: #0b0f17;
  border: 1px solid #1e293b;
  font-size: 12px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.w3m-search-input:focus {
  border-color: #3b82f6;
}

/* Wallets Scrollable Area */
.w3m-scrollable {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.w3m-scrollable::-webkit-scrollbar {
  width: 4px;
}

.w3m-scrollable::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

/* Footer Help Link */
.w3m-footer {
  text-align: center;
  padding-top: 4px;
  font-size: 11.5px;
  color: #94a3b8;
}

.w3m-link-btn {
  background: none;
  border: none;
  color: #60a5fa;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.w3m-link-btn:hover {
  color: #93c5fd;
}

/* Toast Notifications */
.w3m-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000000;
  padding: 12px 18px;
  border-radius: 14px;
  background: #171d29;
  border: 1px solid #334155;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

.w3m-toast.w3m-toast-show {
  transform: translateY(0);
  opacity: 1;
}

.w3m-toast.w3m-toast-success {
  border-color: rgba(16, 185, 129, 0.5);
  background: #06241a;
  color: #6ee7b7;
}

.w3m-toast.w3m-toast-error {
  border-color: rgba(244, 63, 94, 0.5);
  background: #2b0b14;
  color: #fca5a5;
}

.w3m-toast.w3m-toast-info {
  border-color: rgba(59, 130, 246, 0.5);
  background: #0b1a30;
  color: #93c5fd;
}

/* Connect Wallet Trigger Button on Login Page */
.btn-web3-connect {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid #3b82f6;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  text-decoration: none;
  box-sizing: border-box;
}

.btn-web3-connect:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.web3-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.web3-divider::before,
.web3-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #334155;
}

.web3-divider:not(:empty)::before {
  margin-right: .75em;
}

.web3-divider:not(:empty)::after {
  margin-left: .75em;
}

/* ============================================================================
 * Live Waiting / Polling State & Web2 Handoff Elements
 * ============================================================================ */
.w3m-pulse-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w3m-pulse-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  border: 2px solid rgba(59, 130, 246, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: w3mPulse 2s infinite ease-in-out;
}

@keyframes w3mPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
    transform: scale(0.96);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(59, 130, 246, 0);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    transform: scale(0.96);
  }
}

.w3m-retry-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.w3m-retry-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #475569;
}

.w3m-cancel-poll-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11.5px;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.w3m-cancel-poll-btn:hover {
  color: #94a3b8;
}

.w3m-handoff-success {
  text-align: center;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mobile Choice View (Stay in Chrome vs In-App Browser) */
.w3m-choice-view {
  text-align: center;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.w3m-choice-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 6px 0 2px 0;
}

.w3m-choice-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.w3m-primary-choice-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: 1px solid rgba(147, 197, 253, 0.4);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.w3m-primary-choice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.w3m-primary-choice-label {
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.w3m-primary-choice-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.w3m-secondary-choice-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.5);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.w3m-secondary-choice-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  border-color: rgba(100, 116, 139, 0.8);
}

.w3m-secondary-choice-label {
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.w3m-secondary-choice-sub {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 400;
}

.w3m-choice-back-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s ease;
  display: inline-block;
  margin-top: 4px;
}

.w3m-choice-back-btn:hover {
  color: #cbd5e1;
}


