/* Página /pub/chart — TradingView precisa de altura explícita (px), não só min-height */

.cqs-chart-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 7.5rem);
}

.cqs-chart-shell {
  flex: 1 1 auto;
  width: 100%;
  min-height: 28rem;
  position: relative;
}

#cqs-tradingview-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* iframe injetado pelo widget */
#cqs-tradingview-chart iframe,
.cqs-chart-shell iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 28rem;
}

#cqs-lwc-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cqs-levels-shell {
  display: flex;
  flex-direction: column;
}

.cqs-levels-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

html.dark .cqs-levels-toolbar {
  border-bottom-color: #374151;
  background: #0f172a;
}

.cqs-levels-toolbar-symbol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.cqs-levels-pair {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
}

html.dark .cqs-levels-pair {
  color: #f9fafb;
}

.cqs-levels-exchange {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

html.dark .cqs-levels-exchange {
  color: #9ca3af;
}

.cqs-levels-market-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cqs-levels-market-futures {
  background: #fef3c7;
  color: #92400e;
}

html.dark .cqs-levels-market-futures {
  background: rgba(120, 53, 15, 0.35);
  color: #fcd34d;
}

.cqs-levels-market-spot {
  background: #e0f2fe;
  color: #075985;
}

html.dark .cqs-levels-market-spot {
  background: rgba(7, 89, 133, 0.35);
  color: #7dd3fc;
}

.cqs-levels-toolbar-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: #4b5563;
}

html.dark .cqs-levels-toolbar-meta {
  color: #9ca3af;
}

.cqs-levels-plot {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.chart-tabs .chart-tab {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
}

html.dark .chart-tabs .chart-tab {
  border-color: #374151;
  background: #111827;
  color: #d1d5db;
}

.chart-tabs .chart-tab-active {
  border-color: #059669;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

html.dark .chart-tabs .chart-tab-active {
  border-color: #10b981;
  background: #064e3b;
  color: #6ee7b7;
}

.chart-panel-hidden {
  display: none;
}
