/**
 * core/list style variations (cf-blocks): Breadcrumb and Numbered rows.
 * Loaded only on pages with a list block (wp_enqueue_block_style), in the
 * editor canvas too. Colours follow the list's own text colour.
 */

/* Numbered rows: a large red counter (01, 02…) beside each item, rows
   separated by a hairline; an item's leading <strong> is its title.
   Sizes follow the list's font size: counter 2em (2.2em on desktop), title
   1.25em (1.1em on desktop), as the service pages' 16/20px rows. */
.wp-block-list.is-style-cf-numbered-rows {
	counter-reset: cf-numbered-rows;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-block-list.is-style-cf-numbered-rows > li {
	border-bottom: 1px solid rgb(21 20 45 / 0.1);
	counter-increment: cf-numbered-rows;
	display: grid;
	gap: 6px 20px;
	grid-template-columns: auto minmax(0, 1fr);
	margin: 0;
	padding: 16px 0;
}

.wp-block-list.is-style-cf-numbered-rows > li:first-child {
	border-top: 1px solid rgb(21 20 45 / 0.1);
}

.wp-block-list.is-style-cf-numbered-rows > li::before {
	color: var(--wp--preset--color--red, #e72412);
	content: counter(cf-numbered-rows, decimal-leading-zero);
	font-family: var(--wp--preset--font-family--freig-san-pro-bold-web, inherit);
	font-size: 2em;
	grid-row: 1 / span 2;
	line-height: 0.94;
}

.wp-block-list.is-style-cf-numbered-rows > li > strong:first-child {
	color: var(--wp--preset--color--cf-black, #15142d);
	display: block;
	font-family: var(--wp--preset--font-family--freig-san-pro-bold-web, inherit);
	font-size: 1.25em;
	font-weight: 400;
	line-height: 1.3;
	transition: color 0.3s ease-out;
}

@media (min-width: 1024px) {

	.wp-block-list.is-style-cf-numbered-rows > li {
		column-gap: 28px;
		padding: 13px 0;
	}

	.wp-block-list.is-style-cf-numbered-rows > li::before {
		font-size: 2.2em;
		line-height: 0.773;
	}

	.wp-block-list.is-style-cf-numbered-rows > li > strong:first-child {
		font-size: 1.1em;
		line-height: 1.273;
	}
}

@media (hover: hover) and (pointer: fine) {

	.wp-block-list.is-style-cf-numbered-rows > li:hover > strong:first-child {
		color: var(--wp--preset--color--red, #e72412);
	}
}

@media (prefers-reduced-motion: reduce) {

	.wp-block-list.is-style-cf-numbered-rows > li > strong:first-child {
		transition: none;
	}
}

/* Breadcrumb: items in a row, a chevron between them, the current page
   (the item marked aria-current="page") at full strength and bold. */
.wp-block-list.is-style-cf-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Another list style, never on the same element as Numbered rows. */
/* stylelint-disable-next-line no-descending-specificity */
.wp-block-list.is-style-cf-breadcrumb > li {
	align-items: center;
	display: flex;
	gap: 10px;
	margin: 0;
	opacity: 0.8;
}

.wp-block-list.is-style-cf-breadcrumb > li:has([aria-current]),
.wp-block-list.is-style-cf-breadcrumb > li:last-child {
	opacity: 1;
}

/* The chevron fills about 6 × 10 of its icon's 24 × 24 box: the mask is
   drawn at 1.53em so the glyph is 0.64em tall, in a box its own width. */
.wp-block-list.is-style-cf-breadcrumb > li + li::before {
	background-color: currentcolor;
	content: "";
	flex: none;
	height: 0.64em;
	mask: url(../../../build/images/icons/IconChevronRightSmall.svg) center / 1.53em 1.53em no-repeat;
	opacity: 0.75;
	width: 0.4em;
}

.wp-block-list.is-style-cf-breadcrumb [aria-current] {
	font-weight: 700;
}

.wp-block-list.is-style-cf-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.wp-block-list.is-style-cf-breadcrumb a:is(:hover, :focus-visible) {
	text-decoration: underline;
}

/* Meta: short facts on one line ("Last updated: … • Reviewer: …"), separated
   by a small dot in the text colour. Phones: one per line, no dot. Sizes
   follow the list's font size. */
.wp-block-list.is-style-cf-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
.wp-block-list.is-style-cf-meta > li {
	align-items: center;
	display: flex;
	gap: 14px;
	margin: 0;
}

.wp-block-list.is-style-cf-meta > li + li::before {
	background: currentcolor;
	border-radius: 50%;
	content: "";
	flex: none;
	height: 4px;
	opacity: 0.7;
	width: 4px;
}

@media (max-width: 767px) {

	.wp-block-list.is-style-cf-meta {
		flex-direction: column;
	}

	.wp-block-list.is-style-cf-meta > li + li::before {
		display: none;
	}
}

/* Bold text in a block set in Inter stays in Inter (the theme sets every
   <strong> in Freight Sans Bold). Only blocks with the Inter font family. */
.has-inter-font-family :is(strong, b) {
	font-family: inherit;
	font-weight: 700;
}
