/* 2025 ROE vs ROIC chart lab. Scale: -15% to 30%. */
.bqe-roe-chart {
	--bqe-roe-min: -15;
	--bqe-roe-span: 45;
	--bqe-roe-zero: 33.333333%;
	--bqe-roe-plot: 420px;
	--bqe-roe-navy: #0e1d58;
	--bqe-roe: #32719d;
	--bqe-roic: #c7dfe9;
	--bqe-glass: rgba(255, 255, 255, 0.14);
	margin: 0;
	max-width: none;
	width: 100%;
	padding: 28px 22px 22px;
	background: var(--bqe-roe-navy);
	color: #fff;
	font-family: Montserrat, sans-serif;
	box-sizing: border-box;
}

.bqe-roe-chart *,
.bqe-roe-chart *::before,
.bqe-roe-chart *::after {
	box-sizing: border-box;
}

.bqe-roe-chart__plot {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	column-gap: 8px;
}

.bqe-roe-chart__y,
.bqe-roe-chart__stage {
	position: relative;
	height: var(--bqe-roe-plot);
}

.bqe-roe-chart__tick,
.bqe-roe-chart__line {
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc((var(--tick) - var(--bqe-roe-min)) / var(--bqe-roe-span) * 100%);
	transform: translateY(50%);
}

.bqe-roe-chart__tick {
	right: auto;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: #fff;
	white-space: nowrap;
}

.bqe-roe-chart__line {
	height: 1px;
	background: rgba(255, 255, 255, 0.55);
	transform: translateY(50%);
	pointer-events: none;
}

.bqe-roe-chart__line.is-zero {
	height: 2px;
	margin-bottom: -1px;
	background: #fff;
	transform: none;
	z-index: 2;
}

.bqe-roe-chart__groups {
	position: relative;
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	height: 100%;
	padding: 0 6px;
}

.bqe-roe-chart__group {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	height: 100%;
	outline: none;
}

.bqe-roe-chart__pair {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: stretch;
	gap: 8px;
	width: 100%;
	height: 100%;
}

.bqe-roe-chart__bar {
	position: relative;
	width: 34px;
	height: 100%;
	flex: 0 0 34px;
}

.bqe-roe-chart__fill {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 1;
	height: calc(var(--mag) / var(--bqe-roe-span) * 100%);
}

.bqe-roe-chart__bar--pos .bqe-roe-chart__fill {
	bottom: var(--bqe-roe-zero);
}

.bqe-roe-chart__bar--neg .bqe-roe-chart__fill {
	top: calc(100% - var(--bqe-roe-zero));
}

.bqe-roe-chart__bar--roe .bqe-roe-chart__fill {
	background: var(--bqe-roe);
}

.bqe-roe-chart__bar--roic .bqe-roe-chart__fill {
	background: var(--bqe-roic);
}

.bqe-roe-chart__val {
	position: absolute;
	left: 50%;
	z-index: 3;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	white-space: nowrap;
	pointer-events: none;
}

.bqe-roe-chart__bar--pos .bqe-roe-chart__val {
	bottom: calc(var(--bqe-roe-zero) + (var(--mag) * 100% / var(--bqe-roe-span)));
	transform: translate(-50%, calc(-100% - 4px));
}

.bqe-roe-chart__bar--neg .bqe-roe-chart__val {
	top: calc((100% - var(--bqe-roe-zero)) + (var(--mag) * 100% / var(--bqe-roe-span)));
	transform: translate(-50%, 4px);
}

.bqe-roe-chart__name {
	position: absolute;
	top: calc(100% + 14px);
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	outline: none;
	box-shadow: none !important;
	background: none !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	font-style: normal;
	letter-spacing: 0.02em;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	z-index: 6;
}

.bqe-roe-chart__name-text {
	position: relative;
	z-index: 1;
}

.bqe-roe-chart__name::before {
	content: "";
	position: absolute;
	inset: -5px -10px;
	border-radius: 10px;
	background: var(--bqe-glass);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 140ms ease;
	z-index: 0;
}

.bqe-roe-chart__name:hover::before,
.bqe-roe-chart__name:focus-visible::before {
	opacity: 1;
}

.bqe-roe-chart__pop {
	display: none;
	position: absolute;
	z-index: 2;
	bottom: calc(100% + 12px);
	left: 50%;
	width: max-content;
	max-width: 320px;
	padding: 12px 14px 10px;
	transform: translateX(-50%);
	background: #f4f7fb;
	color: #0e1d58;
	text-align: left;
	white-space: normal;
	border-radius: 10px;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
	cursor: default;
	text-transform: none;
}

.bqe-roe-chart__name:hover .bqe-roe-chart__pop,
.bqe-roe-chart__name:focus-visible .bqe-roe-chart__pop {
	display: block;
}

.bqe-roe-chart__group:nth-child(-n+2) .bqe-roe-chart__pop {
	left: 0;
	transform: none;
}

.bqe-roe-chart__group:nth-last-child(-n+2) .bqe-roe-chart__pop {
	left: auto;
	right: 0;
	transform: none;
}

.bqe-roe-chart__pop-name {
	display: block;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	color: #0e1d58;
}

.bqe-roe-chart__pop-ex {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #32719d;
}

.bqe-roe-chart__pop-stats {
	display: flex;
	flex-wrap: nowrap;
	gap: 14px;
	margin-top: 10px;
	font-size: 12px;
	font-weight: 600;
	color: #0e1d58;
	white-space: nowrap;
}

.bqe-roe-chart__pop-stats span {
	display: flex;
	align-items: center;
	gap: 8px;
}

.bqe-roe-chart__fill.is-hot::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 3px;
	background: #fff;
	box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.85);
}

.bqe-roe-chart__bar--pos .bqe-roe-chart__fill.is-hot::after {
	top: 0;
}

.bqe-roe-chart__bar--neg .bqe-roe-chart__fill.is-hot::after {
	bottom: 0;
}

.bqe-roe-chart__legend {
	display: flex;
	justify-content: flex-start;
	gap: 22px;
	margin: 78px 0 0;
	padding: 0;
	color: #fff;
	font-style: normal;
}

.bqe-roe-chart__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	font-style: normal;
	line-height: 1;
}

.bqe-roe-chart__swatch {
	display: inline-block !important;
	width: 14px !important;
	height: 14px !important;
	flex: 0 0 14px;
}

.bqe-roe-chart__swatch--roe {
	background: var(--bqe-roe);
}

.bqe-roe-chart__swatch--roic {
	background: var(--bqe-roic);
}

@media (max-width: 800px) {
	.bqe-roe-chart {
		overflow-x: auto;
	}

	.bqe-roe-chart__plot {
		min-width: 760px;
	}

	.bqe-roe-chart__legend {
		min-width: 760px;
	}
}
