/* Lightbox (article images) + video player dialog. */

html.aadigital-lightbox-open,
html.aadigital-player-open {
	overflow: hidden;
}

.aadigital-lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	/* Bottom room for the caption and the image counter. */
	padding: 32px 16px 64px;
	background: rgb(8 10 14 / 92%);
}

.aadigital-lightbox[hidden] {
	display: none;
}

.aadigital-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: min(1100px, 100%);
	max-height: 100%;
	margin: 0;
}

.aadigital-lightbox__image {
	max-width: 100%;
	max-height: calc(100vh - 140px);
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 18px 48px rgb(0 0 0 / 45%);
	object-fit: contain;
}

.aadigital-lightbox__caption {
	max-width: 70ch;
	color: #d7dbe2;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

.aadigital-lightbox__counter {
	position: absolute;
	inset-block-end: 14px;
	inset-inline: 0;
	margin: 0;
	color: #aeb4bf;
	font-size: 12px;
	text-align: center;
}

.aadigital-lightbox__nav,
.aadigital-lightbox__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 12%);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.aadigital-lightbox__close {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-end: 16px;
	font-size: 26px;
}

.aadigital-lightbox__nav:hover,
.aadigital-lightbox__nav:focus-visible,
.aadigital-lightbox__close:hover,
.aadigital-lightbox__close:focus-visible {
	background: rgb(255 255 255 / 24%);
}

.aadigital-lightbox--single .aadigital-lightbox__nav {
	display: none;
}

/* Content images advertise that they can be opened. */
.aadigital-lightbox__trigger {
	cursor: zoom-in;
}

.aadigital-lightbox__trigger:focus-visible {
	outline: 3px solid var(--aadigital-color-accent, #c00);
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.aadigital-lightbox {
		padding: 16px 8px 48px;
	}

	.aadigital-lightbox__nav {
		position: absolute;
		inset-block-end: 54px;
		width: 40px;
		height: 40px;
	}

	.aadigital-lightbox__nav--prev {
		inset-inline-start: 16px;
	}

	.aadigital-lightbox__nav--next {
		inset-inline-end: 16px;
	}
}

/* Video player dialog ----------------------------------------------------- */

.aadigital-player {
	position: fixed;
	inset: 0;
	z-index: 310;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgb(8 10 14 / 90%);
}

.aadigital-player[hidden] {
	display: none;
}

.aadigital-player__panel {
	position: relative;
	width: min(960px, 100%);
	max-height: 100%;
	overflow: auto;
	padding: 14px;
	border-radius: 10px;
	background: #11151b;
	box-shadow: 0 24px 60px rgb(0 0 0 / 55%);
}

.aadigital-player__body {
	display: flex;
	justify-content: center;
	background: #000;
	border-radius: 6px;
	overflow: hidden;
	min-block-size: 200px;
}

.aadigital-player__body iframe,
.aadigital-player__body video {
	display: block;
	width: 100%;
	max-width: 960px;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

.aadigital-player__body--vertical iframe {
	max-width: 360px;
	aspect-ratio: 9 / 16;
}

.aadigital-player__close {
	position: absolute;
	inset-block-start: 6px;
	inset-inline-end: 6px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 16%);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.aadigital-player__title {
	margin: 0;
	padding: 10px 44px 2px 4px;
	color: #e7eaef;
	font-size: 14px;
	font-weight: 600;
}

.aadigital-player__fallback {
	margin: 0;
	padding: 12px 4px 4px;
	color: #aeb4bf;
	font-size: 13px;
}

.aadigital-player__fallback a {
	color: #ff9a9a;
}

/* Play badge on video cards. */
.aadigital-play-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgb(0 0 0 / 60%);
	color: #fff;
}

/* "Tonton video" prompt above the article body. */
.aadigital-video-prompt {
	margin: 0 0 24px;
}

.aadigital-video-prompt__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 18px 8px 8px;
	border: 1px solid rgb(204 0 0 / 22%);
	border-radius: 999px;
	background: #fff;
	color: #1a1a1a;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.aadigital-video-prompt__button .aadigital-play-badge {
	width: 26px;
	height: 26px;
	background: #cc0000;
	font-size: 11px;
}

.aadigital-video-prompt__duration {
	font-weight: 600;
	color: #6b7280;
}

.aadigital-video-prompt__button:hover,
.aadigital-video-prompt__button:focus-visible {
	border-color: #cc0000;
	background: #cc0000;
	color: #fff;
	outline: none;
}

.aadigital-video-prompt__button:hover .aadigital-play-badge,
.aadigital-video-prompt__button:focus-visible .aadigital-play-badge {
	background: rgb(255 255 255 / 24%);
}

.aadigital-video-prompt__button:hover .aadigital-video-prompt__duration,
.aadigital-video-prompt__button:focus-visible .aadigital-video-prompt__duration {
	color: rgb(255 255 255 / 80%);
}
