/*
 * Reference copy of the widget styles.
 *
 * This file is NOT enqueued. The runtime stylesheet is generated from the
 * configured class prefix and inlined once per page inside the cached HTML
 * blob (see ADVTN_Renderer::css()), because the prefix is per-site and the
 * homepage should not pay for an extra HTTP request.
 *
 * Copy this into your theme and change `advtn` to your prefix if you want to
 * override the defaults; or filter `advtn_inline_css`.
 */

.advtn {
	margin: 2rem 0;
}

.advtn__heading {
	margin: 0 0 .75rem;
}

.advtn__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .5rem;
}

.advtn--cards .advtn__items {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.advtn__item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .4rem .6rem;
	line-height: 1.4;
}

.advtn--cards .advtn__item {
	display: block;
}

.advtn__link {
	font-weight: 600;
	text-decoration: none;
}

.advtn__link:hover,
.advtn__link:focus {
	text-decoration: underline;
}

.advtn__source,
.advtn__date {
	font-size: .8em;
	opacity: .7;
}

.advtn__excerpt {
	flex-basis: 100%;
	margin: .15rem 0 0;
	font-size: .9em;
	opacity: .85;
}

.advtn__thumb {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: .5rem;
	border-radius: 4px;
}

.advtn__more {
	margin: 1rem 0 0;
}

@media (max-width: 600px) {
	.advtn__item {
		gap: .25rem .5rem;
	}
}

/* News layout — Google News / MSN style card rows. */

.advtn--news .advtn__items { gap: 0; }

.advtn--news .advtn__item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: .9rem 0;
	border-bottom: 1px solid rgba(128, 128, 128, .25);
}

.advtn--news .advtn__item:last-child { border-bottom: 0; }

.advtn--news .advtn__body { flex: 1 1 auto; min-width: 0; }

.advtn--news .advtn__meta {
	display: flex;
	align-items: center;
	gap: .4rem;
	margin: 0 0 .25rem;
	font-size: .78em;
	opacity: .7;
	line-height: 1.2;
}

.advtn--news .advtn__source { font-weight: 600; }

.advtn--news .advtn__source + .advtn__date::before {
	content: '\00b7';
	margin-right: .4rem;
	opacity: .7;
}

.advtn--news .advtn__link {
	display: block;
	font-size: 1.02em;
	font-weight: 600;
	line-height: 1.35;
}

.advtn--news .advtn__media { flex: 0 0 auto; width: 120px; }

.advtn--news .advtn__thumb {
	display: block;
	width: 120px;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 8px;
	margin: 0;
}

@media (max-width: 480px) {
	.advtn--news .advtn__media,
	.advtn--news .advtn__thumb { width: 88px; }
}

/* Publisher favicon beside the source name. */

.advtn__icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 3px;
	vertical-align: -3px;
	flex: 0 0 auto;
	margin: 0;
}
