/*
 * CMC media coverage strip (prototype index.html "news-media-coverage"). Pattern cmc/home-media-coverage (style class is-style-home-media-coverage; the section class stays section-news-media-coverage, the prototype block name):
 *   section (white, pt 40, pb 20, no rounded corners) > .cov-strip (Group style "Pager"):
 *     eyebrow | .pager__nav, then a Query Loop of 8 "Media coverage" items by Order (its post template IS the
 *     .pager__track: one item per slide, 1 / 2 from 640 / 4 from 1024 in view, 30 apart, a 20% charcoal rule between),
 *     then the "News & Insights" button on the right.
 *   An item: outlet logo (featured image, 40 high, grey), the headline in quote marks (links out; the link covers the
 *   whole item), "View article" with an external-link glyph (underlines on hover).
 */
.cov-strip {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	column-gap: 25px;
}

.cov-strip > .is-style-eyebrow-rule {
	align-self: end;
}

.cov-strip > .wp-block-query,
.cov-strip > .cov-strip__more {
	grid-column: 1 / -1;
}

.section-news-media-coverage .cov-strip > .wp-block-query {
	margin-top: 30px;
}

.cov-strip .pager__track {
	gap: 30px;
	margin: 0;
	padding: 0 0 10px;
	list-style: none;
}

.cov-strip .pager__track > li {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	padding-right: 30px;
	border-right: 1px solid color-mix(in srgb, var(--wp--preset--color--charcoal) 20%, transparent);
}

.cov-strip .pager__track > li:last-child {
	border-right: 0;
}

@media (width >= 640px) {
	.cov-strip .pager__track > li {
		width: calc((100% - 30px) / 2);
	}
}

@media (width >= 1024px) {
	.cov-strip .pager__track > li {
		width: calc((100% - 90px) / 4);
	}
}

.cov-item__logo {
	display: flex;
	align-items: center;
	height: 40px;
	margin: 0;
}

.section-news-media-coverage .cov-item__logo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 40px;
	object-fit: contain;
	object-position: left;
	filter: grayscale(1);
}

.cov-item__title {
	flex: 1;
	min-width: 0;
}

.cov-item__title::before {
	content: "\201C";
}

.cov-item__title::after {
	content: "\201D";
}

/* the headline's link covers the item (prototype: the whole item is the link) */
.cov-item__title a {
	display: inline;
}

.cov-item__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.cov-item__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	text-decoration-line: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	text-decoration-color: transparent;
	transition: text-decoration-color 350ms var(--wp--custom--ease);
}

.cov-item__cta::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cov-strip .pager__track > li:hover .cov-item__cta,
.cov-strip .pager__track > li:has(a:focus-visible) .cov-item__cta {
	text-decoration-color: currentColor;
}

.section-news-media-coverage .cov-strip__more {
	margin-top: 30px;
}

@media (prefers-reduced-motion: reduce) {
	.cov-item__cta {
		transition: none;
	}
}
