/*
 * Declared — session list
 * Loaded only on pages containing [declared_sessions].
 *
 * Everything is namespaced .dcl- and resets its own box model, because Uncode's
 * row/column rules are aggressive about padding and will otherwise win.
 */

.dcl-sessions {
	--dcl-ink: #303133;
	--dcl-muted: #6e7276;
	--dcl-line: #e3e3e3;
	--dcl-accent: #3e9ee8;
	--dcl-pending: #a9a9a9;

	max-width: 760px;
	margin: 0 auto;
	padding: 0;
	text-align: left;
}

.dcl-sessions *,
.dcl-sessions *::before,
.dcl-sessions *::after {
	box-sizing: border-box;
}

/* ---------- row ---------- */

.dcl-sessions .dcl-row {
	display: flex;
	align-items: center;
	gap: 22px;
	width: 100%;
	margin: 0;
	padding: 16px 6px;
	border: 0;
	border-bottom: 1px solid var(--dcl-line);
	border-radius: 0;
	background: none;
	font-family: inherit;
	text-align: left;
	text-decoration: none;
	appearance: none;
	-webkit-appearance: none;
}

.dcl-sessions .dcl-row:first-child {
	border-top: 1px solid var(--dcl-line);
}

.dcl-sessions button.dcl-row {
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.dcl-sessions button.dcl-row:hover,
.dcl-sessions button.dcl-row:focus-visible {
	background-color: rgba(62, 158, 232, 0.055);
}

.dcl-sessions button.dcl-row:focus-visible {
	outline: 2px solid var(--dcl-accent);
	outline-offset: -2px;
}

/* the introduction sits above the numbered nine */
.dcl-sessions .dcl-row--intro {
	padding-bottom: 20px;
}

/* ---------- thumbnail ---------- */

.dcl-sessions .dcl-thumb {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 168px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 2px;
	background: #e8e8e8;
}

/* contain, not cover: the whole card must be visible. YouTube's 16:9 stills
   fill the box exactly; contain only matters as insurance against a source
   that isn't 16:9, which would otherwise be cropped. */
.dcl-sessions .dcl-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}

.dcl-sessions .dcl-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 42px;
	height: 30px;
	transform: translate(-50%, -50%);
	border-radius: 6px;
	background: rgba(28, 61, 87, 0.78);
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.dcl-sessions .dcl-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-40%, -50%);
	border-left: 10px solid #fff;
	border-top: 6.5px solid transparent;
	border-bottom: 6.5px solid transparent;
}

.dcl-sessions button.dcl-row:hover .dcl-play,
.dcl-sessions button.dcl-row:focus-visible .dcl-play {
	background: rgba(62, 158, 232, 0.95);
	transform: translate(-50%, -50%) scale(1.06);
}

/* unreleased */
.dcl-sessions .dcl-row--pending .dcl-thumb {
	border: 1px dashed #cfcfcf;
	background: #fff;
}

.dcl-sessions .dcl-soon {
	font-family: "Montserrat", sans-serif;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--dcl-pending);
}

/* ---------- copy ---------- */

.dcl-sessions .dcl-meta {
	flex: 1 1 auto;
	min-width: 0;
}

.dcl-sessions .dcl-eyebrow {
	display: block;
	margin-bottom: 4px;
	font-family: "Montserrat", sans-serif;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	color: var(--dcl-accent);
}

.dcl-sessions .dcl-name {
	display: block;
	font-family: "Montserrat", sans-serif;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--dcl-ink);
}

.dcl-sessions .dcl-row--intro .dcl-eyebrow {
	color: var(--dcl-muted);
}

.dcl-sessions .dcl-row--intro .dcl-name {
	font-size: 19px;
	font-weight: 500;
	color: #4a4f53;
}

.dcl-sessions .dcl-row--pending .dcl-eyebrow {
	color: var(--dcl-pending);
}

.dcl-sessions .dcl-row--pending .dcl-name {
	color: #9ea3a6;
}

.dcl-sessions .dcl-len {
	flex: none;
	font-family: "Montserrat", sans-serif;
	font-size: 13px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--dcl-muted);
}

/* ---------- lightbox ---------- */

.dcl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vh 5vw;
	background: rgba(16, 22, 28, 0.93);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.dcl-lightbox.is-open {
	opacity: 1;
}

.dcl-lightbox__frame {
	position: relative;
	width: 100%;
	max-width: 1100px;
	aspect-ratio: 16 / 9;
	background: #000;
}

.dcl-lightbox__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.dcl-lightbox__close {
	position: absolute;
	top: -44px;
	right: -4px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.dcl-lightbox__close:hover,
.dcl-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.3);
}

.dcl-lightbox__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

body.dcl-lightbox-open {
	overflow: hidden;
}

/* ---------- responsive ---------- */

@media (max-width: 767px) {
	.dcl-sessions .dcl-row {
		gap: 14px;
		padding: 13px 2px;
	}

	.dcl-sessions .dcl-thumb {
		width: 112px;
	}

	.dcl-sessions .dcl-name {
		font-size: 17px;
	}

	.dcl-sessions .dcl-row--intro .dcl-name {
		font-size: 16px;
	}

	.dcl-sessions .dcl-play {
		width: 34px;
		height: 24px;
	}

	.dcl-sessions .dcl-play::after {
		border-left-width: 8px;
		border-top-width: 5px;
		border-bottom-width: 5px;
	}

	.dcl-sessions .dcl-len {
		display: none;
	}

	.dcl-lightbox {
		padding: 0 16px;
	}

	.dcl-lightbox__close {
		top: -42px;
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dcl-sessions .dcl-row,
	.dcl-sessions .dcl-play,
	.dcl-lightbox,
	.dcl-lightbox__close {
		transition: none;
	}
}
