/**
 * Impact bar: one design for every boxed row of headline figures, the
 * Mobile Eye Clinic page's "Our impact" bar (mec.css, .ab-mec-impact).
 *
 * Applied over each page's own stat styles, loaded after them and only on
 * pages that have one (inc/enqueue.php):
 *   .ab-prog-stats  Permanent Hospitals / School Screening / Training (program.css)
 *   .ab-cty-stats   country pages (country.css)
 *   .ab-www-stats   Where We Work (wherewework.css)
 *   .ab-ow-stats    Our Work (our-work.css)
 *   .ab-home-proof__stats  the homepage Proof row (home-v5.css)
 * Each page keeps its own number of figures and its section around the row.
 * To revert, delete this file and its enqueue in inc/enqueue.php.
 */

/* Separate hairline cards, 20px apart. */
.ab-prog-stats,
.ab-cty-stats,
.ab-www-stats,
.ab-ow-stats .ab-ow-stats__row,
.ab-home-proof__stats {
	gap: 20px;
	border: 0;
}

.ab-prog-stat,
.ab-cty-stat,
.ab-www-stat,
.ab-ow-stats .ab-ow-stats__cell,
.ab-home-proof__stat {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 0;
	padding: 50px 10px;
	text-align: center;
	border: 0.6px solid var(--wp--custom--neutral--300);
}

/* Figure: serif, slate; the M+/K+ suffix orange and bolder. */
.ab-prog-stat__num,
.ab-cty-stat__num,
.ab-www-stat__num,
.ab-ow-stats__num,
.ab-home-proof__num {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2rem, 1rem + 2vw, 2.875rem);
	line-height: 1;
	font-weight: 400;
	color: var(--wp--custom--neutral--700);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ab-prog-stat__suf,
.ab-cty-stat__suffix,
.ab-www-stat__suffix,
.ab-ow-stats__unit,
.ab-ow-stats__plus,
.ab-home-proof__suffix {
	color: var(--wp--custom--action--500);
	font-weight: 600;
}

.ab-prog-stat__label,
.ab-cty-stat__label,
.ab-www-stat__label,
.ab-ow-stats__label,
.ab-home-proof__stat-label {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.0625rem;
	line-height: 1.3;
	font-weight: 500;
	text-transform: capitalize;
	color: var(--wp--custom--neutral--700);
}

/* Home Proof: the count-up's number and its M+ sit in one line with no gap
   (the seeded markup has white space between them); the row takes the wide
   width like the other rows. */
.ab-home-proof__num {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
}

.ab-home-proof__stats {
	max-width: var(--wp--style--global--wide-size, 1200px);
}

.ab-home-proof__stat-label {
	margin-top: 0;
}

/* Two columns on tablets, one on phones (as the Mobile Eye Clinic bar). */
@media (max-width: 900px) {
	.ab-prog-stats,
	.ab-cty-stats,
	.ab-www-stats,
	.ab-ow-stats .ab-ow-stats__row,
	.ab-home-proof__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 560px) {
	.ab-prog-stats,
	.ab-cty-stats,
	.ab-www-stats,
	.ab-ow-stats .ab-ow-stats__row,
	.ab-home-proof__stats {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}
