/* ── Brentwood single Livestream view (inc/brentwood-livestream.php) ──────────
   Featured stream: 16:9 banner with a click-to-play YouTube overlay, then the
   start date and recording note. Mirrors brentwood.ca /livestreams/{id} and
   reuses the youtube-list red/play visuals. */

.bw-ls {
	--bw-ls-red: var(--global-palette1, #cc0000);
	/* Content width — 72rem = 1152px, the reference (max-w-6xl). The player
	   fills this; centring gives the left/right breathing room. */
	--bw-ls-w: 72rem;
	max-width: var( --bw-ls-w );
	margin: 0 auto;            /* centre → left/right padding, like /why-brentwood */
	/* top | left/right | bottom — side padding keeps content off the screen
	   edges on mobile; bottom padding reserves room for the event list. */
	padding: 1.5rem 1rem 3rem;
	box-sizing: border-box;
}
.bw-ls * { box-sizing: border-box; }

/* Desktop: full 1152px-wide player, top gap matching the boxed page layout,
   and more space below for the (separately built) YouTube event list. */
@media ( min-width: 768px ) {
	.bw-ls {
		padding: 6rem 0 4rem;
	}
}

/* ── Player ──────────────────────────────────────────────────────────────── */
.bw-ls__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #1a1a1a;
	overflow: hidden;
	border-radius: 4px;
	box-shadow: 0 10px 15px -3px rgba( 0, 0, 0, .1 ), 0 4px 6px -4px rgba( 0, 0, 0, .1 );
}

/* The poster is a real <button> (click-to-play). Reset its chrome. */
.bw-ls__poster {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.bw-ls__poster--noplay { cursor: default; }

.bw-ls__poster-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bw-ls__noimg { position: absolute; inset: 0; background: #1a1a1a; }

/* YouTube play overlay — same construction as the list rows. */
.bw-ls__play {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	border-bottom: 4px solid rgba( 255, 255, 255, .75 );
}
.bw-ls__play-bg {
	position: absolute;
	width: 2.5rem;
	height: 1.75rem;
	background: #fff;
	border-radius: 2px;
}
.bw-ls__play-icon { position: relative; display: inline-flex; color: var( --bw-ls-red ); }
.bw-ls__play-icon svg { width: 4rem; height: 4rem; }
@media ( min-width: 768px ) {
	.bw-ls__play-icon svg { width: 5rem; height: 5rem; }
}
.bw-ls__poster:hover .bw-ls__play-icon { transform: scale( 1.06 ); transition: transform .2s; }

/* The YouTube iframe injected by livestream.js fills the player box. */
.bw-ls__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ── Title card (below the player) ────────────────────────────────────────────
   Mirrors the live site's featured-event card: a bordered box with the event
   thumbnail on the left (red accent line) and the title + date + recording note
   on the right. Reuses the youtube-list row visuals for consistency. */
.bw-ls__card {
	border-top: 2px solid #d1d5db;
	margin-top: 1.5rem;
}
.bw-ls__card-inner {
	border-bottom: 2px solid #d1d5db;
	background-color: rgba( 255, 255, 255, .5 );
}
@media ( min-width: 768px ) {
	.bw-ls__card-inner { display: flex; align-items: stretch; }
}

/* Media column (flex-1 ≈ 1/3): the event thumbnail with a red accent line on
   its inner edge on desktop, mirroring the live border-l-4. */
.bw-ls__card-media {
	position: relative;
	overflow: hidden;
	width: 60%;
	margin: .75rem auto;
	aspect-ratio: 2 / 1;
	border-radius: .25rem;
	background: #e5e7eb;
}
@media ( min-width: 768px ) {
	.bw-ls__card-media {
		flex: 0 0 32.4%;
		width: auto;
		margin: 0;
		min-height: 150px;
		border-radius: 0;
		border-right: 4px solid var( --bw-ls-red );
	}
}
.bw-ls__card-img,
.bw-ls__card-noimg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.bw-ls__card-noimg { background: linear-gradient( 135deg, #e5e7eb, #d1d5db ); }

/* Body column (flex-2 ≈ 2/3): title, date, note. Generous left gap on desktop
   like the live site (px-8 + extra inset past the accent line). */
.bw-ls__card-body {
	flex: 2 1 0;
	padding: 1rem 1rem 1.25rem;
}
@media ( min-width: 768px ) {
	.bw-ls__card-body {
		padding: 1.25rem 2rem 1.25rem 5rem;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
}

.bw-ls__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	color: #1f2937;
}
@media ( min-width: 768px ) {
	.bw-ls__title { font-size: 1.5rem; }
}

.bw-ls__date {
	display: flex;
	align-items: center;
	margin-top: .75rem;
	color: #374151;
}
.bw-ls__date-icon { display: inline-flex; color: #6b7280; }
.bw-ls__date-icon svg { width: .9rem; height: 1rem; }
.bw-ls__date-text { padding-left: .5rem; font-weight: 600; }

.bw-ls__note {
	margin-top: .5rem;
	font-size: .875rem;
	font-style: italic;
	font-weight: 600;
	color: #4b5563;
}

/* ── Integrated event lists (bw/youtube-list blocks) ──────────────────────────
   The Upcoming + Completed lists rendered below the card. Each is a full
   bw/youtube-list block (rows, search, pagination); we just space them out. */
.bw-ls__lists { margin-top: 2.5rem; }
.bw-ls__lists .bw-yt + .bw-yt { margin-top: 3rem; }
