/* Base container styles */
.price-graph-container {
	display: flex;
	flex-direction: column;
	margin-top: 20px;
	padding: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 5px;
	background-color: #fafafa;
	max-width: 100%;
	box-sizing: border-box; /* makes shortcode exact width/height include padding/border */
}

/* Description (above canvas) */
.price-graph-description {
	pointer-events: none;
	text-decoration: none;
	font-size: 1em;
	font-weight: normal;
	margin: 0 0 10px 0;
	flex: 0 0 auto;
}

.price-graph-description:hover,
.price-graph-description:active,
.price-graph-description:focus {
	text-decoration: none;
}

/* Canvas wrapper: flex child that takes remaining space */
.price-graph-canvas-wrap {
	flex: 1 1 auto;
	position: relative;
	min-height: 0; /* critical for flex children to not overflow */
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* Canvas sizing */
.price-graph-canvas-wrap canvas {
	width: 100% !important;
	height: 100% !important;
	display: block;
	box-sizing: border-box;
}

/* Shortcode-specific container: fixed size (width/height set inline by PHP) */
.price-graph-container--shortcode {
	overflow: hidden;
}

/* Tab icon */
.wplp-price-graph-tab img {
	vertical-align: text-top;
	margin-right: 5px;
	width: 20px;
	height: 16px;
}

/* Dark mode styles */
.price-graph-container.dark-mode {
	background-color: #333333 !important;
	color: #ffffff;
}

.price-graph-container.dark-mode canvas {
	background-color: #333333;
}

.price-graph-container.dark-mode .price-graph-description {
	color: #dcdcdc;
}

.price-graph-container.dark-mode .chartjs-render-monitor {
	border-color: #dcdcdc;
}

.price-graph-container.dark-mode .chartjs-tooltip {
	background-color: #333333;
	color: #ffffff;
	border: 1px solid #555555;
}
