/* The paused video supplies its own thumbnail; no poster image is needed. */
.program-trailer {
	display: block;
	position: relative;
	width: 98%;
	margin: 16px 0 10px;
	color: #fff;
	background: #111;
	border: 1px solid #ccc;
	text-decoration: none;
}

.program-trailer video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: contain;
	pointer-events: none;
}

.program-trailer-label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 6px;
	font-size: 0.875rem;
	background: #333;
}

.program-trailer-label::before {
	content: '';
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 10px solid currentColor;
}

.program-trailer:hover .program-trailer-label,
.program-trailer:focus-visible .program-trailer-label {
	background: #a00;
}

.program-trailer:focus-visible {
	outline: 3px solid #a00;
	outline-offset: 3px;
}

.trailer-dialog {
	box-sizing: border-box;
	width: min(1100px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 12px;
	border: 0;
	color: #fff;
	background: #111;
}

.trailer-dialog::backdrop {
	background: rgba(0, 0, 0, 0.85);
}

.trailer-dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.trailer-dialog-title {
	margin: 0;
	font-size: 1rem;
}

.trailer-dialog-close {
	flex-shrink: 0;
	min-width: 64px;
	min-height: 44px;
	padding: 6px 12px;
	border: 1px solid #999;
	color: #fff;
	background: #333;
	cursor: pointer;
}

.trailer-dialog-close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.trailer-dialog video {
	display: block;
	width: 100%;
	max-height: calc(100dvh - 140px);
	background: #000;
}

.trailer-dialog-error {
	font-size: 0.875rem;
}

.trailer-dialog-error a {
	color: #fff;
}

html.trailer-open {
	overflow: hidden;
}
