﻿/*
  Final page theme sync.
  Loaded after page-local CSS so active public pages keep one ZerpSwap visual system.
*/
:root{
  --zs-bg:#07080c;
  --zs-panel:#0f121a;
  --zs-panel-2:#0b0e15;
  --zs-border:#222838;
  --zs-border-soft:rgba(47,211,255,.14);
  --zs-text:#eef1ff;
  --zs-muted:#a8b0c7;
  --zs-primary:var(--partner-primary,#55f5c2);
  --zs-primary-rgb:var(--partner-primary-rgb,85,245,194);
  --zs-cyan:#2fd3ff;
}

html,body{
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124,58,237,.18), rgba(0,0,0,0)),
    radial-gradient(circle at 14% 0, rgba(var(--zs-primary-rgb),.10), transparent 32%),
    var(--zs-bg) !important;
  color:var(--zs-text) !important;
}

body.mode-tokens .app,
body.wallet-radar-page .app,
body.escrow-page .app,
body.security-page .app{
  width:100% !important;
  max-width:none !important;
  margin:0 auto !important;
  padding:10px 10px 22px !important;
  display:grid !important;
  gap:14px !important;
  min-width:0 !important;
}

body.mode-tokens .embed-meta,
body.wallet-radar-page .embed-meta,
body.escrow-page .embed-meta,
body.security-page .embed-meta{
  width:100% !important;
  min-height:88px !important;
  margin:0 !important;
  padding:8px 10px !important;
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:12px !important;
  border:1px solid rgba(47,211,255,.10) !important;
  border-radius:18px !important;
  background:linear-gradient(90deg,rgba(5,10,20,.78),rgba(7,13,25,.48)) !important;
  box-shadow:0 10px 30px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.035) !important;
  overflow:visible !important;
  box-sizing:border-box !important;
}

body.mode-tokens .embed-brand,
body.wallet-radar-page .embed-brand,
body.escrow-page .embed-brand,
body.security-page .embed-brand{
  min-width:220px !important;
  max-width:360px !important;
  flex:0 1 auto !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  color:#fff !important;
  text-decoration:none !important;
  overflow:hidden !important;
}

body.mode-tokens .embed-logo-wrap,
body.mode-tokens .embed-logo,
body.wallet-radar-page .embed-logo-wrap,
body.wallet-radar-page .embed-logo,
body.escrow-page .embed-logo-wrap,
body.escrow-page .embed-logo,
body.security-page .embed-logo-wrap,
body.security-page .embed-logo{
  width:60px !important;
  height:60px !important;
  flex:0 0 60px !important;
  max-width:60px !important;
  max-height:60px !important;
  border-radius:17px !important;
  object-fit:cover !important;
  background:transparent !important;
  box-shadow:none !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:248px !important;
  max-width:248px !important;
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:5px !important;
  overflow:hidden !important;
}

body.mode-tokens .embed-brand-name,
body.wallet-radar-page .embed-brand-name,
body.escrow-page .embed-brand-name,
body.security-page .embed-brand-name,
html[data-partner="quantzilla"] .embed-brand-name{
  width:auto !important;
  min-width:0 !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-family:"Arial Black", Impact, system-ui, sans-serif !important;
  font-size:clamp(30px,2.35vw,38px) !important;
  line-height:1 !important;
  font-weight:1000 !important;
  letter-spacing:.025em !important;
  text-transform:uppercase !important;
  color:#fff !important;
  text-shadow:0 1px 0 rgba(0,0,0,.35) !important;
}

html[data-partner="zerpswap"] body.mode-tokens .site-slogan,
html:not([data-partner]) body.mode-tokens .site-slogan,
html[data-partner="zerpswap"] body.wallet-radar-page .site-slogan,
html:not([data-partner]) body.wallet-radar-page .site-slogan,
html[data-partner="zerpswap"] body.escrow-page .site-slogan,
html:not([data-partner]) body.escrow-page .site-slogan,
html[data-partner="zerpswap"] body.security-page .site-slogan,
html:not([data-partner]) body.security-page .site-slogan{
  display:inline-flex !important;
  position:relative !important;
  align-items:center !important;
  width:max-content !important;
  max-width:230px !important;
  padding:5px 10px 5px 24px !important;
  border:1px solid rgba(var(--zs-primary-rgb),.38) !important;
  border-radius:999px !important;
  background:linear-gradient(90deg,rgba(var(--zs-primary-rgb),.14),rgba(47,211,255,.08),rgba(148,73,255,.12)) !important;
  color:#dfffee !important;
  font-family:"Arial Black", Impact, system-ui, sans-serif !important;
  font-size:12px !important;
  line-height:1 !important;
  font-weight:1000 !important;
  letter-spacing:.035em !important;
  text-transform:uppercase !important;
  text-shadow:0 0 14px rgba(var(--zs-primary-rgb),.38) !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

html[data-partner="zerpswap"] body .site-slogan::before,
html:not([data-partner]) body .site-slogan::before{
  content:"" !important;
  position:absolute !important;
  left:9px !important;
  top:50% !important;
  width:7px !important;
  height:7px !important;
  border-radius:999px !important;
  background:var(--zs-primary) !important;
  transform:translateY(-50%) !important;
  box-shadow:0 0 12px var(--zs-primary),0 0 24px rgba(47,211,255,.45) !important;
}

html[data-partner="quantzilla"] body .site-slogan{
  display:none !important;
}

body.mode-tokens .tabbar,
body.wallet-radar-page .tabbar,
body.escrow-page .tabbar,
body.security-page .tabbar{
  min-width:280px !important;
  flex:1 1 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
}

body.mode-tokens .tab-btn,
body.wallet-radar-page .tab-btn,
body.escrow-page .tab-btn,
body.security-page .tab-btn{
  flex:0 0 auto !important;
  min-width:96px !important;
  min-height:34px !important;
  padding:8px 13px !important;
  border-radius:999px !important;
  border:1px solid rgba(47,211,255,.22) !important;
  background:rgba(6,17,31,.82) !important;
  color:#dcecff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-family:"Arial Black", Impact, system-ui, sans-serif !important;
  font-size:12px !important;
  line-height:1 !important;
  font-weight:900 !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
  text-decoration:none !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.045) !important;
  white-space:nowrap !important;
}

body.mode-tokens .tab-btn.active,
body.wallet-radar-page .tab-btn.active,
body.escrow-page .tab-btn.active,
body.security-page .tab-btn.active{
  border-color:rgba(var(--zs-primary-rgb),.55) !important;
  background:linear-gradient(180deg,rgba(var(--zs-primary-rgb),.22),rgba(6,22,37,.92)) !important;
  color:#f8fffd !important;
  box-shadow:0 0 0 1px rgba(var(--zs-primary-rgb),.16) inset,0 8px 20px rgba(var(--zs-primary-rgb),.13) !important;
}

body.mode-tokens .header-controls,
body.wallet-radar-page .header-controls,
body.escrow-page .header-controls,
body.security-page .header-controls{
  min-width:0 !important;
  flex:0 1 auto !important;
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
}

body.mode-tokens .header-search-wrap,
body.wallet-radar-page .header-search-wrap,
body.escrow-page .header-search-wrap,
body.security-page .header-search-wrap{
  min-width:260px !important;
  width:min(28vw,340px) !important;
  max-width:340px !important;
  height:40px !important;
  display:flex !important;
  align-items:center !important;
  border:1px solid rgba(47,211,255,.32) !important;
  border-radius:14px !important;
  background:#061325 !important;
  overflow:hidden !important;
}

body.mode-tokens .top-wallet-chip,
body.wallet-radar-page .top-wallet-chip,
body.escrow-page .top-wallet-chip,
body.security-page .top-wallet-chip{
  position:relative !important;
  min-height:40px !important;
  height:40px !important;
  min-width:0 !important;
  padding:0 12px !important;
  border-radius:12px !important;
  border:1px solid rgba(47,211,255,.32) !important;
  background:#0b182e !important;
  color:#d7e9fb !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  text-decoration:none !important;
  font:850 13px/1.1 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif !important;
  box-shadow:none !important;
  white-space:nowrap !important;
}

body.wallet-radar-page .stalk-panel,
body.escrow-page .escrow-card,
body.security-page .card,
body.security-page .hero-card,
body.security-page .trust-stat{
  border-color:rgba(47,211,255,.14) !important;
  background:linear-gradient(180deg,rgba(15,18,26,.94),rgba(8,12,20,.98)) !important;
  box-shadow:0 16px 42px rgba(0,0,0,.35) !important;
}

body.wallet-radar-page .stalk-profile,
body.escrow-page .escrow-hero,
body.security-page .security-hero{
  border-color:rgba(var(--zs-primary-rgb),.20) !important;
  background:radial-gradient(circle at 10% 0,rgba(var(--zs-primary-rgb),.18),transparent 35%),linear-gradient(135deg,rgba(15,18,26,.98),rgba(8,12,20,.99)) !important;
  box-shadow:0 16px 42px rgba(0,0,0,.42),0 0 28px rgba(47,211,255,.06) !important;
}

@media(max-width:1180px){
  body.mode-tokens .embed-meta,
  body.wallet-radar-page .embed-meta,
  body.escrow-page .embed-meta,
  body.security-page .embed-meta{
    flex-wrap:wrap !important;
  }
  body.mode-tokens .tabbar,
  body.wallet-radar-page .tabbar,
  body.escrow-page .tabbar,
  body.security-page .tabbar{
    order:3 !important;
    flex-basis:100% !important;
    justify-content:flex-start !important;
    overflow-x:auto !important;
    scrollbar-width:none !important;
  }
  body.mode-tokens .tabbar::-webkit-scrollbar,
  body.wallet-radar-page .tabbar::-webkit-scrollbar,
  body.escrow-page .tabbar::-webkit-scrollbar,
  body.security-page .tabbar::-webkit-scrollbar{display:none !important;}
  body.mode-tokens .header-controls,
  body.wallet-radar-page .header-controls,
  body.escrow-page .header-controls,
  body.security-page .header-controls{order:2 !important;flex:1 1 auto !important;}
}

@media(max-width:920px){
  body.mode-tokens .embed-meta,
  body.wallet-radar-page .embed-meta,
  body.escrow-page .embed-meta,
  body.security-page .embed-meta{
    position:sticky !important;
    top:0 !important;
    z-index:80 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:"brand wallet" "tabs tabs" !important;
    min-height:108px !important;
    padding:8px 0 !important;
    gap:7px !important;
    border-radius:16px !important;
    background:linear-gradient(180deg,rgba(4,12,25,.98),rgba(4,12,25,.86)) !important;
    backdrop-filter:blur(14px) !important;
  }
  body.mode-tokens .embed-brand,
  body.wallet-radar-page .embed-brand,
  body.escrow-page .embed-brand,
  body.security-page .embed-brand{
    grid-area:brand !important;
    min-width:0 !important;
    max-width:calc(100vw - 70px) !important;
    height:54px !important;
    gap:9px !important;
  }
  body.mode-tokens .embed-logo-wrap,
  body.mode-tokens .embed-logo,
  body.wallet-radar-page .embed-logo-wrap,
  body.wallet-radar-page .embed-logo,
  body.escrow-page .embed-logo-wrap,
  body.escrow-page .embed-logo,
  body.security-page .embed-logo-wrap,
  body.security-page .embed-logo{
    width:44px !important;
    height:44px !important;
    flex-basis:44px !important;
    max-width:44px !important;
    max-height:44px !important;
    border-radius:13px !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:min(244px,calc(100vw - 108px)) !important;
    max-width:min(244px,calc(100vw - 108px)) !important;
  }
  body.mode-tokens .embed-brand-name,
  body.wallet-radar-page .embed-brand-name,
  body.escrow-page .embed-brand-name,
  body.security-page .embed-brand-name,
  html[data-partner="quantzilla"] .embed-brand-name{
    font-size:21px !important;
  }
  html[data-partner="zerpswap"] body .site-slogan,
  html:not([data-partner]) body .site-slogan{
    max-width:min(210px,calc(100vw - 122px)) !important;
    padding:4px 8px 4px 18px !important;
    font-size:9px !important;
    letter-spacing:.035em !important;
  }
  body.mode-tokens .tabbar,
  body.wallet-radar-page .tabbar,
  body.escrow-page .tabbar,
  body.security-page .tabbar{
    grid-area:tabs !important;
    order:0 !important;
    width:100% !important;
    min-width:0 !important;
    flex-basis:auto !important;
    display:flex !important;
    justify-content:stretch !important;
    gap:5px !important;
    overflow:hidden !important;
    margin-top:3px !important;
  }
  body.mode-tokens .tab-btn,
  body.wallet-radar-page .tab-btn,
  body.escrow-page .tab-btn,
  body.security-page .tab-btn{
    flex:1 1 0 !important;
    min-width:0 !important;
    min-height:31px !important;
    padding:7px 5px !important;
    font-size:10px !important;
    letter-spacing:.03em !important;
  }
  body.mode-tokens .header-controls,
  body.wallet-radar-page .header-controls,
  body.escrow-page .header-controls,
  body.security-page .header-controls{
    grid-area:wallet !important;
    order:0 !important;
    width:auto !important;
    flex-basis:auto !important;
    display:flex !important;
    gap:0 !important;
  }
  body.mode-tokens .header-search-wrap,
  body.wallet-radar-page .header-search-wrap,
  body.escrow-page .header-search-wrap,
  body.security-page .header-search-wrap{
    display:none !important;
  }
  body.mode-tokens .top-wallet-chip,
  body.wallet-radar-page .top-wallet-chip,
  body.escrow-page .top-wallet-chip,
  body.security-page .top-wallet-chip{
    width:38px !important;
    min-width:38px !important;
    height:34px !important;
    min-height:34px !important;
    padding:0 !important;
    border-radius:11px !important;
    gap:0 !important;
  }
  body.mode-tokens .top-wallet-chip #topWalletChipText,
  body.mode-tokens .top-wallet-chip .chev,
  body.wallet-radar-page .top-wallet-chip #topWalletChipText,
  body.wallet-radar-page .top-wallet-chip .chev,
  body.escrow-page .top-wallet-chip #topWalletChipText,
  body.escrow-page .top-wallet-chip .chev,
  body.security-page .top-wallet-chip #topWalletChipText,
  body.security-page .top-wallet-chip .chev{
    display:none !important;
  }
}

/* Stalk had an old mobile scroll workaround that stretched the shared header. */
@media(max-width:920px){
  body.stalk-page .app{
    min-height:0 !important;
    height:auto !important;
    display:grid !important;
    align-content:start !important;
  }
  body.stalk-page .embed-meta{
    align-content:start !important;
    height:auto !important;
    max-height:none !important;
  }
}

/* Stalk desktop split: wallet data left, live history right. */
body.stalk-page .stalk-shell{
  width:min(1320px,calc(100vw - 20px)) !important;
  max-width:1320px !important;
  margin:0 auto 48px !important;
  display:grid !important;
  gap:12px !important;
}
body.stalk-page .stalk-content-grid{
  display:grid !important;
  grid-template-columns:minmax(0, .92fr) minmax(390px, .78fr) !important;
  gap:14px !important;
  align-items:start !important;
  min-width:0 !important;
}
body.stalk-page .stalk-left-column{
  display:grid !important;
  gap:12px !important;
  min-width:0 !important;
}
body.stalk-page .stalk-history-panel{
  position:sticky !important;
  top:106px !important;
  min-height:520px !important;
  max-height:calc(100vh - 124px) !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
body.stalk-page .stalk-history-panel .history-list{
  flex:1 1 auto !important;
  overflow:auto !important;
  min-height:0 !important;
  padding-bottom:10px !important;
}
body.stalk-page .stalk-panel-subtitle{
  margin-top:4px !important;
  color:#91aeca !important;
  font-size:12px !important;
  font-weight:800 !important;
  letter-spacing:.02em !important;
}
body.stalk-page .stalk-main-tabs{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
@media(max-width:980px){
  body.stalk-page .stalk-content-grid{
    grid-template-columns:1fr !important;
  }
  body.stalk-page .stalk-history-panel{
    position:relative !important;
    top:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  body.stalk-page .stalk-history-panel .history-list{
    overflow:visible !important;
  }
}

/* Stretch Stalk history to align with the main wallet content instead of ending early. */
@media(min-width:981px){
  body.stalk-page .stalk-content-grid{
    align-items:stretch !important;
  }
  body.stalk-page .stalk-history-panel{
    position:relative !important;
    top:auto !important;
    align-self:stretch !important;
    height:100% !important;
    min-height:680px !important;
    max-height:none !important;
  }
  body.stalk-page .stalk-left-column{
    align-self:stretch !important;
  }
}

/* Corrected Stalk history height: taller visual box, internal scroll, no full-list page stretch. */
@media(min-width:981px){
  body.stalk-page .stalk-content-grid{
    align-items:start !important;
  }
  body.stalk-page .stalk-left-column{
    align-self:start !important;
  }
  body.stalk-page .stalk-history-panel{
    position:relative !important;
    top:auto !important;
    align-self:start !important;
    height:860px !important;
    min-height:760px !important;
    max-height:860px !important;
    overflow:hidden !important;
  }
  body.stalk-page .stalk-history-panel .history-list{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:auto !important;
    max-height:none !important;
  }
}

/* Stalk exchange rows: show readable Paid -> Got + rate instead of raw slash-separated deltas. */
body.stalk-page .tx-row-exchange{
  grid-template-columns:46px minmax(0,1fr) minmax(98px,auto) !important;
  align-items:start !important;
  padding-top:13px !important;
  padding-bottom:13px !important;
}
body.stalk-page .tx-exchange-card{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
  grid-template-areas:"paid arrow got" "rate rate rate" !important;
  align-items:center !important;
  gap:6px 8px !important;
  margin-top:7px !important;
  max-width:100% !important;
}
body.stalk-page .tx-leg{
  min-width:0 !important;
  border:1px solid rgba(130,170,220,.12) !important;
  border-radius:12px !important;
  background:rgba(3,10,19,.58) !important;
  padding:7px 8px !important;
  display:grid !important;
  gap:3px !important;
}
body.stalk-page .tx-leg-out{grid-area:paid !important;border-color:rgba(255,111,143,.20) !important;background:rgba(255,111,143,.055) !important;}
body.stalk-page .tx-leg-in{grid-area:got !important;border-color:rgba(85,245,194,.22) !important;background:rgba(85,245,194,.065) !important;}
body.stalk-page .tx-leg-label{
  color:#7f8da7 !important;
  font-size:10px !important;
  font-weight:950 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body.stalk-page .tx-leg strong{
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  color:#f6fbff !important;
  font-size:13px !important;
  line-height:1.15 !important;
}
body.stalk-page .tx-leg-out strong{color:#ffd3dc !important;}
body.stalk-page .tx-leg-in strong{color:#a9ffe8 !important;}
body.stalk-page .tx-swap-arrow{
  grid-area:arrow !important;
  width:24px !important;
  height:24px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:999px !important;
  background:rgba(47,211,255,.10) !important;
  color:#c9f2ff !important;
  font-size:15px !important;
  font-weight:1000 !important;
}
body.stalk-page .tx-rate{
  grid-area:rate !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  color:#91aeca !important;
  font-size:11px !important;
  font-weight:800 !important;
}
body.stalk-page .tx-row-exchange .tx-amount{
  color:#a9ffe8 !important;
}
@media(max-width:720px){
  body.stalk-page .tx-row-exchange{
    grid-template-columns:40px minmax(0,1fr) minmax(72px,auto) !important;
  }
  body.stalk-page .tx-exchange-card{
    grid-template-columns:1fr !important;
    grid-template-areas:"paid" "got" "rate" !important;
    gap:5px !important;
  }
  body.stalk-page .tx-swap-arrow{display:none !important;}
  body.stalk-page .tx-leg{padding:6px 7px !important;}
  body.stalk-page .tx-leg strong{font-size:12px !important;}
}
