/* BACKFUTURE_MARKET_CHART_V2 */

.bfmcV2Menu{
  position:fixed;
  z-index:1000001;
  width:min(360px,calc(100vw - 24px));
  max-height:min(520px,70vh);
  overflow:auto;
  background:#07111f;
  color:#e5e7eb;
  border:1px solid rgba(148,163,184,.28);
  border-radius:12px;
  box-shadow:0 20px 55px rgba(0,0,0,.38);
  padding:8px;
}

.bfmcV2Menu[hidden]{
  display:none!important;
}

.bfmcV2Search{
  width:100%;
  box-sizing:border-box;
  height:38px;
  border-radius:8px;
  border:1px solid rgba(148,163,184,.26);
  background:#0f172a;
  color:#fff;
  padding:0 10px;
  margin-bottom:7px;
}

.bfmcV2Indicator{
  display:flex;
  align-items:flex-start;
  gap:8px;
  width:100%;
  padding:9px 8px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#e5e7eb;
  text-align:left;
  cursor:pointer;
}

.bfmcV2Indicator:hover{
  background:rgba(59,130,246,.13);
}

.bfmcV2Indicator.active{
  background:rgba(34,197,94,.12);
}

.bfmcV2IndicatorMain{
  display:block;
  font-weight:650;
  font-size:13px;
}

.bfmcV2IndicatorSub{
  display:block;
  margin-top:2px;
  color:#94a3b8;
  font-size:11px;
}

.bfmcV2Check{
  width:18px;
  flex:0 0 18px;
}

#bfmcV2MarketHint{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 8px;
  border-radius:8px;
  font-size:11px;
  color:#64748b;
  background:rgba(148,163,184,.08);
}

#bfMultiChartWorkspace{
  position:fixed;
  inset:0;
  z-index:999999;
  background:#020817;
  display:flex;
  flex-direction:column;
}

#bfMultiChartWorkspace[hidden]{
  display:none!important;
}

.bfmcV2WorkspaceBar{
  height:46px;
  flex:0 0 46px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border-bottom:1px solid rgba(148,163,184,.2);
  background:#07111f;
  color:#e5e7eb;
}

.bfmcV2WorkspaceBar button{
  height:32px;
  padding:0 10px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:8px;
  background:#0f172a;
  color:#e5e7eb;
  cursor:pointer;
}

.bfmcV2WorkspaceBar button.active{
  border-color:#3b82f6;
  background:rgba(59,130,246,.2);
}

.bfmcV2Grid{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  gap:3px;
  padding:3px;
  background:#020817;
}

.bfmcV2Frame{
  width:100%;
  height:100%;
  border:1px solid rgba(148,163,184,.18);
  border-radius:7px;
  background:#fff;
}

html.bfmc-v2-panel,
html.bfmc-v2-panel body{
  margin:0!important;
  min-width:0!important;
}

html.bfmc-v2-panel #indicators{
  display:none!important;
}

html.bfmc-v2-panel #chart{
  height:calc(100vh - 205px)!important;
  min-height:280px!important;
}

html.bfmc-v2-panel .shell{
  max-width:none!important;
  width:100%!important;
  margin:0!important;
}


/*
 * BACKFUTURE_MARKET_TF_ROW_RESTORE_V1
 *
 * Restore the original full quick-timeframe presentation.
 *
 * The old Pro UI switched .tfbar to nowrap + horizontal scroll.
 * Market Chart V2 must show all quick buttons again:
 *
 * 1s 5s 15s 1m 3m 5m 15m 1h 4h 1d Все ТФ ☆
 *
 * UI only.
 */

#quickTf{
  grid-column:1 / -1 !important;

  width:100% !important;
  max-width:none !important;

  display:flex !important;
  align-items:center !important;

  flex-wrap:wrap !important;

  overflow-x:visible !important;
  overflow-y:visible !important;

  gap:8px !important;

  padding-top:6px !important;
  padding-bottom:4px !important;
}

#quickTf > *{
  display:inline-flex !important;
  visibility:visible !important;

  flex:0 0 auto !important;

  opacity:1 !important;
}

#bfmcV2MarketHint{
  width:auto !important;
  min-width:0 !important;
  max-width:max-content !important;

  flex:0 0 auto !important;

  white-space:nowrap !important;

  padding-left:9px !important;
  padding-right:9px !important;
}


/*
 * Keep the complete row usable in iframe panels too.
 */
html.bfmc-v2-panel #quickTf{
  grid-column:1 / -1 !important;
  flex-wrap:wrap !important;
  overflow:visible !important;
}


/*
 * Small screens may still wrap naturally to several rows.
 * We do NOT hide timeframe buttons.
 */
@media(max-width:980px){

  #quickTf{
    grid-column:1 / -1 !important;
    flex-wrap:wrap !important;
  }
}


/*
 * BACKFUTURE_TV_STANDARD_CATALOG_V1
 */

.bfmcV2CatalogTitle{
  padding:7px 8px 1px;
  font-size:15px;
  font-weight:800;
  color:#f8fafc;
}

.bfmcV2CatalogMeta{
  padding:0 8px 8px;
  font-size:11px;
  color:#94a3b8;
}

.bfmcV2Menu{
  width:min(
    420px,
    calc(100vw - 24px)
  );
}


/*
 * BACKFUTURE_INDICATOR_UI_CLEAN_V1
 *
 * The old indicator strip remains alive in DOM because
 * Market Chart V2 uses its checkboxes as the compatibility
 * bridge to the existing indicator state/render engine.
 *
 * It is visually removed only.
 */

#indicators{
  position:absolute !important;

  width:1px !important;
  height:1px !important;

  padding:0 !important;
  margin:-1px !important;

  overflow:hidden !important;

  clip:rect(0 0 0 0) !important;
  clip-path:inset(50%) !important;

  white-space:nowrap !important;

  border:0 !important;

  pointer-events:none !important;
}


/*
 * Hide internal seed/engine metadata only from the
 * standard technical indicator menu.
 *
 * Back Future menu metadata is preserved.
 */

.bfmcV2TechMenu .bfmcV2InternalMeta{
  display:none !important;
}


/*
 * Cleaner technical list, closer to TradingView.
 */

.bfmcV2TechMenu{
  width:min(
    500px,
    calc(100vw - 24px)
  ) !important;
}

.bfmcV2TechMenu .bfmcV2Indicator{
  min-height:42px;
}



/*
 * BACKFUTURE_INDICATOR_EDITOR_LINK_R14
 */

.bfmcV2CatalogHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:7px 8px 8px;
}

.bfmcV2CatalogHeadLeft{
  min-width:0;
}

.bfmcV2CatalogHead .bfmcV2CatalogTitle{
  padding:0 0 1px;
}

.bfmcV2CatalogHead .bfmcV2CatalogMeta{
  padding:0;
}

.bfmcV2EditorLink{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 11px;
  border:1px solid #2f80ed;
  border-radius:8px;
  background:#10284a;
  color:#dbeafe;
  font-size:12px;
  font-weight:700;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
}

.bfmcV2EditorLink:hover{
  background:#173968;
  border-color:#60a5fa;
  color:#fff;
}

