/* 
 * Common Chart Styles for Asset Analysis
 * This file contains shared styles for all charts and graphs
 */

/* Chart container styles */
.chart-container {
  width: 100%;
  margin: 10px 0;
  padding: 0;
  background-color: rgb(37, 42, 51);
  border-radius: 4px;
  overflow: hidden;
}

/* Table container specific styles */
.table-container {
  max-height: none;
  overflow: visible;
}

/* Compact table styles */
.compact-table-container {
  margin-top: 5px;
  max-height: 50px;
  overflow: visible;
}

/* Ensure charts take appropriate space */
[id$="_graph"],
[id$="_plot"],
[id$="_matrix"],
[id$="_table"] {
  width: 100% !important;
  height: 100% !important;
  min-height: auto !important;
}

/* Make compact tables more compact */
.compact-table-container [id$="_graph"],
.compact-table-container [id$="_table"] {
  max-height: 50px !important;
  min-height: 50px !important;
  overflow: visible !important;
}

/* Remove extra padding from tables */
.js-plotly-plot {
  padding: 0 !important;
  margin: 0 !important;
}

/* Ensure cell text is clearly visible in compact tables */
.compact-table-container .cell-text {
  font-size: 11px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}

/* Table cell optimization */
.js-plotly-plot .plotly .scrollbox .ytable {
  margin: 0 !important;
}

/* Optimize tables for space utilization */
.js-plotly-plot .plotly .table .cell-text {
  padding: 2px 5px !important;
}

.js-plotly-plot .plotly .table .column-header {
  padding: 3px 5px !important;
}

/* Styling for chart header with controls */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.meta-data {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Optimize layout for charts */
.tool-container {
  display: flex;
  height: calc(100vh - 60px);
}

.tool-sidebar {
  flex: 0 0 280px;
  overflow-y: auto;
}

.tool-main {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

#result {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .tool-container {
    flex-direction: column;
    height: auto;
  }
  
  .tool-sidebar {
    flex: 0 0 auto;
    max-height: none;
  }
  
  /* Make tables scroll horizontally on small screens */
  .chart-container {
    overflow-x: auto;
  }
}

/* Stats styling */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 15px;
}

.stat-box {
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  min-width: 150px;
  flex-grow: 1;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: #adb5bd;
  margin-bottom: 5px;
}

.stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  color: #e9ecef;
}

.positive {
  color: #28a745;
}

.negative {
  color: #dc3545;
} 
