/**
 * RNBC Social Aggregator public styles.
 *
 * Most feed markup reuses the RNBC One theme card classes, so this file only
 * adds what the plugin introduces: managed ad links, embeds, the feed wrapper
 * and a small set of fallback styles for non RNBC themes.
 *
 * Navy brand reference: #102a43.
 */

/* Feed wrapper. */
.rnbc-social-feed {
	margin-block: 1.5rem;
}

.rnbc-social-feed__empty {
	color: #6b7280;
	font-style: italic;
}

/* Managed advertisements. */
.rnbc-ad--managed {
	display: flex;
	justify-content: center;
	margin-block: 1rem;
}

.rnbc-ad--managed .rnbc-ad__link {
	display: inline-block;
	line-height: 0;
	max-width: 100%;
}

.rnbc-ad--managed .rnbc-ad__image {
	height: auto;
	max-width: 100%;
	border-radius: 4px;
}

.rnbc-ad--vertical .rnbc-ad__image {
	max-width: 300px;
}

.rnbc-ad--square .rnbc-ad__image {
	max-width: 336px;
}

.rnbc-social-feed__ad {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
}

/* Social embeds on single stories. */
.rnbc-embed {
	margin-block: 1.5rem;
}

.rnbc-embed__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.rnbc-embed__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 8px;
}

.rnbc-embed__link a {
	font-weight: 600;
}

/*
 * Fallback styling for themes other than RNBC One. These rules are written so
 * they do no harm when the theme already styles the same classes, because the
 * theme stylesheet loads after this file and wins on equal specificity.
 */
.rnbc-social-feed .rnbc-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
}

@media (min-width: 600px) {
	.rnbc-social-feed .rnbc-grid--two,
	.rnbc-social-feed .rnbc-grid--three,
	.rnbc-social-feed .rnbc-grid--four {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1000px) {
	.rnbc-social-feed .rnbc-grid--three {
		grid-template-columns: repeat(3, 1fr);
	}

	.rnbc-social-feed .rnbc-grid--four {
		grid-template-columns: repeat(4, 1fr);
	}
}
