/**
 * charts - styling for the ApexCharts wrapper.
 *
 * ApexCharts ships its own stylesheet (the apexcharts vendor CSS). Here we only
 * realign the few surfaces it draws itself (tooltips) to our theme tokens, so a
 * chart's tooltip matches the app's cards in both light and dark. The chart
 * body colors/fonts come from the JS theme layer (src/js/theme.js), not here.
 */
.genus-chart {
  min-height: 0;
}
.genus-chart .apexcharts-canvas {
  max-width: 100%;
}

.apexcharts-tooltip.apexcharts-theme-light,
.apexcharts-tooltip.apexcharts-theme-dark {
  background: var(--genus-card-bg, var(--bs-body-bg)) !important;
  color: var(--bs-body-color) !important;
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 0.3rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
}

.apexcharts-tooltip-title {
  background: var(--bs-tertiary-bg) !important;
  border-bottom: 1px solid var(--bs-border-color) !important;
  font-family: inherit;
  font-weight: 600;
}

.apexcharts-tooltip-series-group,
.apexcharts-tooltip-series-group.apexcharts-active {
  background: transparent !important;
  color: var(--bs-body-color) !important;
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  background: var(--genus-card-bg, var(--bs-body-bg)) !important;
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color) !important;
  border-radius: 0.2rem;
}

.apexcharts-xaxistooltip-bottom::before {
  border-bottom-color: var(--bs-border-color) !important;
}

.apexcharts-xaxistooltip-bottom::after {
  border-bottom-color: var(--genus-card-bg, var(--bs-body-bg)) !important;
}

.apexcharts-xaxistooltip-top::before {
  border-top-color: var(--bs-border-color) !important;
}

.apexcharts-xaxistooltip-top::after {
  border-top-color: var(--genus-card-bg, var(--bs-body-bg)) !important;
}

.apexcharts-legend-text {
  font-family: inherit !important;
}
