/* TradingView Chart Custom Dark Theme */
/* Makes all UI elements match the chart background color */

:root {
  /* Header and platform background */
  --tv-color-platform-background: #0e0e10;
  --tv-color-pane-background: #0e0e10;
  
  /* Toolbar colors */
  --tv-color-toolbar-button-background-expanded: #0e0e10;
  --tv-color-toolbar-button-background-active: #1e1e21;
  --tv-color-toolbar-divider-background: #1e1e21;
  --tv-color-toolbar-button-text: #ffffff;
  --tv-color-toolbar-button-background-hover: #1e1e21;
  --tv-color-toolbar-button-text-active: #00ff97;
  --tv-color-toolbar-button-text-active-hover: #ffffff;
  --tv-color-toolbar-toggle-button-background-active: #1e1e21;
  --tv-color-toolbar-toggle-button-background-active-hover: #2a2a2d;
  
  /* Other UI elements */
  --tv-color-item-active-text: #00ff97;
  --tv-color-popup-background: #0e0e10;
  --tv-color-popup-element-divider-background: #1e1e21;
}

/* Remove header borders */
.tv-header,
.layout__area--top {
  border-bottom: none !important;
}

/* Bottom toolbar and control bar */
.tv-bottom-toolbar,
.tv-control-bar,
.chart-controls-bar {
  background-color: #0e0e10 !important;
  border-top: 1px solid #1e1e21 !important;
}

/* Sidebars and panels */
.tv-side-toolbar,
.tv-side-panel,
.chart-widget__top,
.chart-widget__bottom {
  background-color: #0e0e10 !important;
  border-color: #0e0e10 !important;
}

/* Price scale areas (right sidebar) */
.price-axis,
.price-axis-container,
.chart-widget__right-toolbar {
  background-color: #0e0e10 !important;
  border-left: none !important;
}

/* Time scale area (bottom) */
.time-axis,
.time-axis-container {
  background-color: #0e0e10 !important;
  border-top: none !important;
}

/* Legend container */
.legend-wrapper,
.legend,
.pane-legend {
  background-color: transparent !important;
}

/* Drawing toolbar */
.drawing-toolbar,
.drawing-toolbar__container {
  background-color: #0e0e10 !important;
  border-color: #1e1e21 !important;
}

/* Popup menus and dialogs */
.tv-popup-widget,
.tv-dialog,
.tv-dialog__modal-wrap {
  background-color: #0e0e10 !important;
  border-color: #1e1e21 !important;
}

/* Chart container background */
.chart-container,
.chart-widget,
.chart-markup-table,
.chart-page,
.layout__area--center {
  background-color: #0e0e10 !important;
}

/* Main chart area */
.chart-container-border {
  background-color: #0e0e10 !important;
}

/* The actual canvas container */
.chart-gui-wrapper {
  background-color: #0e0e10 !important;
}

/* Remove unnecessary borders */
.chart-widget__area--left,
.chart-widget__area--right {
  border: none !important;
}

/* Button backgrounds in toolbars */
.tv-header .button,
.tv-header .apply-common-tooltip,
.tv-floating-toolbar__widget {
  background-color: transparent !important;
}

.tv-header .button:hover,
.tv-floating-toolbar__widget:hover {
  background-color: #1e1e21 !important;
}

/* Symbol search widget */
.tv-symbol-search-dialog,
.tv-symbol-header {
  background-color: #0e0e10 !important;
}

/* Interval/resolution buttons */
.tv-resolution-selector,
.tv-interval-dialog {
  background-color: #0e0e10 !important;
}

/* Context menus */
.tv-context-menu,
.context-menu {
  background-color: #0e0e10 !important;
  border: 1px solid #1e1e21 !important;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0e0e10;
}

::-webkit-scrollbar-thumb {
  background: #1e1e21;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a2a2d;
}

/* Loading screen */
.tv-spinner,
.loading-indicator {
  background-color: #0e0e10 !important;
}

/* Chart controls (zoom, scroll buttons) */
.chart-controls-bar__group,
.chart-controls-bar__btn {
  background-color: transparent !important;
}

.chart-controls-bar__btn:hover {
  background-color: #1e1e21 !important;
}

/* Status line and market status */
.tv-market-status,
.tv-data-mode {
  background-color: #0e0e10 !important;
}

/* Remove all unnecessary box shadows */
.tv-side-toolbar,
.tv-header,
.chart-controls-bar {
  box-shadow: none !important;
}

/* Ensure text remains visible */
.tv-header *,
.tv-control-bar *,
.chart-controls-bar *,
.pane-legend-line *,
.series-12hzsxbp {
  color: #ffffff !important;
}

/* Active/selected states */
.tv-header .button.active,
.tv-header .button.selected {
  background-color: #1e1e21 !important;
}