/* The live product's own markup in the header, dressed in the EDGE system (system.css): the wallet button and its menu
   (web/main.js renderWallet, web/tsell.js drawPill), coin search results (web/search.js), the Private Swap button and
   card (web/goprivate.js) and the devnet label. Class names are the ones those scripts write; nothing here changes
   what they do. */

/* ---------- the header's extra parts ---------- */
.top .net { color: var(--warn); font-size: var(--fs-1); font-weight: 500; white-space: nowrap; }
.top .net::before { content: ""; display: inline-block; width: 3px; height: 0.95em; margin-right: 7px; border-radius: 1px; background: var(--warn); vertical-align: -0.12em; }
.gpslot { display: contents; }

/* ---------- the wallet button: Connect is a paper bar; connected, a chip with the balance ---------- */
.wpill { position: relative; display: flex; align-items: center; gap: 6px; flex: none; }
.wpill .wbtn { --btn-bg: var(--paper); --btn-fg: var(--on-paper); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px 0 15px; margin-left: 8px; border: 0; border-radius: var(--r-bar); background: var(--btn-bg); color: var(--btn-fg); font: 500 var(--fs-2)/1 var(--f); letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; transition: background var(--t1) var(--ease), transform var(--t1) var(--ease); }
.wpill .wbtn::before { content: ""; position: absolute; left: -8px; top: 0; bottom: 0; width: 5px; border-radius: var(--r-bar); background: var(--btn-bg); transition: transform var(--t1) var(--ease), background var(--t1) var(--ease); }
.wpill .wbtn:hover::before { transform: translateX(3px); }
.wpill .wbtn:hover { --btn-bg: #ffffff; }
.wpill .wbtn:active { transform: translateY(1px); }
.wpill .wbtn .wic { display: none; }
.wpill .wbtn[disabled] { --btn-bg: var(--tile3); --btn-fg: var(--paper2); cursor: default; }
.wpill .wbtn[disabled]:hover::before { transform: none; }
/* connected: the address, or the private balance once it is unlocked */
.wpill a.wbtn { --btn-bg: var(--tile2); --btn-fg: var(--paper); margin-left: 0; padding: 0 12px; gap: 7px; font-size: var(--fs-1); }
.wpill a.wbtn::before { display: none; }
.wpill a.wbtn:hover { --btn-bg: var(--tile3); }
.wpill a.wbtn b { font-weight: 500; font-variant-numeric: tabular-nums; }
.wpill a.wbtn.wbal::before { content: "Private"; position: static; display: inline; width: auto; background: none; color: var(--coral); font-weight: 500; transform: none; }
.wpill .wbtn .sol { width: 0.92em; height: 0.92em; margin: 0 0 0 -2px; }
.wpill .weye { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-bar); background: var(--tile2); color: var(--label); transition: color var(--t1) var(--ease), background var(--t1) var(--ease); }
.wpill .weye:hover { color: var(--paper); background: var(--tile3); }
.wpill .weye svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the wallet list under Connect: the terminal's (.wmenu) and the desk's (.menu) */
.wpill :is(.wmenu, .menu) { position: absolute; right: 0; top: 44px; z-index: 40; display: grid; gap: 2px; min-width: 230px; padding: 6px; border-radius: var(--r-tile); background: var(--tile2); border: 1px solid var(--hair); }
.wpill :is(.wmenu, .menu) :is(button, a) { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-bar); color: var(--paper); font-size: var(--fs-2); font-weight: 500; text-align: left; white-space: nowrap; }
.wpill :is(.wmenu, .menu) :is(button, a):hover { background: var(--tile3); }
.wpill :is(.wmenu, .menu) img { width: 20px; height: 20px; border-radius: 5px; }
.wpill :is(.wmenu, .menu) .wl { display: flex; align-items: center; gap: 10px; }
.wpill :is(.wmenu, .menu) em, .wpill .menu .tag { margin-left: auto; font-style: normal; color: var(--warn); font-size: var(--fs-1); }
.wpill .menu .hint { padding: 6px 10px; color: var(--label); font-size: var(--fs-1); }

/* ---------- coin search results (web/search.js) ---------- */
.search .results button { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px; border-radius: var(--r-bar); color: var(--paper); text-align: left; }
.search .results button:hover, .search .results button.sel { background: var(--tile3); }
.search .results .coin { width: 24px; height: 24px; margin: 0; border-radius: 6px; object-fit: cover; background: var(--tile3); display: grid; place-items: center; color: var(--paper2); font-size: var(--fs-1); font-weight: 600; } /* margin: system.css's header .coin is another thing */
.search .results .rn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--fs-2); }
.search .results .rn em { margin-left: 7px; font-style: normal; font-weight: 400; color: var(--label); font-size: var(--fs-1); }
.search .results .ra { color: var(--label); font: 400 var(--fs-1) var(--mono); }
.search .results .rp { display: grid; justify-items: end; gap: 1px; font-size: var(--fs-1); font-variant-numeric: tabular-nums; }
.search .results .rp em { font-style: normal; color: var(--label); }
.search .results .rlabel { padding: 6px 8px 4px; color: var(--label); font-size: var(--fs-1); }
.search .results .none { padding: 10px 8px; color: var(--paper2); font-size: var(--fs-2); }

/* ---------- Private Swap: the button and its card (web/goprivate.js) ---------- */
/* a private action, so its cap is coral; the bar itself stays dark beside the wallet */
.gpbtn { --btn-bg: var(--tile3); position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; margin-left: 8px; border-radius: var(--r-bar); background: var(--btn-bg); color: var(--paper); font: 500 var(--fs-2)/1 var(--f); white-space: nowrap; transition: background var(--t1) var(--ease); }
.gpbtn::before { content: ""; position: absolute; left: -8px; top: 0; bottom: 0; width: 5px; border-radius: var(--r-bar); background: var(--coral); transition: transform var(--t1) var(--ease); }
.gpbtn:hover { --btn-bg: #27272e; }
.gpbtn:hover::before { transform: translateX(3px); }
.gpbtn svg { display: none; }
.gpscrim { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 10, 0.78); }
.gpcard { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: var(--r-tile); background: var(--tile); border: 1px solid var(--hair); }
.gphead { display: flex; align-items: center; gap: 10px; padding: 16px 16px 0 18px; }
.gphead b { font: var(--w-display) var(--fs-4)/1.2 var(--display); letter-spacing: -0.025em; color: var(--paper); }
.gplock { display: none; }
.gpx { margin-left: auto; width: 32px; height: 32px; border-radius: var(--r-bar); color: var(--label); font-size: 20px; line-height: 1; }
.gpx:hover { background: var(--tile3); color: var(--paper); }
.gpbody { padding: 12px 18px 18px; }
.gplead { margin: 0 0 12px; color: var(--paper2); font-size: var(--fs-2); line-height: 1.5; }
.gpgrp { display: grid; gap: 2px; margin: 0 0 12px; }
.gpgh { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; color: var(--steel); font-size: var(--fs-1); font-weight: 600; }
.gpgrp.priv .gpgh, .gpbox.priv .gpbh > span:first-child { color: var(--coral); }
.gpgh svg, .gpbh svg { display: none; }
.gprow, button.gprow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: var(--r-bar); color: var(--paper); text-align: left; }
.gprow:hover { background: var(--tile3); }
.gprow.off { opacity: 0.45; cursor: default; }
.gpic { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--tile3); color: var(--paper2); font-size: var(--fs-1); font-weight: 600; }
.gpic .sol { width: 14px; height: 14px; margin: 0; }
.gpn { display: grid; min-width: 0; line-height: 1.25; }
.gpn b { font-size: var(--fs-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gpa { margin-left: auto; font-size: var(--fs-2); font-variant-numeric: tabular-nums; }
.gpunlock, .gpback { padding: 8px 0; color: var(--paper); font-size: var(--fs-1); font-weight: 500; text-align: left; text-decoration: underline; text-decoration-color: var(--label); text-underline-offset: 3px; }
.gpback { color: var(--paper2); }
.gpback:hover { color: var(--paper); }
.gpback.top { padding: 0 0 10px; }
.gpnone, .gpwait { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--paper2); font-size: var(--fs-2); }
.gpbox { position: relative; padding: 12px 14px 12px 19px; border-radius: var(--r-bar); background: var(--tile2); }
.gpbox::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 3px; border-radius: 1px; background: var(--steel); }
.gpbox.priv::before { background: var(--coral); }
.gpbh { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--label); font-size: var(--fs-1); }
.gpbh > span:first-child { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--steel); }
.gpbal { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gpbal button { height: 22px; padding: 0 7px; border-radius: var(--r-bar); background: var(--tile3); color: var(--paper); font-size: var(--fs-1); }
.gpbal button:hover { background: #27272e; }
.gpin { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.gpin input, .gpout { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--paper); font: var(--w-display) 24px/1.2 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.gpin input::placeholder { color: var(--mute); }
.gptok { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 32px; padding: 0 10px 0 4px; border-radius: var(--r-bar); background: var(--tile3); font-weight: 600; font-size: var(--fs-2); }
.gptok .gpic { width: 24px; height: 24px; }
.gpflip { display: grid; place-items: center; width: 34px; height: 34px; margin: -6px auto; position: relative; z-index: 1; border-radius: var(--r-bar); background: var(--tile3); border: 1px solid var(--hair); color: var(--paper); }
.gpflip:hover { background: #27272e; }
.gpflip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gpfacts { display: grid; gap: 6px; margin-top: 12px; font-size: var(--fs-1); }
.gpfacts div { display: flex; justify-content: space-between; gap: 12px; }
.gpfacts span { color: var(--label); }
.gpfacts b { font-weight: 500; text-align: right; color: var(--paper2); }
/* the swap is a move between your two balances: a coral bar, like Move in */
.gpgo { --btn-bg: var(--coral); position: relative; display: flex; align-items: center; justify-content: center; width: calc(100% - 8px); height: 46px; margin: 14px 0 0 8px; border-radius: var(--r-bar); background: var(--btn-bg); color: var(--on-coral); font: 500 var(--fs-3)/1 var(--f); }
.gpgo::before { content: ""; position: absolute; left: -8px; top: 0; bottom: 0; width: 5px; border-radius: var(--r-bar); background: var(--btn-bg); transition: transform var(--t1) var(--ease); }
.gpgo:hover { --btn-bg: var(--coral-hi); }
.gpgo:hover::before { transform: translateX(3px); }
.gpgo[disabled] { --btn-bg: var(--tile3); color: var(--label); cursor: default; }
.gpgo[disabled]:hover::before { transform: none; }
.gpmsg { margin: 10px 2px 0; color: var(--paper2); font-size: var(--fs-1); line-height: 1.5; }
.gpmsg.bad { color: var(--warn); }
.gpmsg .spin { margin-right: 8px; }
.gpdone { display: grid; justify-items: start; gap: 6px; padding: 4px 0 2px; }
.gpok { display: none; }
.gpdone b { font: var(--w-display) 20px/1.2 var(--display); letter-spacing: -0.03em; color: var(--paper); }
.gpdone p { margin: 0; color: var(--paper2); font-size: var(--fs-2); line-height: 1.5; }
.gpdone .gpgo { margin-top: 10px; }
.gpdone .gpback { margin-top: 2px; }

@media (max-width: 640px) {
  .gpbtn { padding: 0 11px; }
  .wpill .weye { display: none; }
  .wpill a.wbtn { padding: 0 10px; }
}
@media (max-width: 420px) {
  .gpbl { display: none; }
  .gpbox { padding: 11px 12px 11px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .wpill .wbtn, .wpill .wbtn::before, .gpbtn::before, .gpgo::before { transition: none !important; }
  .wpill .wbtn:hover::before, .gpbtn:hover::before, .gpgo:hover::before, .wpill .wbtn:active { transform: none; }
}

/* feature: connected header */
/* Connected, a page's header holds Private Swap (.gpbtn, shown only with a wallet) and the wallet's .wpill, the desk's
   #walletbox or the terminal's #wpill. Together they are wider than the design's .wal chip that system.css makes room for,
   so the search shrinks (further for a long balance) and goes a little sooner than system.css says, and the wordmark gives
   way where the nav is tight (901 to 1000) and on a phone, also while the pill says "Approve in Phantom".
   Class selectors only, so both pages take them. */
@media (max-width: 1320px) { .top:has(.gpbtn) .search { width: 220px; min-width: 0; } }
@media (max-width: 1240px) { .top:has(.gpbtn) .search { display: none; } }
@media (min-width: 901px) and (max-width: 1000px) { .top:has(.gpbtn) .mark .wm { display: none; } }
@media (max-width: 480px) { .top:has(.gpbtn, .wpill .wbtn[disabled]) .mark .wm { display: none; } }
@media (max-width: 360px) { .top .gpbtn { padding: 0 9px; } .top .wpill a.wbtn { padding: 0 8px; gap: 5px; } }
/* end: connected header */
