/* ==============================================================================
   VERA SMARTCHAIN — UNIVERSAL WEB3 WALLET MODAL & HEADER BUTTON
   ============================================================================== */

.vera-wallet-btn {
  background: linear-gradient(135deg, #8b6bff, #5b3fd6);
  color: #ffffff !important;
  border: 1px solid rgba(139, 107, 255, 0.4);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap !important;
  box-shadow: 0 2px 12px rgba(91, 63, 214, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
}

.vera-wallet-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(139, 107, 255, 0.5);
  background: linear-gradient(135deg, #9b7eff, #6b4ce6);
}

.vera-wallet-btn.connected {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399 !important;
  box-shadow: none;
}

.vera-wallet-btn.connected:hover {
  background: rgba(16, 185, 129, 0.2);
}

/* Wallet Selection Modal Overlay */
.vera-wallet-modal-overlay {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  background: rgba(4, 2, 10, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 2147483647 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  animation: veraFadeIn 0.2s ease;
}

.vera-wallet-modal-overlay.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@keyframes veraFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vera-wallet-modal {
  background: #0d081a;
  border: 1px solid rgba(139, 107, 255, 0.28);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 40px rgba(91, 63, 214, 0.22);
  overflow: hidden;
  animation: veraModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes veraModalPop {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.vera-wallet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.vera-wallet-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.vera-wallet-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #c0bbd6;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.18s ease;
}

.vera-wallet-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.vera-wallet-modal-body {
  padding: 20px 24px;
}

.vera-wallet-modal-subtitle {
  font-size: 13px;
  color: #9b95b3;
  line-height: 1.5;
  margin-bottom: 18px;
}

.vera-wallet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vera-wallet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.vera-wallet-option:hover {
  background: rgba(139, 107, 255, 0.09);
  border-color: rgba(139, 107, 255, 0.35);
  transform: translateX(3px);
}

.vera-wallet-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vera-wallet-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vera-wallet-text h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.vera-wallet-text p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #8f88a8;
}

.vera-wallet-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.vera-wallet-badge.detected {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.vera-wallet-badge.install {
  background: rgba(255, 255, 255, 0.05);
  color: #b9a8ff;
  border: 1px solid rgba(139, 107, 255, 0.2);
}

.vera-wallet-modal-footer {
  padding: 14px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 12px;
  color: #7e7796;
}

.vera-wallet-modal-footer a {
  color: #8b6bff;
  text-decoration: none;
}

.vera-wallet-modal-footer a:hover {
  text-decoration: underline;
}

/* ==============================================================================
   MOBILE: HIDE THE HEADER WALLET BUTTON (THE MENU ALREADY HAS ONE)
   ============================================================================== */
@media (max-width: 1080px) {
  /* Hide only the loose wallet buttons in the header/navbar */
  .navbar .nav-actions,
  .header-container > .vera-wallet-btn,
  .header-container .nav-actions,
  .nav-container > .nav-actions,
  .nav-container > .vera-wallet-btn,
  header > .header-container > .vera-wallet-btn,
  header > .vera-wallet-btn,
  header .vera-wallet-btn:not(.mobile-drawer-footer *),
  .navbar .vera-wallet-btn:not(.mobile-drawer-footer *) {
    display: none !important;
  }

  /* Make sure the wallet button INSIDE the mobile drawer is shown */
  .mobile-drawer-footer .vera-wallet-btn {
    display: inline-flex !important;
    width: 100% !important;
    justify-content: center !important;
  }
}


/* Safety guard: never allow any wallet button to render as a loose full-width element in document body */
body > .vera-wallet-btn,
#vera-page-content > .vera-wallet-btn,
body > div > .vera-wallet-btn:not(.header-desktop-actions *):not(.mobile-drawer-footer *):not(.gate-btn-primary) {
  display: none !important;
}
