/* Graph 2 - "Go to" (graph2_goto.js): the dialog, the button beside the range buttons, the "Going to ..." pill on a
   chart while older candles load, and the note under the toolbar when the chart has something to say. Monochrome like
   the rest of the chart's chrome: what is picked is drawn in the text colour (black on light, near-white on dark). */

.g2-gt-back{position:fixed;inset:0;z-index:320;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(10,12,18,.42);
  animation:g2gt-fade .14s ease-out}
.g2-gt-back[hidden]{display:none}
.g2-gt{--gt-ink:#eef0f4;--gt-on:#131722;--gt-soft:rgba(255,255,255,.055);--gt-band:rgba(238,240,244,.10);--gt-field:#171b26;
  --gt-border:#363a45;--gt-border-hi:#5d6170;--gt-dim:#4c505b;--gt-shadow:0 28px 80px rgba(0,0,0,.55),0 2px 8px rgba(0,0,0,.35);
  position:relative;width:392px;max-width:100%;min-width:0;max-height:calc(100vh - 32px);display:flex;flex-direction:column;
  background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:22px;box-shadow:var(--gt-shadow);
  font-family:var(--font-ui,Inter,-apple-system,"Segoe UI",sans-serif);animation:g2gt-in .18s cubic-bezier(.2,.8,.2,1)}
[data-theme="light"] .g2-gt{--gt-ink:#131722;--gt-on:#fff;--gt-soft:#f0f2f6;--gt-band:#eceef3;--gt-field:#fff;--gt-border:#d5d8df;
  --gt-border-hi:#9ea2ad;--gt-dim:#b8bbc4;--gt-shadow:0 28px 80px rgba(19,23,34,.20),0 2px 10px rgba(19,23,34,.08);border-color:#e6e8ee}
@keyframes g2gt-fade{from{opacity:0}}
@keyframes g2gt-in{from{opacity:0;transform:translateY(8px) scale(.985)}}
.g2-gt .ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.g2-gt button{font:inherit;color:inherit}
.g2-gt-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.g2-gt-head{display:flex;align-items:center;gap:10px;padding:22px 18px 4px 26px}
.g2-gt-head h2{margin:0;font-size:21px;font-weight:600;letter-spacing:-.01em}
.g2-gt-ctx{flex:1;min-width:0;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:3px}
.g2-gt-x{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:10px;background:none;cursor:pointer;color:var(--text)}
.g2-gt-x .ic{width:22px;height:22px;stroke-width:1.5}
.g2-gt-x:hover{background:var(--gt-soft)}

.g2-gt-tabs{position:relative;display:flex;gap:28px;margin:14px 26px 0;border-bottom:3px solid var(--gt-soft)}
.g2-gt-tabs [data-tab]{position:relative;border:0;background:none;padding:6px 0 10px;font-size:15px;font-weight:600;color:var(--muted);cursor:pointer}
.g2-gt-tabs [data-tab].on{color:var(--text)}
.g2-gt-tabs [data-tab]:hover{color:var(--text)}
.g2-gt-ink{position:absolute;left:0;bottom:-3px;height:3px;border-radius:3px;background:var(--gt-ink);transition:transform .22s cubic-bezier(.2,.8,.2,1),width .22s}

.g2-gt-body{position:relative;overflow:auto;padding:18px 26px 4px}
.g2-gt-fields{display:flex;gap:12px}
.g2-gt-fields[hidden]{display:none}
.g2-gt-range{flex-direction:column;gap:10px}
.g2-gt-row{display:flex;align-items:center;gap:10px}
.g2-gt-lbl{width:38px;flex:none;font-size:12.5px;font-weight:600;color:var(--muted)}
.g2-gt-field{position:relative;flex:1.35;min-width:0;display:flex;align-items:center;height:44px;padding:0 6px 0 13px;border:1.5px solid var(--gt-border);
  border-radius:12px;background:var(--gt-field);transition:border-color .12s,box-shadow .12s}
.g2-gt-field.time{flex:1}
.g2-gt-field:hover{border-color:var(--gt-border-hi)}
.g2-gt-field:focus-within,.g2-gt-field.aim{border-color:var(--gt-ink);box-shadow:0 0 0 3px var(--gt-band)}
.g2-gt-field input{flex:1;min-width:0;height:100%;border:0;outline:0;background:none;color:var(--text);font:inherit;font-size:15px;
  font-variant-numeric:tabular-nums;letter-spacing:.01em}
.g2-gt-field input::placeholder{color:var(--muted);opacity:.8}
.g2-gt-field.off{background:var(--gt-soft);border-color:transparent}
.g2-gt-field.off input{cursor:not-allowed}
.g2-gt-ic{display:grid;place-items:center;width:32px;height:32px;flex:none;border:0;border-radius:8px;background:none;color:var(--muted)}
button.g2-gt-ic{cursor:pointer}
button.g2-gt-ic:hover:not(:disabled){background:var(--gt-soft);color:var(--text)}
button.g2-gt-ic:disabled{cursor:not-allowed;opacity:.7}

.g2-gt-times{position:absolute;z-index:3;max-height:220px;overflow:auto;padding:5px;background:var(--panel);border:1px solid var(--line);
  border-radius:12px;box-shadow:var(--gt-shadow);display:grid;gap:1px}
.g2-gt-times[hidden]{display:none}
.g2-gt-times button{border:0;background:none;text-align:left;padding:7px 10px;border-radius:8px;font-variant-numeric:tabular-nums;cursor:pointer}
.g2-gt-times button:hover,.g2-gt-times button:focus-visible{background:var(--gt-soft);outline:none}
.g2-gt-times button.on{background:var(--gt-ink);color:var(--gt-on)}

.g2-gt-cal{margin-top:16px}
.g2-gt-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 -6px 10px}
.g2-gt-nb{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:10px;background:none;cursor:pointer}
.g2-gt-nb .ic{width:22px;height:22px}
.g2-gt-nb:hover:not(:disabled){background:var(--gt-soft)}
.g2-gt-nb:disabled{opacity:.3;cursor:default}
.g2-gt-month{display:inline-flex;align-items:center;gap:8px;border:0;background:none;padding:7px 10px;border-radius:10px;font-size:16px !important;
  font-weight:500;cursor:pointer}
.g2-gt-month:hover{background:var(--gt-soft)}
.g2-gt-caret{width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid var(--muted);transition:transform .15s}
.g2-gt-cal.years .g2-gt-caret{transform:rotate(180deg)}
.g2-gt-dow{display:grid;grid-template-columns:repeat(7,1fr);background:var(--gt-soft);border-radius:8px;margin-bottom:6px}
.g2-gt-dow span{height:30px;display:grid;place-items:center;font-size:13px;font-weight:500;color:var(--muted)}
.g2-gt-days{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:44px;row-gap:4px;min-height:284px;align-content:start}
.g2-gt-days button{position:relative;height:44px;border:0;background:none;padding:0;cursor:pointer;font-size:15.5px;font-weight:500;
  font-variant-numeric:tabular-nums}
.g2-gt-days button span{position:relative;z-index:1;display:grid;place-items:center;width:42px;height:42px;margin:auto;border-radius:12px;transition:background .1s}
.g2-gt-days button:hover:not(:disabled) span{background:var(--gt-soft)}
.g2-gt-days button.we{color:var(--muted)}
.g2-gt-days button:disabled{color:var(--gt-dim);cursor:default}
.g2-gt-days button.prem{color:#b7791f}
[data-theme="dark"] .g2-gt-days button.prem,:root:not([data-theme]) .g2-gt-days button.prem{color:#c9a052}
.g2-gt-days button.today span::after{content:"";position:absolute;left:50%;bottom:6px;width:16px;height:2.5px;margin-left:-8px;border-radius:2px;background:currentColor}
.g2-gt-days button.sel span{background:var(--gt-ink) !important;color:var(--gt-on);font-weight:600}
.g2-gt-days button.mid::before,.g2-gt-days button.lo::before,.g2-gt-days button.hi::before{content:"";position:absolute;top:2px;bottom:2px;left:0;right:0;
  background:var(--gt-band)}
.g2-gt-days button.lo::before{left:50%}
.g2-gt-days button.hi::before{right:50%}
.g2-gt-days button:focus-visible{outline:none}
.g2-gt-days button:focus-visible span{box-shadow:0 0 0 2px var(--panel),0 0 0 4px var(--gt-ink)}
.g2-gt-years{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;max-height:268px;overflow:auto;padding:2px}
.g2-gt-years[hidden],.g2-gt-grid[hidden]{display:none}
.g2-gt-years button{height:40px;border:0;border-radius:10px;background:none;cursor:pointer;font-variant-numeric:tabular-nums}
.g2-gt-years button:hover{background:var(--gt-soft)}
.g2-gt-years button.cur{background:var(--gt-ink);color:var(--gt-on);font-weight:600}
.g2-gt-years button:focus-visible{outline:2px solid var(--gt-ink);outline-offset:1px}

.g2-gt-note{min-height:20px;margin:12px 0 0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.g2-gt-note:empty{min-height:8px}
.g2-gt-note.err{color:var(--down)}
.g2-gt-note.prem{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;padding:10px 12px;border-radius:12px;background:rgba(245,185,66,.10);color:var(--text)}
.g2-gt-note.prem .ic{width:16px;height:16px;flex:none;margin-top:1px;color:#b7791f}
.g2-gt-note.prem span{flex:1;min-width:180px}
.g2-gt-note.prem button{border:0;background:none;padding:0;color:#b7791f;font-weight:700;cursor:pointer}
[data-theme="dark"] .g2-gt-note.prem button,[data-theme="dark"] .g2-gt-note.prem .ic{color:var(--gold)}
.g2-gt-note.prem button:hover{text-decoration:underline}

.g2-gt-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 26px 24px}
.g2-gt-btn{min-width:88px;height:44px;padding:0 20px;border-radius:12px;font-size:15.5px !important;font-weight:600;cursor:pointer;
  transition:background .12s,transform .06s}
.g2-gt-btn:active{transform:translateY(1px)}
.g2-gt-btn.ghost{background:none;border:1.5px solid var(--gt-ink)}
.g2-gt-btn.ghost:hover{background:var(--gt-soft)}
.g2-gt-btn.primary{border:1.5px solid var(--gt-ink);background:var(--gt-ink);color:var(--gt-on) !important}
.g2-gt-btn.primary:hover{filter:brightness(1.12)}
[data-theme="light"] .g2-gt-btn.primary:hover{filter:none;background:#2a2e39}
.g2-gt-btn:focus-visible,.g2-gt-x:focus-visible,.g2-gt-nb:focus-visible,.g2-gt-month:focus-visible,.g2-gt-tabs [data-tab]:focus-visible,
button.g2-gt-ic:focus-visible{outline:2px solid var(--gt-ink);outline-offset:2px}

/* phones: a sheet from the bottom, full width */
@media (max-width:520px){
  .g2-gt-back{align-items:flex-end;padding:0}
  .g2-gt{width:100%;max-height:92vh;border-radius:22px 22px 0 0;animation-name:g2gt-up}
  .g2-gt-head{padding:18px 12px 2px 18px}
  .g2-gt-tabs{margin:12px 18px 0}
  .g2-gt-body{padding:16px 18px 4px}
  .g2-gt-foot{padding:12px 18px calc(16px + env(safe-area-inset-bottom))}
  .g2-gt-foot .g2-gt-btn{flex:1}
  .g2-gt-days{grid-auto-rows:42px;min-height:272px}
  .g2-gt-days button{height:42px}
  .g2-gt-days button span{width:38px;height:38px}
  .g2-gt-fields:not(.g2-gt-range){gap:8px}
}
@keyframes g2gt-up{from{transform:translateY(24px);opacity:.4}}
@media (prefers-reduced-motion:reduce){.g2-gt-back,.g2-gt{animation:none}.g2-gt-ink{transition:none}}

/* the button beside 1D 5D ... All */
.g2-goto-sep{width:1px;height:18px;margin:0 4px;background:var(--line);flex:none}
#g2-goto .ic{width:18px;height:18px}

/* on a chart while older candles load for a "Go to" */
.g2-going{position:absolute;left:50%;top:46px;z-index:9;transform:translateX(-50%);pointer-events:none;animation:g2gt-fade .2s}
.g2-going[hidden]{display:none}
.g2-going-pill{display:inline-flex;align-items:center;gap:9px;padding:8px 14px;border-radius:999px;background:var(--panel);
  border:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.25);font-size:12.5px;font-weight:500;white-space:nowrap}

/* what the chart has to say about where it went: under the toolbar, with the way on when there is one */
/* centred in the chart with its whole width to use (a narrow chart, the side panel open, gave it only half); the
   button goes under the words when they need the room */
#g2-notice{position:absolute;left:16px;right:16px;top:58px;z-index:41;width:fit-content;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;
  max-width:min(680px,calc(100% - 32px));padding:9px 8px 9px 14px;border-radius:14px;background:var(--panel);border:1px solid var(--line);
  box-shadow:0 12px 36px rgba(0,0,0,.28);font-size:13px;line-height:1.4;animation:g2gt-drop .2s cubic-bezier(.2,.8,.2,1)}
#g2-notice[hidden]{display:none}
#g2-notice.warn{border-color:rgba(239,83,80,.55)}
#g2-notice.prem{border-color:rgba(245,185,66,.6)}
.g2-notice-t{flex:1 1 220px;min-width:0}
.g2-notice-b{flex:none;height:30px;padding:0 12px;border-radius:9px;border:1px solid var(--line);background:var(--panel2);color:var(--text);
  font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.g2-notice-b:hover{border-color:var(--muted)}
.g2-notice-b.gold{border-color:transparent;background:var(--gold);color:#1a1300}
.g2-notice-x{flex:none;width:28px;height:28px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer;font:inherit}
.g2-notice-x:hover{background:var(--hover);color:var(--text)}
@keyframes g2gt-drop{from{opacity:0;transform:translateY(-6px)}}
@media (max-width:520px){#g2-notice{top:6px;left:10px;right:10px}.g2-notice-t{flex-basis:100%}}
@media (prefers-reduced-motion:reduce){#g2-notice,.g2-going{animation:none}}
