/* S/R v6 — dual-host dock + history TF strip + draw bar (OWN HighcrewChart in #srLwHost) */

.sr-trend-strip{
  margin-top:10px;
  padding:10px;
  border:1px solid rgba(29,64,92,.55);
  border-radius:10px;
  background:rgba(7,19,30,.55);
}

.sr-trend-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.sr-trend-title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.4px;
  color:var(--cyan,#1bdcff);
}

.sr-trend-sub{
  font-size:10px;
  color:var(--muted,#7fb8d0);
  line-height:1.35;
  max-width:820px;
}

.sr-main-legend,
.sr-horizon-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  font-size:10px;
  color:#9ec9dc;
  margin:6px 0 8px;
}

.sr-hz-badge{
  padding:2px 6px;
  border-radius:999px;
  border:1px solid rgba(29,64,92,.7);
  background:rgba(12,28,42,.75);
  font-weight:800;
  color:#e8f6ff;
}
.sr-hz-badge--tf{
  border-color:rgba(27,220,255,.45);
  color:#1bdcff;
}
.sr-hz-rail{
  padding:2px 6px;
  border-radius:999px;
  border-left:3px solid var(--sr-rail,#1bdcff);
  background:rgba(12,28,42,.55);
}
.sr-hz-sep{opacity:.5}

/* S/R-only timeframe strip (default 1d for 3M–1Y history) */
.sr-tf-strip{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 8px;
}
.sr-tf-btn{
  appearance:none;
  border:1px solid rgba(29,64,92,.75);
  background:rgba(12,28,42,.8);
  color:#9ec9dc;
  font:700 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.4px;
  padding:5px 10px;
  border-radius:6px;
  cursor:pointer;
}
.sr-tf-btn:hover{border-color:rgba(27,220,255,.45);color:#e8f6ff}
.sr-tf-btn.is-active{
  border-color:rgba(27,220,255,.7);
  color:#07131e;
  background:#1bdcff;
}

/* Optional draw tools */
.sr-draw-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin:0 0 8px;
}
.sr-draw-label{
  font:800 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.5px;
  color:#7fb8d0;
  margin-right:4px;
}
.sr-draw-btn{
  appearance:none;
  border:1px solid rgba(29,64,92,.75);
  background:rgba(12,28,42,.8);
  color:#cfe7f3;
  font:700 10px/1 Arial,Helvetica,sans-serif;
  padding:5px 9px;
  border-radius:6px;
  cursor:pointer;
}
.sr-draw-btn:hover{border-color:rgba(251,191,36,.55)}
.sr-draw-btn.is-active{
  border-color:#fbbf24;
  color:#07131e;
  background:#fbbf24;
}
.sr-draw-btn--ghost{opacity:.85}

/* Free horizontal pan — slider + reset sit OUTSIDE the overflow:hidden dock */
.sr-pan-chrome{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:8px 0 0;
  padding:8px 10px;
  border:1px solid rgba(29,64,92,.55);
  border-radius:8px;
  background:rgba(7,19,30,.65);
}
.sr-reset-live{
  appearance:none;
  border:1px solid rgba(27,220,255,.55);
  background:rgba(12,28,42,.9);
  color:#1bdcff;
  font:800 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.4px;
  padding:7px 10px;
  border-radius:6px;
  cursor:pointer;
}
.sr-reset-live:hover{background:#1bdcff;color:#07131e}
.sr-reset-live.is-armed{
  border-color:#fbbf24;
  color:#fbbf24;
}
.sr-reset-live.is-armed:hover{background:#fbbf24;color:#07131e}
.sr-pan-slider{
  flex:1 1 180px;
  min-width:140px;
  accent-color:#1bdcff;
  cursor:ew-resize;
}
.sr-pan-hint{
  font:800 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.5px;
  color:#1bdcff;
  min-width:64px;
}
.sr-pan-hint.is-history{color:#fbbf24}
.sr-pan-help{
  font:600 10px/1.3 Arial,Helvetica,sans-serif;
  color:#7fb8d0;
}

/* Dock hosts OWN #srChartShellHost / #srLwHost — Charts shell stays in #chartsTab */
.sr-chart-dock,
#srChartDock{
  position:relative;
  width:100%;
  min-height:420px;
  height:min(62vh,720px);
  border:1px solid rgba(29,64,92,.6);
  border-radius:8px;
  background:#07131e;
  overflow:hidden;
}
.sr-chart-dock.is-live,
#srChartDock.is-live{
  border-color:rgba(27,220,255,.45);
}

.sr-chart-shell-host,
#srChartShellHost,
.sr-lw-host,
#srLwHost{
  width:100%;
  height:100%;
  min-height:420px;
  position:relative;
}

/* Floating WEEKLY/MONTHLY labels (created by HighcrewChart overlay) */
.hc-sr-label-layer{pointer-events:none}
.hc-sr-float-label{pointer-events:none;user-select:none}

/* Hide leftover private main-chart IDs. The 3M/6M/1Y map (#srTrendChannelStrip)
   must stay visible — do not hide .sr-trend-grid / .sr-trend-panel. */
#srMainChart,
.sr-main-chart,
[id^="srTrendChart"]{
  display:none !important;
}

/* Multi-TF confluence strip (3M / 6M / 1Y daily panes) */
#srTrendChannelStrip.sr-mtf-strip{
  margin-top:10px;
  margin-bottom:12px;
}
#srTrendChannelStrip .sr-trend-head h3{
  margin:0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.4px;
  color:var(--cyan,#1bdcff);
}
#srTrendChannelStrip .sr-trend-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
#srTrendChannelStrip .sr-trend-panel{
  position:relative;
  min-height:248px;
  border:1px solid rgba(29,64,92,.6);
  border-radius:8px;
  background:rgba(7,19,30,.75);
  overflow:hidden;
}
#srTrendChannelStrip .sr-trend-panel-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:6px 8px 2px;
  font-size:11px;
}
#srTrendChannelStrip .sr-trend-close{
  color:#e8f6ff;
  font-weight:700;
}
#srTrendChannelStrip .sr-trend-label{
  margin-left:auto;
  font-weight:800;
  letter-spacing:.4px;
  padding:2px 7px;
  border-radius:999px;
  border:1px solid rgba(29,64,92,.7);
  background:rgba(12,28,42,.8);
}
#srTrendChannelStrip .sr-trend-label.is-up{
  color:#39ff5a;
  border-color:rgba(57,255,90,.45);
}
#srTrendChannelStrip .sr-trend-label.is-down{
  color:#ff4d4d;
  border-color:rgba(255,77,77,.45);
}
#srTrendChannelStrip .sr-trend-label.is-mixed{
  color:#fbbf24;
  border-color:rgba(251,191,36,.45);
}
#srTrendChannelStrip .sr-trend-regime{
  width:100%;
  font-size:10px;
  color:#9ec9dc;
}
#srTrendChannelStrip .sr-trend-chart{
  height:220px;
  position:relative;
}
#srTrendChannelStrip .sr-trend-wait{
  position:absolute;
  left:10px;
  bottom:10px;
  font-size:10px;
  color:#7fb8d0;
  pointer-events:none;
}
.sr-mtf-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:0 0 8px;
  font-size:10px;
}
.sr-mtf-swatch{
  padding:2px 7px;
  border-radius:999px;
  border:1px solid rgba(29,64,92,.7);
  font-weight:800;
}
.sr-mtf-swatch.is-daily{color:#22d3ee;border-color:rgba(34,211,238,.5)}
.sr-mtf-swatch.is-weekly{color:#fbbf24;border-color:rgba(251,191,36,.5)}
.sr-mtf-swatch.is-monthly{color:#a78bfa;border-color:rgba(167,139,250,.5)}
.hc-trend-map-labels{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:3;
}
.hc-trend-map-tag{
  position:absolute;
  font:800 9px/1 Arial,Helvetica,sans-serif;
  letter-spacing:.45px;
  pointer-events:none;
  white-space:nowrap;
  text-shadow:0 0 6px #07131e;
}
.hc-trend-map-tag.is-weekly{color:#fbbf24}
.hc-trend-map-tag.is-monthly{color:#a78bfa}
.hc-trend-map-tag.is-daily{color:#22d3ee}

@media (max-width:980px){
  #srTrendChannelStrip .sr-trend-grid{
    grid-template-columns:1fr;
  }
}

/* Safety: if Charts shell ever lands here, do not stretch-fight — JS moves it back */
#srChartDock > #highcrewChartShellHost{
  outline:2px solid #ef4444;
}

@media (max-width:900px){
  .sr-chart-dock,
  #srChartDock{min-height:280px;height:52vh}
  .sr-chart-shell-host,
  #srChartShellHost,
  .sr-lw-host,
  #srLwHost{min-height:280px}
}
