/* Pin chart value popups to their bars.
 * Voxel uses position:fixed + viewport coords, which slips when a parent
 * (dashboard / Elementor) has transform, filter, or perspective. */

.ts-vendor-stats .chart-content .bar-item,
.ts-visits-chart .chart-content .bar-item {
	position: relative;
	overflow: visible;
}

.ts-vendor-stats .chart-content .bar-item-data,
.ts-visits-chart .chart-content .bar-item-data {
	position: absolute;
	display: none;
	z-index: 20;
	pointer-events: none;
	white-space: nowrap;
	left: calc(100% + 8px);
	top: 0;
	right: auto;
	bottom: auto;
}

.ts-vendor-stats .chart-content .bar-item--short .bar-item-data,
.ts-visits-chart .chart-content .bar-item--short .bar-item-data {
	left: 50%;
	right: auto;
	top: auto;
	bottom: 100%;
	margin-bottom: 8px;
	transform: translateX(-50%);
}

.ts-vendor-stats .chart-content .bar-item:hover > .bar-item-data,
.ts-vendor-stats .chart-content .bar-item:focus-visible > .bar-item-data,
.ts-visits-chart .chart-content .bar-item:hover > .bar-item-data,
.ts-visits-chart .chart-content .bar-item:focus-visible > .bar-item-data {
	display: flex;
}

.ts-vendor-stats .chart-content .bar-item-con:nth-last-child(-n+4) .bar-item:not(.bar-item--short) .bar-item-data,
.ts-visits-chart .chart-content .bar-item-con:nth-last-child(-n+4) .bar-item:not(.bar-item--short) .bar-item-data {
	left: auto;
	right: calc(100% + 8px);
}
