.kreston-chart {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem 1.25rem;
	background: #fff;
	border: 1px solid #e7eaee;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	font-family: inherit;
}

/* When a colourway paints the card, the figure carries --kreston-chart-bg and
   --kreston-chart-fg inline. Use them for the card surface and text. */
.kreston-chart--filled {
	background: var(--kreston-chart-bg, #fff);
	color: var(--kreston-chart-fg, #1f2933);
	border-color: rgba(0, 0, 0, 0.06);
}

/* Chart heading — rendered as an <h4> so it picks up the theme's heading
   cascade, with the brand-specific overrides applied here. */
.kreston-chart__title {
	font-family: "Tahoma W01 Bold", Tahoma, Arial, sans-serif;
	font-size: 22px;
	line-height: 1.2;
	margin-top: 0;
	margin-bottom: 20px;
	padding-bottom: 0;
}

/* Title follows the colourway foreground on a painted card. */
.kreston-chart--filled .kreston-chart__title {
	color: var(--kreston-chart-fg, inherit);
}

.kreston-chart__canvas-wrap {
	position: relative;
	width: 100%;
	height: var(--kreston-chart-height, 400px);
}

.kreston-chart__canvas-wrap canvas {
	max-width: 100%;
}

.kreston-chart-error {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	background: #fff4f4;
	border: 1px solid #f3c2c2;
	border-radius: 6px;
	color: #7a1f1f;
	font-size: 0.9rem;
}

.kreston-chart-error code {
	background: rgba(0, 0, 0, 0.05);
	padding: 0.05rem 0.3rem;
	border-radius: 3px;
}

/* RTL: applied via dir="rtl" set by the PHP shortcode when the WPML locale is RTL. */
.kreston-chart[dir="rtl"] {
	text-align: right;
}

.kreston-chart[dir="rtl"] .kreston-chart__title {
	direction: rtl;
}
