/* VF_SEND_WALLET_HARDFIX_V52
   Strong mobile containment + custom picker + Wallet overview removal. */

/* Wallet overview is not wanted. Hide it even if older V2 JS re-injects it. */
body[data-section="wallet"] #vfp2WalletSummary,
body[data-section="wallet"] .vfp2-wallet-summary{
  display:none !important;
}

/* Remove any prior V5 picker UI if an older loader is still cached. */
body[data-section="send"] #vfMobileAssetPickerV5,
body[data-section="send"] #vfMobileAssetSheetV5{
  display:none !important;
}

@media(max-width:930px){
  html,
  body[data-section="send"]{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  body[data-section="send"],
  body[data-section="send"] *{
    box-sizing:border-box;
  }

  body[data-section="send"] .vf-app,
  body[data-section="send"] .vf-main,
  body[data-section="send"] .vf-content,
  body[data-section="send"] .vf-page,
  body[data-section="send"] .vf-grid,
  body[data-section="send"] .vf-grid.two,
  body[data-section="send"] .form-card,
  body[data-section="send"] .glass{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  body[data-section="send"] .vf-main{
    overflow-x:hidden !important;
  }

  body[data-section="send"] .vf-content,
  body[data-section="send"] .vf-page{
    overflow-x:clip !important;
  }

  body[data-section="send"] .vf-grid.two{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:14px !important;
  }

  body[data-section="send"] .form-card{
    overflow:visible !important;
  }

  body[data-section="send"] .control,
  body[data-section="send"] .vf-send-amount,
  body[data-section="send"] .vf-send-modebar,
  body[data-section="send"] .vf-send-modes,
  body[data-section="send"] .vf-send-amount-control,
  body[data-section="send"] #sendRecipient,
  body[data-section="send"] #sendAmountEntry{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  /* Old native/rich selectors are hidden only after V5.2 JS is confirmed ready. */
  body[data-section="send"].vf-v52-picker-ready #vfSendNativeSelectWrap,
  body[data-section="send"].vf-v52-picker-ready #sendAsset,
  body[data-section="send"].vf-v52-picker-ready #vfSendPicker{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    min-width:1px !important;
    max-width:1px !important;
    overflow:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    clip:rect(0 0 0 0) !important;
    clip-path:inset(50%) !important;
    border:0 !important;
    padding:0 !important;
    margin:0 !important;
  }

  body[data-section="send"].vf-v52-picker-ready #vfMobileAssetPickerV52{
    display:flex !important;
  }

  /* Force the amount section to FIT the mobile viewport. */
  body[data-section="send"] .vf-send-modebar{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 68px !important;
    align-items:center !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  body[data-section="send"] .vf-send-modes{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:0 !important;
    overflow:hidden !important;
  }

  body[data-section="send"] .vf-send-mode{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    padding-left:8px !important;
    padding-right:8px !important;
  }

  body[data-section="send"] #sendMax,
  body[data-section="send"] .vf-send-max{
    position:static !important;
    inset:auto !important;
    width:68px !important;
    min-width:68px !important;
    max-width:68px !important;
    margin:0 !important;
    transform:none !important;
  }

  body[data-section="send"] .vf-send-amount-control{
    position:static !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 58px !important;
    align-items:center !important;
    gap:7px !important;
    overflow:hidden !important;
  }

  body[data-section="send"] .vf-send-amount-control input,
  body[data-section="send"] #sendAmountEntry{
    position:static !important;
    left:auto !important;
    right:auto !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    padding-left:12px !important;
    padding-right:8px !important;
    transform:none !important;
  }

  body[data-section="send"] .vf-send-amount-control strong,
  body[data-section="send"] #sendAmountUnit{
    position:static !important;
    inset:auto !important;
    width:58px !important;
    min-width:58px !important;
    max-width:58px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    text-align:center !important;
    transform:none !important;
  }

  body[data-section="send"] .vf-send-equivalent,
  body[data-section="send"] #sendAmountEquivalent{
    width:100% !important;
    max-width:100% !important;
    overflow-wrap:anywhere !important;
  }
}

@media(min-width:931px){
  #vfMobileAssetPickerV52,
  #vfMobileAssetSheetV52{
    display:none !important;
  }
}

/* ---------- V5.2 mobile asset trigger ---------- */

#vfMobileAssetPickerV52{
  width:100%;
  min-height:70px;
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(47,63,102,.12);
  border-radius:16px;
  color:#162036;
  background:linear-gradient(145deg,#fff,#f7f9fd);
  box-shadow:0 9px 24px rgba(36,49,84,.065);
  text-align:left;
  cursor:pointer;
}

#vfMobileAssetPickerV52 .vf-v52-main{
  min-width:0;
  display:flex;
  align-items:center;
  gap:11px;
}

#vfMobileAssetPickerV52 .vf-v52-logo{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:block;
  border-radius:50%;
  background:#fff;
  box-shadow:0 7px 16px rgba(35,48,84,.11);
}

#vfMobileAssetPickerV52 .vf-v52-copy{
  min-width:0;
}

#vfMobileAssetPickerV52 .vf-v52-copy strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#142038;
  font-size:14px;
  font-weight:950;
  letter-spacing:-.02em;
}

#vfMobileAssetPickerV52 .vf-v52-copy small{
  display:block;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#7b869b;
  font-size:10px;
  font-weight:750;
}

#vfMobileAssetPickerV52 .vf-v52-chevron{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 34px;
  border-radius:11px;
  color:#645ad4;
  background:rgba(101,90,213,.07);
  font-size:18px;
}

/* ---------- V5.2 bottom sheet ---------- */

#vfMobileAssetSheetV52{
  position:fixed;
  z-index:2147483600;
  inset:0;
  display:none;
  align-items:flex-end;
  justify-content:center;
  background:rgba(11,18,35,.39);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
}

#vfMobileAssetSheetV52.open{
  display:flex;
}

#vfMobileAssetSheetV52 .vf-v52-sheet{
  width:100%;
  max-height:min(82dvh,760px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:10px 12px max(14px,env(safe-area-inset-bottom));
  border:1px solid rgba(255,255,255,.88);
  border-radius:24px 24px 0 0;
  background:rgba(250,251,254,.99);
  box-shadow:0 -24px 70px rgba(24,34,67,.24);
  animation:vfV52In .2s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes vfV52In{
  from{transform:translateY(18px);opacity:.72}
  to{transform:none;opacity:1}
}

#vfMobileAssetSheetV52 .vf-v52-grab{
  width:42px;
  height:4px;
  margin:1px auto 10px;
  border-radius:999px;
  background:#d6dae4;
}

#vfMobileAssetSheetV52 .vf-v52-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:3px 3px 10px;
}

#vfMobileAssetSheetV52 .vf-v52-head h2{
  margin:0;
  color:#121b30;
  font-size:20px;
  font-weight:950;
  letter-spacing:-.035em;
}

#vfMobileAssetSheetV52 .vf-v52-head p{
  margin:3px 0 0;
  color:#808a9e;
  font-size:10px;
  line-height:1.4;
}

#vfMobileAssetSheetV52 .vf-v52-close{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:1px solid rgba(47,63,102,.09);
  border-radius:12px;
  color:#667189;
  background:#fff;
  font-size:22px;
  cursor:pointer;
}

#vfMobileAssetSheetV52 .vf-v52-search-wrap{
  padding:0 2px 10px;
}

#vfMobileAssetSheetV52 .vf-v52-search{
  width:100%;
  height:48px;
  padding:0 14px;
  border:1px solid rgba(47,63,102,.11);
  border-radius:14px;
  outline:0;
  color:#172137;
  background:#f5f7fb;
  font:750 16px/1 Inter,Arial,sans-serif;
}

#vfMobileAssetSheetV52 .vf-v52-list{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:2px;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

#vfMobileAssetSheetV52 .vf-v52-row{
  width:100%;
  min-height:74px;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:10px 9px;
  margin-bottom:5px;
  border:1px solid rgba(50,65,101,.075);
  border-radius:16px;
  color:#172137;
  background:#fff;
  box-shadow:0 5px 16px rgba(35,48,84,.04);
  text-align:left;
  cursor:pointer;
}

#vfMobileAssetSheetV52 .vf-v52-row.selected{
  border-color:rgba(101,88,218,.22);
  background:linear-gradient(145deg,rgba(240,250,252,.94),rgba(246,241,255,.95));
  box-shadow:0 0 0 3px rgba(101,88,218,.045);
}

#vfMobileAssetSheetV52 .vf-v52-row:disabled{
  opacity:.48;
  cursor:not-allowed;
}

#vfMobileAssetSheetV52 .vf-v52-row-logo{
  width:44px;
  height:44px;
  display:block;
  border-radius:50%;
  background:#fff;
  box-shadow:0 7px 15px rgba(35,48,84,.10);
}

#vfMobileAssetSheetV52 .vf-v52-row-main{
  min-width:0;
}

#vfMobileAssetSheetV52 .vf-v52-row-main strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#172137;
  font-size:14px;
  font-weight:950;
}

#vfMobileAssetSheetV52 .vf-v52-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:5px;
}

#vfMobileAssetSheetV52 .vf-v52-network{
  display:inline-flex;
  align-items:center;
  min-height:21px;
  padding:3px 7px;
  border-radius:999px;
  color:#5f6981;
  background:#f0f3f8;
  font-size:9px;
  font-weight:900;
}

#vfMobileAssetSheetV52 .vf-v52-row-bal{
  min-width:92px;
  max-width:126px;
  text-align:right;
}

#vfMobileAssetSheetV52 .vf-v52-row-bal strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#172137;
  font-size:11px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}

#vfMobileAssetSheetV52 .vf-v52-row-bal small{
  display:block;
  margin-top:4px;
  color:#8a93a6;
  font-size:8px;
  font-weight:750;
}

#vfMobileAssetSheetV52 .vf-v52-empty{
  padding:34px 18px;
  color:#7d879b;
  text-align:center;
  font-size:12px;
}

@media(min-width:700px) and (max-width:930px){
  #vfMobileAssetSheetV52{
    align-items:center;
    padding:18px;
  }

  #vfMobileAssetSheetV52 .vf-v52-sheet{
    max-width:620px;
    border-radius:24px;
  }
}
