/* Segmental Performance page — Pie charts and dynamic callout badges */

.sp-wrapper {
	max-width: 1000px;
	margin: 0 auto;
}

.sp-wrapper .section-title {
	text-align: center;
	font-size: clamp(16px, 2.2vw, 20px);
	font-weight: 700;
	margin-bottom: 40px;
	color: #1d398d;
}

.sp-wrapper .section-title span {
	position: relative;
	display: inline-block;
	padding-bottom: 6px;
}

.sp-wrapper .section-title span::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 30%;
	right: 30%;
	height: 3px;
	background-color: #1d398d;
}

.sp-wrapper .charts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 40px;
	margin-bottom: 30px;
}

.sp-wrapper .chart-card {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.sp-wrapper .chart-header {
	font-size: clamp(16px, 1.8vw, 19px);
	font-weight: 700;
	color: #1d398d;
	margin-bottom: 20px;
}

.sp-wrapper .chart-container {
	position: relative;
	width: 100%;
	max-width: 320px;
	aspect-ratio: 1;
	margin-bottom: 25px;
}

/* Callout Badge — hidden by default, colored dynamically via JS */
.sp-wrapper .callout-badge {
	position: absolute;
	right: -10px;
	top: 48%;
	transform: translateY(-50%) scale(0.9);
	background-color: #ffffff;
	border: 1.5px solid #ff9d42;
	border-radius: 6px;
	padding: 6px 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	text-align: center;
	z-index: 10;
	pointer-events: none;

	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, border-color 0.2s ease;
}

.sp-wrapper .callout-badge.active {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) scale(1);
}

.sp-wrapper .callout-badge .label {
	font-size: 10px;
	font-weight: 600;
	line-height: 1.2;
	transition: color 0.2s ease;
}

.sp-wrapper .callout-badge .value {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	transition: color 0.2s ease;
}

.sp-wrapper .total-box {
	text-align: center;
}

.sp-wrapper .total-label {
	font-size: clamp(12px, 1.2vw, 14px);
	color: #1d398d;
	font-weight: 600;
	margin-bottom: 4px;
}

.sp-wrapper .total-value {
	font-size: clamp(22px, 2.5vw, 28px);
	font-weight: 800;
	color: #1d398d;
}

.sp-wrapper .custom-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 20px;
	margin-top: 20px;
	padding: 0 10px;
}

.sp-wrapper .legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: clamp(10px, 1vw, 12px);
	color: #6a7995;
	font-weight: 600;
}

.sp-wrapper .legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.sp-wrapper .charts-grid {
		grid-template-columns: 1fr;
		gap: 50px;
	}

	.sp-wrapper .chart-container {
		max-width: 280px;
	}

	.sp-wrapper .callout-badge {
		right: 0px;
	}
}

/* Segmental Performance page — NPI Margin / Revenue Growth / NPI Growth by Property */

.npm-section {
	background-color: #1F3C940D;
	padding: 40px 15px;
	margin-top: 60px;
}

.npm-wrapper {
	max-width: 1100px;
	margin: 0 auto;
}

.npm-wrapper .npm-section-title {
	text-align: center;
	font-size: clamp(16px, 2.2vw, 20px);
	font-weight: 700;
	margin-bottom: 40px;
	color: #1d398d;
}

.npm-wrapper .npm-section-title span {
	position: relative;
	display: inline-block;
	padding-bottom: 6px;
}

.npm-wrapper .npm-section-title span::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 30%;
	right: 30%;
	height: 3px;
	background-color: #1d398d;
}

.npm-wrapper .npm-charts-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin-bottom: 30px;
}

.npm-wrapper .npm-chart-card {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.npm-wrapper .npm-chart-header {
	font-size: clamp(15px, 1.5vw, 18px);
	font-weight: 700;
	color: #1d398d;
	margin-bottom: 25px;
	text-align: center;
}

.npm-wrapper .npm-chart-container {
	position: relative;
	width: 100%;
	max-width: 270px;
	aspect-ratio: 1;
	margin-bottom: 10px;
}

.npm-wrapper .npm-callout-badge {
	position: absolute;
	right: -10px;
	top: 22%;
	transform: translateY(-50%) scale(0.9);
	background-color: #ffffff;
	border: 1.5px solid #ff9d42;
	border-radius: 6px;
	padding: 5px 9px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	text-align: center;
	z-index: 10;
	pointer-events: none;

	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, border-color 0.2s ease;
}

.npm-wrapper .npm-callout-badge.npm-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) scale(1);
}

.npm-wrapper .npm-callout-badge .npm-label {
	font-size: 10px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.npm-wrapper .npm-callout-badge .npm-value {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	transition: color 0.2s ease;
}

.npm-wrapper .npm-custom-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 20px;
	margin-top: 30px;
	padding: 0 10px;
}

.npm-wrapper .npm-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: clamp(10px, 1vw, 12px);
	color: #6a7995;
	font-weight: 600;
}

.npm-wrapper .npm-legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.npm-wrapper .npm-note-box {
	background-color: #f4f5f8;
	border-radius: 8px;
	padding: 16px 20px;
	text-align: center;
	font-size: clamp(11px, 1.1vw, 13px);
	color: #6b7796;
	line-height: 1.5;
	margin-top: 40px;
}

@media (max-width: 900px) {
	.npm-wrapper .npm-charts-grid-3 {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.npm-wrapper .npm-chart-container {
		max-width: 260px;
	}

	.npm-wrapper .npm-callout-badge {
		right: 0px;
	}
}
