/* ══════════════════════════════════════════════════════════════════════
   FSS SCALPING — EMA 9 & 21 PULLBACK STRATEGY UI + ASSET SELECTOR
   ══════════════════════════════════════════════════════════════════════ */

/* Always-visible Symbol Selector in Topbar (Desktop & Mobile) */
body.site-system.page-scalping #scalpTopbar .scalp-mobile-symbol,
body.site-system.page-scalping #scalpSymbolSelect {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 155px !important;
  width: auto !important;
  max-width: 210px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 5px 10px !important;
  background: #1d2230 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(245, 197, 66, 0.35) !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
}

/* 1-Tap Quick Asset Switch Strip directly above Scalping Chart */
.scalp-asset-strip {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #11141c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  z-index: 25;
}
.scalp-asset-strip::-webkit-scrollbar { display: none; }

.scalp-asset-strip .asset-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #9ba5ba;
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}
.scalp-asset-strip .asset-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
.scalp-asset-strip .asset-chip.active {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.22), rgba(185, 28, 28, 0.36));
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.22);
}

/* Position Floating Timeframes neatly below the Asset Strip (zero ghost wrapper border!) */
body.site-system.page-scalping #chartArea .chart-timeframe-float {
  top: 50px !important;
  width: max-content !important;
  max-width: calc(100% - 16px) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.site-system.page-scalping #chartArea .chart-timeframe-float #tfSelector {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  max-width: 100% !important;
  background: rgba(16, 20, 29, 0.84) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 4px !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(14px) !important;
}
body.site-system.page-scalping .chart-timeframe-float .tf-btn {
  flex: 0 0 auto !important;
}
body.site-system.page-scalping #chartOverlay {
  top: 52px !important;
  left: 14px !important;
  right: auto !important;
}
body.site-system.page-scalping #rsiLabel {
  left: 10px !important;
  right: auto !important;
  background: rgba(11, 13, 19, 0.78);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Strategy Header Pill & Mode Switch inside Signal Box */
body.site-system.page-scalping #signalPanel,
body.site-system.page-scalping #signalBox,
body.site-system.page-scalping #indicatorsPanel,
body.site-system.page-scalping #historyPanel {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
body.site-system.page-scalping #signalBox,
body.site-system.page-scalping #indicatorsPanel {
  flex: 0 0 auto !important;
  overflow: visible !important;
}
body.site-system.page-scalping #signalBox {
  padding: 15px 14px !important;
}
body.site-system.page-scalping #strengthLabel {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  padding-inline: 2px !important;
  font-family: var(--sans, system-ui) !important;
  font-size: 11px !important;
  color: #aab4c8 !important;
  box-sizing: border-box !important;
}
body.site-system.page-scalping #signalLabel {
  font-family: var(--sans, system-ui) !important;
  font-size: 11.5px !important;
  line-height: 1.55 !important;
  padding-inline: 2px !important;
  word-break: break-word !important;
}

.scalp-strat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--mono, monospace);
  font-size: 10.5px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.3px;
  direction: ltr;
}
.scalp-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: rgba(11, 14, 21, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scalp-mode-switch .mode-pill {
  min-height: 28px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8f9bb0;
  font: 600 10.5px/1.2 var(--sans, system-ui);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}
.scalp-mode-switch .mode-pill.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(14, 116, 144, 0.35));
  color: #e0f2fe;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.38);
}
.scalp-rr-chip {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 10px;
}

/* Trade Plan Box (Entry / SL / TP1 / TP2 1:2) */
.scalp-plan-box {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: start;
}
.scalp-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.scalp-plan-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 2px;
}
.scalp-plan-row span {
  color: #9ba5ba;
}
.scalp-plan-row b {
  font-family: var(--mono, monospace);
  font-size: 12px;
  font-weight: 700;
  direction: ltr;
}
.scalp-plan-row b.plan-entry { color: #f5c542; }
.scalp-plan-row b.plan-sl { color: #fb7185; }
.scalp-plan-row b.plan-tp1 { color: #38bdf8; }
.scalp-plan-row b.plan-tp2 { color: #34d399; font-size: 13px; }
.scalp-plan-row.main-tp {
  background: rgba(16, 185, 129, 0.08);
  padding: 5px 7px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.22);
}
.scalp-copy-plan-btn {
  width: 100%;
  margin-top: 4px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1d212e;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.scalp-copy-plan-btn:hover {
  background: #272c3d;
  color: #fff;
  border-color: rgba(245, 197, 66, 0.45);
}

/* Daily Discipline Cap Box (Max 2 Trades / Day) */
.scalp-discipline-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(24, 25, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scalp-discipline-box.capped {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}
.scalp-disc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.scalp-disc-head b {
  font-family: var(--mono, monospace);
  color: #f5c542;
  font-size: 12px;
}
.scalp-discipline-box.capped .scalp-disc-head b {
  color: #fb7185;
}
.scalp-disc-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.scalp-disc-actions button {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #202432;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.scalp-disc-actions button#logTradeBtn {
  background: rgba(229, 9, 20, 0.18);
  border-color: rgba(229, 9, 20, 0.45);
  color: #ffd5d8;
}

/* Session Clock & News Shield Card */
.scalp-session-card {
  padding: 10px;
  border-radius: 9px;
  background: #141722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scalp-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.session-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.session-pill.prime { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.session-pill.golden { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.45); }
.session-pill.caution { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.35); }
.session-pill.blocked { background: rgba(239, 68, 68, 0.16); color: #fda4af; border: 1px solid rgba(239, 68, 68, 0.38); }
.istanbul-clock {
  font-family: var(--mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  direction: ltr;
}
.scalp-session-detail {
  font-size: 10px;
  color: #8f9bb0;
  line-height: 1.5;
}
.scalp-news-shield {
  font-size: 10.5px;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.scalp-news-shield.ok { background: rgba(16, 185, 129, 0.1); color: #86efac; border: 1px solid rgba(16, 185, 129, 0.25); }
.scalp-news-shield.danger { background: rgba(239, 68, 68, 0.16); color: #fda4af; border: 1px solid rgba(239, 68, 68, 0.4); }

/* 5-Step Strategy Checklist */
.scalp-checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.chk-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.chk-row > span {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  margin-top: 1px;
}
.chk-row[data-state="pass"] {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.07);
}
.chk-row[data-state="pass"] > span {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}
.chk-row[data-state="fail"] {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.07);
}
.chk-row[data-state="fail"] > span {
  background: rgba(239, 68, 68, 0.25);
  color: #fda4af;
}
.chk-row b {
  display: block;
  font-size: 11px;
  color: #e2e8f0;
  line-height: 1.35;
}
.chk-row small {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

@media (max-width: 1024px) {
  body.site-system.page-scalping #scalpTopbar .scalp-mobile-symbol,
  body.site-system.page-scalping #scalpSymbolSelect {
    min-width: 164px !important;
    max-width: 210px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }
  .scalp-asset-strip {
    padding: 6px 8px;
    gap: 5px;
  }
  .scalp-asset-strip .asset-chip {
    min-height: 28px;
    padding: 3px 9px;
    font-size: 10.5px;
  }
  body.site-system.page-scalping .chart-timeframe-float {
    top: 46px !important;
  }
  body.site-system.page-scalping #chartOverlay {
    top: 86px !important;
    left: 8px !important;
    right: auto !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    max-width: calc(100% - 76px);
  }
  body.site-system.page-scalping #chartOverlay .chart-overlay-stat {
    font-size: 9.5px !important;
    padding: 2px 6px !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   TRADINGVIEW PREMIUM CONTAINER + ALWAYS-PINNED FSS SIGNAL & 1:2 HUD
   Keeps Currency Strip & Timeframes uncovered + pins Entry/SL/TP1/TP2
   ══════════════════════════════════════════════════════════════════════ */
.scalp-tv-container {
  position: absolute !important;
  top: 45px !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 45 !important;
  background: #0b0d13 !important;
}

body.site-system.page-scalping #chartArea:has(#tvContainer[style*="block"]) .chart-timeframe-float {
  display: none !important;
}

.tv-signal-hud {
  position: absolute;
  top: 48px;
  right: 78px;
  z-index: 58;
  width: 224px;
  border-radius: 12px;
  background: rgba(11, 14, 22, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.62);
  color: #eef2ff;
  overflow: hidden;
  font-family: var(--sans, system-ui);
}

.tv-hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  direction: ltr;
}
.tv-hud-title {
  font: 700 11px/1.2 var(--mono, monospace);
  color: #38bdf8;
}
.tv-hud-title b {
  color: #ffffff;
}
.tv-hud-title small {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(229, 9, 20, 0.25);
  color: #fecdd3;
  font-size: 9.5px;
}
.tv-hud-toggle {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.tv-signal-hud.collapsed .tv-hud-body {
  display: none;
}

.tv-hud-body {
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tv-hud-sig-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tv-hud-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font: 800 11px/1.2 var(--mono, monospace);
  direction: ltr;
}
.tv-hud-badge.buy {
  background: rgba(0, 230, 118, 0.18);
  border: 1px solid rgba(0, 230, 118, 0.48);
  color: #00e676;
}
.tv-hud-badge.sell {
  background: rgba(255, 61, 87, 0.18);
  border: 1px solid rgba(255, 61, 87, 0.48);
  color: #ff5268;
}
.tv-hud-badge.wait {
  background: rgba(245, 197, 66, 0.16);
  border: 1px solid rgba(245, 197, 66, 0.42);
  color: #fcd34d;
}
.tv-hud-state {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

.tv-hud-emas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font: 600 9.5px/1.2 var(--mono, monospace);
  color: #cbd5e1;
}
.tv-hud-emas i {
  font-style: normal;
  opacity: 0.85;
}

.tv-hud-levels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tv-lvl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 7px;
  border-radius: 6px;
  font: 700 10.5px/1.2 var(--mono, monospace);
}
.tv-lvl.tp2 {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.42);
  color: #6ee7b7;
}
.tv-lvl.tp1 {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #7dd3fc;
}
.tv-lvl.entry {
  background: rgba(245, 197, 66, 0.16);
  border: 1px solid rgba(245, 197, 66, 0.45);
  color: #fde047;
}
.tv-lvl.sl {
  background: rgba(251, 113, 133, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.44);
  color: #fda4af;
}

.tv-hud-copy {
  width: 100%;
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1c2231;
  color: #e2e8f0;
  font: 700 10.5px var(--sans, system-ui);
  cursor: pointer;
}
.tv-hud-copy:hover {
  background: #273046;
  color: #ffffff;
}

@media (max-width: 1024px) {
  .scalp-tv-container {
    top: 41px !important;
  }
  .tv-signal-hud {
    top: auto;
    bottom: 8px;
    right: auto;
    left: 8px;
    width: 198px;
  }
}
