/* Run Backtest progress (Alex 11/09; 11/14/2026: the button itself is the bar) — ONE look for every backtester, user +
   admin (js/bt-progress.js). The fill is the job's REAL percent, left to right inside the button; before the job reports
   one, a slow sheen and "Starting…", never a number. A small ✕ at the right end cancels. Tokens: tokens.css. */
.btp-btn { position:relative !important;overflow:hidden !important;isolation:isolate;cursor:progress !important; }
/* COLORS (Alex 11/23: ONE look on every backtester, the SPX 0DTE one): while a run goes, every Run button (.run-cta
   accent buttons included) is the monotone button at its :hover .86 step and the fill is --ds-text (full), so the fill
   reads on every page in dark and light. The 11/14 accent variant (fill = accent 82% + text on an accent button) was
   ~1.1:1 against its own background: SPX Weekly, TSLA, the strategy and card pages showed "Running · NN%" with no
   visible fill. The button's resting look is untouched (only .btp-btn, i.e. a run going, is styled here). */
.btp-btn, .btp-btn:hover, .btp-btn:disabled, .btp-btn.run-cta, .btp-btn.run-cta:hover, .btp-btn.run-cta:disabled {
  opacity:1 !important;transform:none !important;box-shadow:none !important;
  background:color-mix(in srgb, var(--ds-text) 86%, var(--ds-surface)) !important;
  border-color:color-mix(in srgb, var(--ds-text) 86%, var(--ds-surface)) !important;
  color:var(--ds-on-primary) !important; }
.btp-btn { --btp-fill:var(--ds-text); }
.btp-btn .btp-bfill { position:absolute;inset:0 auto 0 0;width:0;z-index:-1;pointer-events:none;
  background:var(--btp-fill, var(--ds-text));transition:width 1.8s linear; }   /* ~one 2 s check: checks read as one continuous slide (speed batch 1, 11/18) */
.btp-btn .btp-blabel { position:relative;font-variant-numeric:tabular-nums;white-space:nowrap; }
.btp-btn.btp-hasx { padding-right:44px !important; }           /* the label never runs under the ✕ */
.btp-btn .btp-x { position:absolute;right:8px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;
  justify-content:center;width:26px;height:26px;border-radius:6px;cursor:pointer;opacity:.8; }
.btp-btn .btp-x:hover, .btp-btn .btp-x:focus-visible { opacity:1;background:color-mix(in srgb, currentColor 16%, transparent);outline:none; }
/* waiting for the job's first real number: a quiet sheen moves across the button (no width, no percent) */
.btp-btn.is-starting .btp-bfill { width:40% !important;transition:none;
  background:linear-gradient(90deg, transparent, var(--btp-fill, var(--ds-text)), transparent);
  animation:btp-sheen 1.6s ease-in-out infinite; }
@keyframes btp-sheen { from { transform:translateX(-100%); } to { transform:translateX(250%); } }
/* the button while a run starts / runs: a second click does nothing (js/bt-progress.js guard) */
.btp-busy, .btp-busy:disabled { cursor:progress !important; }
/* the old bar's place (the loading box / status line): nothing shown while the button carries the run */
.btp-host-off { display:none !important; }
@media (prefers-reduced-motion: reduce) {
  .btp-btn .btp-bfill { transition:none; }
  .btp-btn.is-starting .btp-bfill { animation:none;width:100% !important;opacity:.5; }
}
