/* ---------------------------
   Wallet chooser modal
---------------------------- */
.vb-wc-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 9999;
  padding: 16px;
}

.vb-wc-modal{
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(14,20,34,.96), rgba(10,15,24,.94));
  box-shadow: var(--shadow);
  padding: 18px;
}

.vb-wc-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}
.vb-wc-title{
  font-weight: 800;
  font-size: 16px;
  color: rgba(233,238,247,.95);
}
.vb-wc-sub{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(166,177,197,.92);
  line-height: 1.45;
}
.vb-wc-close{
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: rgba(233,238,247,.90);
  cursor:pointer;
}

.vb-wc-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.vb-wc-btn{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  padding: 14px;
  cursor:pointer;
  text-align:left;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.vb-wc-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,.40);
  border-color: rgba(242,193,100,.18);
  background: rgba(255,255,255,.04);
}
.vb-wc-btn:active{ transform: translateY(0); }

.vb-wc-row{
  display:flex;
  align-items:center;
  gap: 12px;
}

.vb-wc-icon{
  width: 40px; height: 40px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  overflow:hidden;
}

.vb-wc-icon img{
  width: 24px; height: 24px;
  display:block;
}

.vb-wc-name{
  font-weight: 800;
  color: rgba(233,238,247,.95);
  font-size: 14px;
}
.vb-wc-note{
  margin-top: 3px;
  font-size: 12px;
  color: rgba(166,177,197,.92);
}

.vb-wc-foot{
  margin-top: 12px;
  font-size: 12px;
  color: rgba(166,177,197,.85);
}
.vb-wc-foot code{
  font-size: 11px;
  color: rgba(233,238,247,.85);
}
.wallet-selector__tips {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.7);
}

.wallet-selector__tips .muted {
  opacity: 0.75;
}

@media (max-width: 460px){
  .vb-wc-grid{ grid-template-columns: 1fr; }
}

/* Wallet button – connecting state */
#headerWalletBtn[data-state="connecting"],
.js-wallet-btn[data-state="connecting"] {
  pointer-events: none;
  animation: walletPulse 1.4s ease-in-out infinite;
  background: rgba(212, 165, 71, 0.15);
  border-color: rgba(212, 165, 71, 0.6);
  color: #f0c46a;
}

@keyframes walletPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 165, 71, 0.35);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(212, 165, 71, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 165, 71, 0);
  }
}

/* Presale connect button – connecting state */
#btnConnectWallet[data-state="connecting"] {
  pointer-events: none;
  animation: walletPulse 1.4s ease-in-out infinite;
  background: rgba(212, 165, 71, 0.15);
  border-color: rgba(212, 165, 71, 0.6);
  color: #f0c46a;
}


/* ---------------------------
   Presale card (right card)
---------------------------- */

.presale-card{
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 20px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 16%, rgba(242,193,100,.10), transparent 52%),
    radial-gradient(circle at 70% 30%, rgba(108,184,255,.08), transparent 55%),
    rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.presale-countdown,
.presale-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-align:center;
}

.presale-countdown span{ color: rgba(166,177,197,.9); font-size: 13px; }
.presale-countdown strong{ font-size: 16px; letter-spacing: .3px; }

.presale-stage{
  margin-top: -6px;
}
.presale-stage span{
  display:inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(233,238,247,.92);
  font-weight: 700;
  font-size: 13px;
}

.presale-progress{ text-align:center; }
.progress-track{
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212,165,71,.95), rgba(242,193,100,.95));
  transition: width .9s ease;
}
.progress-meta{
  margin-top: 8px;
  display:flex;
  justify-content:center;
  gap:8px;
  color: rgba(166,177,197,.9);
  font-size: 13px;
}
#progressPercent{ color: rgba(233,238,247,.92); font-weight: 800; }

.presale-price{
  text-align:center;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.presale-price strong{ font-size: 18px; }
.presale-price .price-sub{
  margin-top: 6px;
  color: rgba(166,177,197,.92);
  font-size: 13px;
}

/* Non-clickable CTA strip (replaces the dead button) */
.ps-cta-strip{
  text-align:center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(242,193,100,.22);
  background: rgba(212,165,71,.12);
  color: rgba(242,193,100,.95);
  font-weight: 800;
  letter-spacing: .2px;
  user-select: none;
}

/* Action button group */
.presale-actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
}

/* Scoped buttons to avoid conflicts with .btn system */
.ps-btn{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
  color: rgba(233,238,247,.92);
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.ps-btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }

.ps-btn--primary{
  background: linear-gradient(180deg, rgba(242,193,100,.95), rgba(212,165,71,.92));
  border-color: rgba(242,193,100,.35);
  color: #0B0E12;
}

.ps-btn--ghost{
  background: rgba(255,255,255,.02);
}

/* Disabled states look intentional */
.ps-btn:disabled{
  opacity: .50;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}



/* ========= Modal Backdrop ========= */
.vb-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.65);
}

.vb-modal-backdrop.is-open { display: flex; }

.vb-modal {
  width: min(520px, 100%);
  max-height: min(86vh, 760px);
  background: #0b0f14;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  display: flex;
  flex-direction: column;
}

.vb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.vb-modal-title { font-weight: 600; letter-spacing: .2px; }
.vb-modal-close {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.85);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}
.vb-modal-close:hover { background: rgba(255,255,255,.06); }

.vb-modal-body {
  padding: 14px;
  flex: 1;                    /* IMPORTANT: allow body to take remaining height */
  overflow-y: auto;           /* allow vertical scroll */
  overflow-x: hidden;         /* prevent sideways scroll */
  -webkit-overflow-scrolling: touch;
}


/* ========= Flow / Carousel ========= */
.vb-flow-viewport {
  width: 100%;
  overflow: hidden;
}

.vb-flow-track {
  display: flex;
  width: auto; /* 5 pages */
  transform: translateX(0);
  transition: transform 420ms ease;
}

.vb-flow-page {
  width: 100%;
  flex: 0 0 100%;
  padding: 2px;
}

.vb-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 16px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vb-h { margin: 0; font-size: 16px; }
.vb-p { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.78); }

.vb-nav {
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.vb-btn {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  color: rgba(255,255,255,.92);
  cursor: pointer;
  font-weight: 600;
}

.vb-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.vb-btn-primary {
  border-color: rgba(212,165,71,.55);
  background: #d4a547;
  color: #000;
}

.vb-btn-ghost {
  background: rgba(255,255,255,.04);
}

.vb-btn-danger {
  background: rgba(255,80,80,.14);
  border-color: rgba(255,80,80,.45);
}

.vb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vb-label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
}

.vb-select, .vb-input {
  width: 100%;
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  outline: none;
}

/* --- Fix dropdown readability (native select list) --- */
.vb-select{
  color-scheme: dark;              /* helps Chrome/Edge render the opened list correctly */
  background-color: rgba(255,255,255,.03);
}

/* Some browsers honor these for the opened list */
.vb-select option{
  background-color: #0b0f14;       /* dark list background */
  color: rgba(255,255,255,.92);    /* readable option text */
}

/* If a browser applies a light theme anyway, keep selected text readable */
.vb-select:focus{
  border-color: rgba(212,165,71,.45);
}


.vb-inputs { display: flex; flex-direction: column; gap: 10px; }

.vb-mini {
  font-size: 12px;
  color: rgba(255,255,255,.7);
}

.vb-hint {
  font-size: 12px;
  margin-top: 6px;
  color: rgba(255,255,255,.75);
}

.vb-hint-warn { color: rgba(255,90,90,.95); }

.vb-review-lines { display: flex; flex-direction: column; gap: 8px; }
.vb-review-box {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 13px;
  line-height: 1.5;
}

.vb-check { display:flex; align-items:center; gap:8px; font-size:13px; color:rgba(255,255,255,.82); }


/* ========= Close Confirmation ========= */
.vb-confirm {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.6);
}

.vb-confirm.is-open { display: flex; }

.vb-confirm-card {
  width: min(420px, 100%);
  background: #0b0f14;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vb-confirm-actions {
  display: flex;
  gap: 10px;
}

/* Mobile */
@media (max-width: 420px) {
  .vb-modal-body { padding: 12px; }
  .vb-card { padding: 14px; }
  .vb-confirm-actions { flex-direction: column; }
}
