/**
 * Amref Ebola Stats — block styles.
 *
 * Matches the dark stats band on amref.org/ebola.
 * Override any token on a parent element or in Elementor custom CSS, e.g.
 *   .amref-ebola { --amref-ebola-accent: #e2242b; }
 */

.amref-ebola {
	--amref-ebola-accent: #e2242b;
	--amref-ebola-text: #ffffff;
	--amref-ebola-muted: #b9b9bd;
	--amref-ebola-rule: rgba(226, 36, 43, 0.85);
	--amref-ebola-divider: rgba(255, 255, 255, 0.12);
	--amref-ebola-gap: 28px;

	color: var(--amref-ebola-text);
	container-type: inline-size;
}

/* The block inherits the section background from Elementor. These are only
   used if the block sits on a light background and nothing else sets them. */
.amref-ebola--boxed {
	background: #1c1b1b;
	padding: clamp(24px, 4vw, 48px);
	border-radius: 4px;
}

/* ---------- heading ---------- */

.amref-ebola__eyebrow {
	margin: 0 0 12px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--amref-ebola-accent);
}

.amref-ebola__title {
	margin: 0 0 18px;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--amref-ebola-text);
}

.amref-ebola__intro {
	margin: 0 0 clamp(24px, 4vw, 40px);
	max-width: 68ch;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--amref-ebola-muted);
}

/* ---------- rows ---------- */

.amref-ebola__rows {
	display: flex;
	flex-direction: column;
}

.amref-ebola__row {
	display: grid;
	grid-template-columns: minmax(170px, 230px) 1fr;
	gap: var(--amref-ebola-gap);
	align-items: start;
	padding: clamp(20px, 3vw, 30px) 0;
	border-bottom: 1px solid var(--amref-ebola-divider);
}

.amref-ebola__row:last-child {
	border-bottom: 0;
}

.amref-ebola__country-name {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--amref-ebola-text);
}

.amref-ebola__date {
	margin: 8px 0 0;
	font-size: 0.72rem;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: var(--amref-ebola-muted);
}

/* ---------- metrics ---------- */

.amref-ebola__metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0;
}

.amref-ebola__metric {
	padding: 0 16px;
	border-left: 2px solid var(--amref-ebola-rule);
	min-width: 0;
}

.amref-ebola__value {
	display: block;
	font-size: clamp(1.9rem, 3.6cqi, 2.9rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: var(--amref-ebola-accent);
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

/* A dash means WHO reported nothing — not zero. Render it quieter. */
.amref-ebola__value.is-empty {
	opacity: 0.65;
	cursor: help;
}

.amref-ebola__label {
	display: block;
	margin-top: 14px;
	font-size: 0.82rem;
	line-height: 1.35;
	color: var(--amref-ebola-muted);
}

/* ---------- editorial status line (e.g. "Declared Ebola Free") ---------- */

.amref-ebola__status {
	align-self: center;
	padding-left: 16px;
	border-left: 2px solid var(--amref-ebola-rule);
	font-size: clamp(0.95rem, 1.6cqi, 1.1rem);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--amref-ebola-text);
}

/* ---------- footer ---------- */

.amref-ebola__source {
	margin: clamp(20px, 3vw, 32px) 0 0;
	font-size: 0.78rem;
	line-height: 1.6;
	color: var(--amref-ebola-muted);
}

.amref-ebola__source a {
	color: var(--amref-ebola-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.amref-ebola__source a:hover,
.amref-ebola__source a:focus-visible {
	color: var(--amref-ebola-text);
}

.amref-ebola__checked::before {
	content: "·";
	margin: 0 6px;
}

.amref-ebola__notice {
	padding: 14px 16px;
	border-left: 3px solid #d98c00;
	background: rgba(217, 140, 0, 0.1);
	font-size: 0.9rem;
	color: inherit;
}

/* ---------- responsive ----------
   Container queries where supported; the media queries below are the
   fallback and are harmless when both apply. */

@container (max-width: 900px) {
	.amref-ebola__row {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	.amref-ebola__metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px 0;
	}
}

@container (max-width: 359px) {
	.amref-ebola__metrics {
		grid-template-columns: 1fr;
		gap: 18px 0;
	}
}

@media (max-width: 900px) {
	.amref-ebola__row {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	.amref-ebola__metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px 0;
	}
}

@media (max-width: 359px) {
	.amref-ebola__metrics {
		grid-template-columns: 1fr;
		gap: 18px 0;
	}
	.amref-ebola__value {
		font-size: 2.1rem;
	}
}

/* ---------- a11y ---------- */

@media (prefers-reduced-motion: reduce) {
	.amref-ebola * {
		transition: none !important;
		animation: none !important;
	}
}

@media (prefers-contrast: more) {
	.amref-ebola {
		--amref-ebola-muted: #e3e3e6;
	}
}
