/* Shared split-action wallet control. Existing IDs/classes keep wallet logic intact. */
#topWalletChip.wallet-chip-split,
#topWalletChip.wallet-chip-split.disconnected{
  position:relative !important;
  width:auto !important;
  min-width:224px !important;
  max-width:272px !important;
  height:48px !important;
  min-height:48px !important;
  padding:0 !important;
  gap:0 !important;
  overflow:hidden !important;
  isolation:isolate !important;
  border:1px solid rgba(47,211,255,.72) !important;
  border-radius:14px !important;
  background:linear-gradient(105deg,rgba(5,18,37,.98),rgba(8,26,49,.96)) !important;
  color:#eaf7ff !important;
  box-shadow:inset 0 0 0 1px rgba(47,211,255,.06),0 10px 28px rgba(0,0,0,.24) !important;
  display:grid !important;
  grid-template-columns:52px minmax(0,1fr) 34px !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  text-align:left !important;
  text-decoration:none !important;
  transform:none !important;
  animation:none !important;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease !important;
}

#topWalletChip.wallet-chip-split::before,
#topWalletChip.wallet-chip-split::after{
  display:none !important;
  content:none !important;
}

#topWalletChip.wallet-chip-split:hover{
  border-color:#55f5c2 !important;
  background:linear-gradient(105deg,rgba(7,24,43,.99),rgba(9,32,57,.98)) !important;
  box-shadow:inset 0 0 0 1px rgba(85,245,194,.10),0 0 24px rgba(47,211,255,.13),0 12px 30px rgba(0,0,0,.28) !important;
}

#topWalletChip.wallet-chip-split:focus-visible{
  outline:2px solid #55f5c2 !important;
  outline-offset:3px !important;
}

#topWalletChip.wallet-chip-split .wallet-chip-icon{
  position:relative !important;
  min-width:0 !important;
  display:grid !important;
  place-items:center !important;
  border-right:1px solid rgba(47,211,255,.42) !important;
  background:linear-gradient(145deg,rgba(47,211,255,.11),rgba(85,245,194,.035)) !important;
}

#topWalletChip.wallet-chip-split .wallet-ico{
  width:27px !important;
  height:27px !important;
  min-width:27px !important;
  display:grid !important;
  place-items:center !important;
  color:#2fd3ff !important;
  filter:drop-shadow(0 0 8px rgba(47,211,255,.22)) !important;
}

#topWalletChip.wallet-chip-split .wallet-ico svg{
  width:27px !important;
  height:27px !important;
  color:inherit !important;
}

#topWalletChip.wallet-chip-split .dot{
  position:absolute !important;
  right:7px !important;
  bottom:7px !important;
  width:8px !important;
  height:8px !important;
  min-width:8px !important;
  border:2px solid #071426 !important;
  border-radius:999px !important;
  background:#55f5c2 !important;
  box-shadow:0 0 10px rgba(85,245,194,.72) !important;
}

#topWalletChip.wallet-chip-split:not(.disconnected) .dot{
  background:#2fd3ff !important;
  box-shadow:0 0 10px rgba(47,211,255,.72) !important;
}

#topWalletChip.wallet-chip-split.locked .dot{
  background:#fbd38d !important;
  box-shadow:0 0 10px rgba(251,211,141,.66) !important;
}

#topWalletChip.wallet-chip-split .wallet-chip-copy{
  min-width:0 !important;
  padding:7px 8px 6px 13px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:2px !important;
  color:inherit !important;
  line-height:1 !important;
}

#topWalletChip.wallet-chip-split #topWalletChipText{
  display:block !important;
  width:100% !important;
  overflow:hidden !important;
  color:#f3f9ff !important;
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1.15 !important;
  letter-spacing:.005em !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

#topWalletChip.wallet-chip-split .wallet-chip-sub{
  display:block !important;
  width:100% !important;
  overflow:hidden !important;
  color:#829bb8 !important;
  font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif !important;
  font-size:9px !important;
  font-weight:750 !important;
  line-height:1.15 !important;
  letter-spacing:.055em !important;
  text-overflow:ellipsis !important;
  text-transform:uppercase !important;
  white-space:nowrap !important;
}

#topWalletChip.wallet-chip-split .wallet-chip-sub::before{content:"Browser encrypted";}
#topWalletChip.wallet-chip-split:not(.disconnected) .wallet-chip-sub::before{content:"Selected wallet";}
#topWalletChip.wallet-chip-split.locked .wallet-chip-sub::before{content:"Tap to unlock";}

#topWalletChip.wallet-chip-split .chev{
  width:auto !important;
  min-width:0 !important;
  display:grid !important;
  place-items:center !important;
  color:#2fd3ff !important;
  opacity:1 !important;
}

#topWalletChip.wallet-chip-split .chev svg{
  width:18px !important;
  height:18px !important;
  transition:transform .18s ease !important;
}

#topWalletChip.wallet-chip-split:hover .chev svg{transform:translateX(2px) !important;}
#topWalletChip.wallet-chip-split[aria-busy="true"] .wallet-ico{animation:wallet-chip-pulse 1s ease-in-out infinite !important;}

@keyframes wallet-chip-pulse{
  50%{opacity:.58;filter:drop-shadow(0 0 12px rgba(85,245,194,.62));}
}

@media (max-width:1180px) and (min-width:761px){
  #topWalletChip.wallet-chip-split,
  #topWalletChip.wallet-chip-split.disconnected{
    min-width:172px !important;
    max-width:196px !important;
    grid-template-columns:46px minmax(0,1fr) 29px !important;
  }
  #topWalletChip.wallet-chip-split .wallet-chip-sub{display:none !important;}
  #topWalletChip.wallet-chip-split .wallet-chip-copy{padding-left:10px !important;}
}

@media (max-width:760px){
  body.mode-tokens .embed-meta,
  body.wallet-radar-page .embed-meta,
  body.escrow-page .embed-meta,
  body.security-page .embed-meta{
    grid-template-columns:minmax(0,1fr) auto !important;
    column-gap:10px !important;
  }
  body.mode-tokens .embed-brand,
  body.wallet-radar-page .embed-brand,
  body.escrow-page .embed-brand,
  body.security-page .embed-brand{
    width:auto !important;
    max-width:calc(100vw - 122px) !important;
    min-width:0 !important;
    height:44px !important;
    overflow:hidden !important;
  }
  body.mode-tokens .embed-brand-copy,
  body.wallet-radar-page .embed-brand-copy,
  body.escrow-page .embed-brand-copy,
  body.security-page .embed-brand-copy{
    width:auto !important;
    max-width:calc(100vw - 170px) !important;
    min-width:0 !important;
  }
  body.mode-tokens .site-slogan,
  body.wallet-radar-page .site-slogan,
  body.escrow-page .site-slogan,
  body.security-page .site-slogan{
    display:none !important;
  }
  #topWalletChip.wallet-chip-split,
  #topWalletChip.wallet-chip-split.disconnected{
    width:104px !important;
    min-width:104px !important;
    max-width:104px !important;
    height:38px !important;
    min-height:38px !important;
    grid-template-columns:38px minmax(0,1fr) !important;
    border-radius:12px !important;
  }
  #topWalletChip.wallet-chip-split .wallet-chip-icon{
    border-right:1px solid rgba(47,211,255,.34) !important;
  }
  #topWalletChip.wallet-chip-split .wallet-ico,
  #topWalletChip.wallet-chip-split .wallet-ico svg{
    width:23px !important;
    height:23px !important;
    min-width:23px !important;
  }
  #topWalletChip.wallet-chip-split .dot{
    right:5px !important;
    bottom:5px !important;
  }
  #topWalletChip.wallet-chip-split .wallet-chip-copy{
    display:flex !important;
    width:auto !important;
    padding:0 8px !important;
    justify-content:center !important;
  }
  #topWalletChip.wallet-chip-split .wallet-chip-sub,
  #topWalletChip.wallet-chip-split .chev{
    display:none !important;
  }
  #topWalletChip.wallet-chip-split #topWalletChipText{
    overflow:visible !important;
    font-size:0 !important;
    line-height:1 !important;
  }
  #topWalletChip.wallet-chip-split #topWalletChipText::before{
    color:#f3f9ff !important;
    font-size:11px !important;
    font-weight:900 !important;
    letter-spacing:.015em !important;
  }
  #topWalletChip.wallet-chip-split.disconnected #topWalletChipText::before{content:"Connect";}
  #topWalletChip.wallet-chip-split:not(.disconnected) #topWalletChipText::before{content:"Wallet";}
}

@media (prefers-reduced-motion:reduce){
  #topWalletChip.wallet-chip-split,
  #topWalletChip.wallet-chip-split *{
    animation:none !important;
    transition:none !important;
  }
}
