/**
 * WordPress layout — theme cascade safety only.
 * Layout rules: frontend/style.css (#fxchart-root section)
 */

#fxchart-root .fx-layout-main {
  position: relative !important;
}

@media (min-width: 1024px) {
  #fxchart-root .fxchart-wp-shell {
    width: var(--page-max-width, 800px) !important;
    max-width: var(--page-max-width, 800px) !important;
    min-width: var(--page-max-width, 800px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 1023px) {
  #fxchart-root .fxchart-wp-shell {
    width: var(--fx-pc-design-width, 800px) !important;
    max-width: var(--fx-pc-design-width, 800px) !important;
    min-width: var(--fx-pc-design-width, 800px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform-origin: top center !important;
    flex: 0 0 auto !important;
  }
}

#fxchart-root .fx-layout-main .charts-box:not(.charts-box--zone2-pair) {
  overflow: hidden !important;
  contain: layout paint !important;
}

#fxchart-root .fx-zone2-chart-grid.charts-box--zone2-pair {
  overflow: hidden !important;
  contain: layout !important;
  isolation: auto !important;
  height: var(--zone2-charts-box-height, var(--chart-display-height, 410px)) !important;
  min-height: var(--zone2-charts-box-height, var(--chart-display-height, 410px)) !important;
  max-height: var(--zone2-charts-box-height, var(--chart-display-height, 410px)) !important;
}

#fxchart-root .charts-box.charts-box--zone2-pair::before {
  display: none !important;
  content: none !important;
}

#fxchart-root .fx-zone2-chart-col2.futures-mini-col,
#fxchart-root .futures-mini-sidebar {
  background: transparent !important;
}

#fxchart-root article.futures-mini-card,
#fxchart-root .futures-mini-card {
  background: rgba(255, 255, 255, 0.03) !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  background-image: none !important;
  border: none !important;
  border-radius: 6px !important;
  outline: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#fxchart-root .futures-mini-card.futures-mini-closed,
#fxchart-root #futures-mini-nikkei.nikkei-spot-closed,
#fxchart-root .futures-mini-card.nikkei-spot-closed {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

#fxchart-root .futures-mini-card.futures-mini-closed::before,
#fxchart-root .futures-mini-card.futures-mini-closed::after,
#fxchart-root #futures-mini-nikkei.nikkei-spot-closed::before,
#fxchart-root #futures-mini-nikkei.nikkei-spot-closed::after {
  display: none !important;
  content: none !important;
}

#fxchart-root .fx-zone2-chart-grid.charts-box--zone2-pair .chart-panel {
  padding-bottom: 0 !important;
  gap: 0 !important;
}

#fxchart-root .fx-zone2-chart-grid.charts-box--zone2-pair > .fx-zone2-chart-col1,
#fxchart-root .fx-zone2-chart-grid.charts-box--zone2-pair > .fx-zone2-chart-col2 {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
}

#fxchart-root .fx-zone2-chart-grid.charts-box--zone2-pair .futures-mini-sidebar {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
}

#fxchart-root .fx-zone2-news-full {
  height: var(--chart-top-bar-height, 2.5rem) !important;
  min-height: var(--chart-top-bar-height, 2.5rem) !important;
  max-height: var(--chart-top-bar-height, 2.5rem) !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

#fxchart-root .fx-layout-main > .news-preview-dock,
#fxchart-root .news-preview-dock,
#fxchart-root .news-preview-dock.is-open {
  position: absolute !important;
  top: var(--news-preview-dock-top, var(--chart-top-bar-height, 2.5rem)) !important;
  left: 0 !important;
  right: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  z-index: 45 !important;
}

#fxchart-root .news-preview.visible,
#fxchart-root .news-preview-dock.is-open .news-preview.visible {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 0 !important;
  left: var(--news-preview-left, var(--safe-inline, 18px)) !important;
  right: auto !important;
  width: var(--news-preview-width, 50%) !important;
  max-width: var(--news-preview-width, 50%) !important;
  min-height: var(--news-preview-min-height, 78px) !important;
  max-height: var(--news-preview-max-height, min(230px, 36vh)) !important;
  transform: none !important;
  pointer-events: auto !important;
  z-index: 45 !important;
}

#fxchart-root .fx-prices-box .price-cards-table {
  display: table !important;
}

.price-card.flat .change{
  color:var(--muted) !important;
}

#fxchart-root .pair-select-wrap.is-open,
#fxchart-root .fx-news-ticker-row:has(.pair-select-wrap.is-open),
#fxchart-root .fx-zone2-chart-head:has(.pair-select-wrap.is-open) {
  overflow: visible !important;
  z-index: 55 !important;
}
