/*
 * The Slab: "Connect With Us Now" social feed ([theslab_social_feed]).
 *
 * Built only on the UI kit's tokens (var(--tsl-*), Additional CSS section 20). The
 * heading is a plain h2 and takes the kit's h2. The platform links are the kit's
 * secondary button (Nightgame outline, fills on hover); the video cards use the kit's
 * surface radius. Fallback values after each var() are the kit's own.
 */

.tsl-feed {
	margin-block: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 32px);
	text-align: center;
}

.tsl-feed .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.tsl-feed .tsl-feed__heading {
	margin: 0 0 16px;
}

/* ---- Platform links: the kit's secondary button, with the footer's own icons ---- */
.tsl-feed .tsl-feed__platforms {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tsl-feed .tsl-feed__platforms li {
	margin: 0;
	padding: 0;
}

.tsl-feed .tsl-feed__platform {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--tsl-btn-min-height, 44px);
	padding: 8px 16px;
	border: var(--tsl-btn-border-width, 2px) solid var(--tsl-nightgame, #003340);
	border-radius: var(--tsl-radius-control, 4px);
	background: transparent;
	color: var(--tsl-nightgame, #003340);
	font-family: var(--tsl-font-heading, roc-grotesk), sans-serif;
	font-size: 14px;
	font-weight: var(--tsl-btn-font-weight, 600);
	letter-spacing: var(--tsl-btn-letter-spacing, 0.04em);
	line-height: var(--tsl-btn-line-height, 1.2);
	text-transform: var(--tsl-btn-text-transform, uppercase);
	text-decoration: none;
	transition: color var(--tsl-motion, 150ms ease-out), background-color var(--tsl-motion, 150ms ease-out);
}

.tsl-feed .tsl-feed__platform:hover,
.tsl-feed .tsl-feed__platform:focus-visible {
	background-color: var(--tsl-nightgame, #003340);
	color: var(--tsl-white, #fff);
	text-decoration: none;
}

.tsl-feed .tsl-feed__platform svg {
	width: 20px;
	height: 20px;
	flex: none;
	fill: currentColor;
}

/* ---- Items: newest first, three across on desktop ---------------------------- */
.tsl-feed .tsl-feed__items {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
	text-align: start;
}

@media (min-width: 768px) {
	.tsl-feed .tsl-feed__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.tsl-feed .tsl-feed__items {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tsl-feed .tsl-feed__item {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
}

.tsl-feed .tsl-feed__text {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tsl-feed .tsl-feed__title {
	margin: 0;
	font-size: var(--tsl-h5, 20px);
	line-height: 1.25;
	color: var(--tsl-nightgame, #003340);
}

.tsl-feed .tsl-feed__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	font-size: 0.875rem;
	color: var(--tsl-nightgame, #003340);
}

.tsl-feed .tsl-feed__watch {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 600;
}

/* ---- The click-to-play facade ------------------------------------------------ */
.tsl-feed .tsl-yt {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--tsl-radius-surface, 15px);
	background-color: var(--tsl-nightgame, #003340);
}

.tsl-feed .tsl-yt__play {
	position: absolute;
	inset: 0;
	display: block;
	cursor: pointer;
}

.tsl-feed .tsl-yt__thumb {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
}

.tsl-feed .tsl-yt__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.tsl-feed .tsl-yt__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.tsl-feed .tsl-yt__icon-bg {
	fill: var(--tsl-nightgame-deep, #002029);
	fill-opacity: 0.85;
	transition: fill var(--tsl-motion, 150ms ease-out), fill-opacity var(--tsl-motion, 150ms ease-out);
}

.tsl-feed .tsl-yt__icon-fg {
	fill: var(--tsl-white, #fff);
}

.tsl-feed .tsl-yt__play:hover .tsl-yt__icon-bg,
.tsl-feed .tsl-yt__play:focus-visible .tsl-yt__icon-bg {
	fill: var(--tsl-teal-deep, #2C6E86);
	fill-opacity: 1;
}

/* Inset ring: the card clips overflow, so an outset outline would be cut off. */
.tsl-feed .tsl-yt__play:focus-visible {
	outline: var(--tsl-focus-width, 2px) solid var(--tsl-focus-on-dark, #FFD14F) !important;
	outline-offset: -4px !important;
}

.tsl-feed .tsl-yt__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---- Audio items (podcast episodes): artwork on a 16:9 panel, then the player ---
 * The panel matches the video cards' shape so a mixed feed stays one grid. The
 * artwork is square, so it sits centred at full panel height on Nightgame. */
.tsl-feed .tsl-audio-card {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--tsl-radius-surface, 15px);
	background-color: var(--tsl-nightgame, #003340);
}

.tsl-feed .tsl-audio-card__art {
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	border-radius: 0;
}

/* ---- Image items (Instagram): same 16:9 panel as every other card. Posts are square
 * or portrait, so the whole picture is shown centred on Nightgame rather than cropped
 * (captions are often part of the image). */
.tsl-feed .tsl-feed__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--tsl-radius-surface, 15px);
	background-color: var(--tsl-nightgame, #003340);
}

.tsl-feed .tsl-feed__media-img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	border-radius: 0;
}

.tsl-feed .tsl-audio {
	display: block;
	width: 100%;
	min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
	.tsl-feed .tsl-feed__platform,
	.tsl-feed .tsl-yt__icon-bg {
		transition: none;
	}
}

/* ---- Homepage "Connect With Us Now": square tiles (1:1), 2026-10-02 -----------
 * Asked for on the 2026-10-02 check-in: Instagram's posts are square, so in the 16:9
 * panels above they sat on Nightgame bands instead of filling the tile, most visibly
 * on mobile. On the homepage feed every panel is square and the picture fills it:
 * square posts and podcast artwork show whole, portrait posts lose a little top and
 * bottom, and a 16:9 video thumbnail loses its sides (the player itself letterboxes
 * once it plays). The Scontent Studios podcast section (.tsl-podcast) shares these
 * classes and keeps its 16:9 panels. */
.tsl-feed:not(.tsl-podcast) .tsl-feed__media,
.tsl-feed:not(.tsl-podcast) .tsl-audio-card,
.tsl-feed:not(.tsl-podcast) .tsl-yt {
	aspect-ratio: 1 / 1;
}

.tsl-feed:not(.tsl-podcast) .tsl-feed__media-img,
.tsl-feed:not(.tsl-podcast) .tsl-audio-card__art {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
