/* gxinfo.js: the ⓘ buttons and the "About the GEX change panel" popup.
   Same file in both trees. The popup uses the fixed dark chrome tokens
   (--fx-*), like the other popovers, so it reads the same on any chart
   background; night vision re-tints those tokens. */
.gxib{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;padding:0;border-radius:50%;
  border:1px solid var(--line2,#2a3443);background:var(--bg,#0a0e13);color:var(--muted,#8290a4);
  font:700 10px/1 Georgia,'Times New Roman',serif;font-style:italic;cursor:pointer;transition:color .12s,border-color .12s}
.gxib:hover{color:var(--hi,#f3f6fa);border-color:var(--muted,#8290a4)}
.gxib:focus-visible{outline:2px solid var(--focus,#9db7e0);outline-offset:1px}
/* in the panel: top-right, beside the centred GEX / Change tabs */
.gxp .gxib{position:absolute;top:11px;right:3px;z-index:4}
@container gxp (max-width:129.98px){ .gxtabs{left:3px;transform:none;max-width:calc(100% - 24px)} }
/* on the Overlays row, after the name (works in night vision and on phones) */
.ovrow .rl .gxib-row{display:inline-flex;align-items:center;gap:6px}
.ovrow.nvoff .gxib{cursor:pointer}

dialog.gxinfo{position:fixed;inset:0;margin:auto;padding:0;border:0;background:transparent;color:var(--fx-text,#d9e0e9);
  width:min(580px, calc(100vw - 32px));max-width:none;max-height:min(82vh, calc(100dvh - 32px));overflow:visible;
  font-family:var(--sans);font-size:13px;line-height:1.5;text-align:left}
dialog.gxinfo::backdrop{background:rgba(0,0,0,.55)}
body.nv dialog.gxinfo::backdrop{background:rgba(0,6,2,.6)}
.gxi-box{display:flex;flex-direction:column;max-height:inherit;background:var(--fx-panel,#0e131a);border:1px solid var(--fx-line2,#2a3443);
  border-radius:var(--r3,10px);box-shadow:var(--shadow,0 12px 32px rgba(0,0,0,.5))}
.gxi-head{display:flex;align-items:center;gap:8px;padding:12px 12px 10px 18px;border-bottom:1px solid var(--fx-line,#1c2530)}
.gxi-head h2{font-size:15px;font-weight:650;color:var(--fx-hi,#f3f6fa);margin:0}
.gxi-x{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:var(--r2,6px);color:var(--fx-muted,#8290a4)}
.gxi-x:hover{background:var(--fx-panel3,#1b2330);color:var(--fx-hi,#f3f6fa)}
.gxi-x:focus-visible,.gxi-body:focus-visible{outline:2px solid var(--focus,#9db7e0);outline-offset:-2px}
.gxi-x svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.gxi-body{overflow:auto;overscroll-behavior:contain;padding:6px 18px 16px}
.gxi-body h3{font-size:12px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;color:var(--fx-hi,#f3f6fa);margin:14px 0 4px}
.gxi-body p,.gxi-body li{color:var(--fx-text,#d9e0e9)}
.gxi-body ul{margin:0;padding-left:18px}
.gxi-body li{margin:3px 0}
.gxi-body li::marker{color:var(--fx-muted,#8290a4)}
.gxi-body b{font-weight:600;color:var(--fx-hi,#f3f6fa)}
.gxi-body code{font-family:var(--mono);font-size:11.5px;padding:0 4px;border-radius:3px;background:var(--fx-panel3,#1b2330);color:var(--fx-hi,#f3f6fa)}
.gxi-lead{margin-top:6px;color:var(--fx-text,#d9e0e9)}
.gxi-body ul.gxi-tldr{margin:8px 0 2px;padding:8px 10px 8px 26px;border:1px solid var(--fx-line2,#2a3443);border-radius:var(--r2,6px);background:var(--fx-panel2,#121922)}
.gxi-body ul.gxi-tldr li{margin:1px 0}
.gxi-body .gxi-pos{color:var(--pos-t,#35d49e)}
.gxi-body .gxi-neg{color:var(--neg-t,#ff5977)}
.gxi-key{display:inline-flex;flex-wrap:wrap;gap:2px 8px;vertical-align:baseline}
.gxi-w{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:11.5px;white-space:nowrap}
.gxi-w i{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--c)}
@media (max-width:699.98px){
  dialog.gxinfo{width:calc(100vw - 32px);max-height:calc(100dvh - 32px);font-size:13.5px}
  .gxi-body{padding:4px 14px 14px}
  .gxi-head{padding:10px 8px 8px 14px}
}
