/*
 * BMFC Key Dates — "Slim navy badge, light titles" design (v1.2 — adds greyed "Recently")
 * Colours are variables — override them in Appearance › Customise › Additional CSS, e.g.
 *   .bmfc-kd, .bmfc-kd-single { --bmfc-kd-accent: #003a70; }
 */
.bmfc-kd,
.bmfc-kd-single {
	--bmfc-kd-accent: #004c92;       /* badge background — BMFC navy */
	--bmfc-kd-accent-text: #ffffff;  /* badge text */
	--bmfc-kd-flag: #c8102e;         /* "Today" pill */
	--bmfc-kd-text: #0e1a2e;         /* titles + weekday */
	--bmfc-kd-muted: #5a6577;        /* time / place */
	--bmfc-kd-line: #e4e9f0;         /* row dividers */
	--bmfc-kd-hover: rgba(0, 76, 146, 0.05);
	--bmfc-kd-past: #a3adbb;         /* badge colour once a date has passed */
	--bmfc-kd-badge-font: Archivo, "Arial Black", system-ui, sans-serif;
}

.bmfc-kd__heading { margin: 0 0 0.75em; }

.bmfc-kd__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bmfc-kd__item {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--bmfc-kd-line);
}
.bmfc-kd__item:last-child { border-bottom: 0; }

.bmfc-kd__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 0;
	color: var(--bmfc-kd-text);
	text-decoration: none;
}
a.bmfc-kd__row:hover,
a.bmfc-kd__row:focus-visible {
	background: var(--bmfc-kd-hover);
	text-decoration: none;
}
a.bmfc-kd__row:hover .bmfc-kd__title { text-decoration: underline; }

/* Slim date badge: day + month */
.bmfc-kd__badge {
	flex: 0 0 42px;
	width: 42px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4px 0 5px;
	background: var(--bmfc-kd-accent);
	color: var(--bmfc-kd-accent-text);
	border-radius: 7px;
	line-height: 1;
	text-align: center;
	font-family: var(--bmfc-kd-badge-font);
	font-variant-numeric: tabular-nums;
}
.bmfc-kd__day {
	display: block;
	font-size: 17px;
	font-weight: 900;
}
.bmfc-kd__month {
	display: block;
	margin-top: 3px;
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Text */
.bmfc-kd__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.bmfc-kd__title {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--bmfc-kd-text);
}
.bmfc-kd__details {
	font-size: 12.5px;
	line-height: 1.3;
	color: var(--bmfc-kd-muted);
}
.bmfc-kd__weekday {
	font-weight: 700;
	color: var(--bmfc-kd-text);
}
.bmfc-kd__flag {
	display: inline-block;
	margin-left: 0.4em;
	padding: 0.1em 0.5em;
	font-size: 0.68em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: 0.15em;
	color: #fff;
	background: var(--bmfc-kd-flag);
	border-radius: 999px;
}
.bmfc-kd__flag--soon { background: var(--bmfc-kd-muted); }

.bmfc-kd__chevron {
	flex: 0 0 auto;
	margin-left: auto;
	padding-left: 8px;
	font-size: 18px;
	line-height: 1;
	color: var(--bmfc-kd-muted);
}

/* "View all dates →" — matches the site's "View all news →" */
.bmfc-kd__more { margin: 12px 0 0; }
.bmfc-kd__more a {
	font-size: 14px;
	font-weight: 700;
	color: var(--bmfc-kd-accent);
	text-decoration: none;
}
.bmfc-kd__more a:hover { text-decoration: underline; }
.bmfc-kd__empty { color: var(--bmfc-kd-muted); }

/* Timeline month headings */
.bmfc-kd__month-group + .bmfc-kd__month-group { margin-top: 1.5em; }
.bmfc-kd__month-heading {
	margin: 0 0 0.3em;
	padding-bottom: 0.3em;
	font-size: 1.1em;
	border-bottom: 2px solid var(--bmfc-kd-accent);
}

/* "Recently" (full timeline only): past dates from the last 30 days, greyed out */
.bmfc-kd__recent-heading {
	margin: 0 0 0.3em;
	padding-bottom: 0.3em;
	font-size: 1.1em;
	color: var(--bmfc-kd-muted);
	border-bottom: 2px solid var(--bmfc-kd-line);
}
.bmfc-kd__item.is-past .bmfc-kd__badge { background: var(--bmfc-kd-past); }
.bmfc-kd__item.is-past .bmfc-kd__title,
.bmfc-kd__item.is-past .bmfc-kd__weekday { color: var(--bmfc-kd-muted); }

/* Quiet grey "Today" divider between Recently and what's coming up */
.bmfc-kd__now {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 1.1em 0 1.3em;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bmfc-kd-muted);
}
.bmfc-kd__now::before,
.bmfc-kd__now::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #cfd6df;
}

/* Single Key Date page */
.bmfc-kd-single {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 1.5em;
	padding: 14px 16px;
	border: 1px solid var(--bmfc-kd-line);
	border-radius: 10px;
}
.bmfc-kd-single .bmfc-kd__badge { flex-basis: 54px; width: 54px; padding: 6px 0 7px; }
.bmfc-kd-single .bmfc-kd__day { font-size: 22px; }
.bmfc-kd-single__text { display: flex; flex-direction: column; gap: 2px; }
.bmfc-kd-single__date { font-weight: 700; color: var(--bmfc-kd-text); }
.bmfc-kd-single__details { color: var(--bmfc-kd-muted); }
.bmfc-kd-single__past { color: var(--bmfc-kd-flag); font-size: 0.9em; }
.bmfc-kd-single.is-past .bmfc-kd__badge { background: var(--bmfc-kd-past); }
.bmfc-kd-single__back { margin-top: 2em; }

.bmfc-kd .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
