/* Charts & KPI styles */
@charset "UTF-8";

.mail-doctor-card--chart {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mail-doctor-card--chart .mail-doctor-chart-row {
	flex: 1 1 auto;
}

.mail-doctor-card--chart>.spinner {
	align-self: flex-start;
}

.mail-doctor-chart-row {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.mail-doctor-chart__canvas-wrap {
	position: relative;
	width: 160px;
	height: 160px;
	flex: 0 0 160px;
}

.mail-doctor-chart__canvas-wrap canvas {
	width: 100%;
	height: 100%;
	display: block;
}

.mail-doctor-chart__center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: 600;
	font-size: 20px;
	color: var(--mail-doctor-color-text);
	text-align: center;
	min-width: 48px;
}

.mail-doctor-chart-metrics {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1 1 auto;
}

.mail-doctor-metric {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.mail-doctor-metric__label {
	font-size: 13px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-metric__value {
	font-weight: 600;
	font-size: 16px;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-chart-legend {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mail-doctor-chart-row>.mail-doctor-chart-legend {
	flex: 1 1 auto;
	min-width: 0;
}

.mail-doctor-chart-legend--stacked {
	margin-top: 8px;
}

.mail-doctor-chart-legend li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mail-doctor-chart-label {
	flex: 1 1 auto;
	font-size: 13px;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-chart-legend strong {
	font-size: 15px;
	font-weight: 600;
	color: var(--mail-doctor-color-text);
}

.mail-doctor-chart-footnote {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--mail-doctor-color-muted);
}

.mail-doctor-card--chart .mail-doctor-chart-footnote {
	margin-top: auto;
	padding-top: 12px;
}

.mail-doctor-chart-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
	margin-right: 8px;
}

.mail-doctor-chart-dot.is-sent {
	background: var(--mail-doctor-color-success);
}

.mail-doctor-chart-dot.is-failed {
	background: var(--mail-doctor-color-danger);
}

.mail-doctor-chart-dot.is-queued {
	background: var(--mail-doctor-color-accent);
}

.mail-doctor-chart-dot.is-quarantined {
	background: var(--mail-doctor-color-warning);
}

.mail-doctor-chart-dot.is-neutral {
	background: var(--mail-doctor-color-border);
}

@media (max-width: 782px) {
	.mail-doctor-chart-row {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.mail-doctor-chart__canvas-wrap {
		width: 140px;
		height: 140px;
	}

	.mail-doctor-chart-metrics {
		width: 100%;
		align-items: center;
		gap: 16px;
	}

	.mail-doctor-metric {
		width: 100%;
		justify-content: center;
		gap: 8px;
	}

	.mail-doctor-chart-legend {
		width: 100%;
	}

	.mail-doctor-chart-legend li {
		justify-content: center;
		gap: 16px;
	}
}