/* Chart and Graph Global Sizing - 50% smaller */

/* All charts and canvases */
canvas {
    max-height: 120px !important;
    transform: scale(1.0);
    transform-origin: center center;
    margin: 0 auto;
    display: block;
    width: 100% !important;
}

.chart-container,
.graph-container {
    max-height: 140px !important;
    font-size: 0.6rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
    width: 100%;
}

/* Chart legends */
.chart-legend,
.chartjs-legend {
    font-size: 0.1rem !important;
}

/* Chart labels */
.chartjs-render-monitor text,
.chart-label {
    font-size: 0.35rem !important;
}

/* Analytics/Fundraising specific */
#leagueTablesChart,
#fundraisingChart,
#dealFlowChart,
#analyticsChart {
    max-height: 140px !important;
    width: 100% !important;
}

/* Table text in analytics pages */
.analytics-table,
.fundraising-table,
.league-table {
    font-size: 0.6rem !important;
}

.analytics-table th,
.fundraising-table th,
.league-table th {
    font-size: 0.55rem !important;
    padding: 0.25rem 0.35rem !important;
}

.analytics-table td,
.fundraising-table td,
.league-table td {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.35rem !important;
}

/* Chart titles */
.chart-title {
    font-size: 0.7rem !important;
    font-weight: 700;
}

/* Make all chart text elements much smaller */
.chartjs-render-monitor,
.chartjs-render-monitor * {
    font-size: 0.3rem !important;
}

/* Specific chart label targeting */
.chartjs-render-monitor text[data-text],
.chartjs-render-monitor .chartjs-tooltip,
.chartjs-render-monitor .chartjs-legend-item {
    font-size: 0.25rem !important;
}

/* Axis labels */
.chartjs-render-monitor .chartjs-axis-label {
    font-size: 0.3rem !important;
}

/* Legend items */
.chartjs-render-monitor .chartjs-legend-item {
    font-size: 0.25rem !important;
}

/* Hide chart labels that appear inside segments */
.chartjs-render-monitor text[data-text] {
    display: none !important;
}

/* Force legend to be much smaller */
.chartjs-legend {
    font-size: 0.1rem !important;
}

.chartjs-legend li {
    font-size: 0.1rem !important;
    margin: 0.02rem !important;
    padding: 0.01rem !important;
}

/* Stat numbers in charts */
.stat-number {
    font-size: 0.95rem !important;
}

/* Ultra-small legends for portfolio charts */
#yearChart + .chartjs-legend,
#sectorChart + .chartjs-legend,
#countryChart + .chartjs-legend {
    font-size: 0.08rem !important;
}

#yearChart + .chartjs-legend li,
#sectorChart + .chartjs-legend li,
#countryChart + .chartjs-legend li {
    font-size: 0.08rem !important;
    margin: 0.01rem !important;
    padding: 0.005rem !important;
}

/* Target all chart legends specifically */
.chartjs-legend,
.chartjs-legend * {
    font-size: 0.08rem !important;
    line-height: 0.1rem !important;
}

/* Tooltips */
.chartjs-tooltip {
    font-size: 0.5rem !important;
}

/* Make all headings in content areas smaller */
h1, h2, h3, h4, h5, h6 {
    font-size: inherit !important;
}

h1 { font-size: 0.9rem !important; }
h2 { font-size: 0.8rem !important; }
h3 { font-size: 0.75rem !important; }
h4 { font-size: 0.7rem !important; }

/* Buttons globally */
button, .btn, .button {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* Input fields */
input, select, textarea {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.5rem !important;
}

