/* Poster on page: cover mode */
.dvb-video {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #000;
	aspect-ratio: 16 / 9;
}

.dvb-video:not(.dvb-video--ratio-circle) {
	border-radius: var(--dvb-poster-radius, 0);
}

.dvb-video--ratio-16-9 {
	aspect-ratio: 16 / 9;
}

.dvb-video--ratio-4-3 {
	aspect-ratio: 4 / 3;
}

.dvb-video--ratio-1-1 {
	aspect-ratio: 1 / 1;
}

.dvb-video--ratio-3-4 {
	aspect-ratio: 3 / 4;
}

.dvb-video--ratio-21-9 {
	aspect-ratio: 21 / 9;
}

.dvb-video--ratio-circle {
	aspect-ratio: 1 / 1;
	border-radius: 50%;
}

.dvb-video--ratio-circle .dvb-video__poster-placeholder,
.dvb-video--ratio-circle .dvb-video__poster-image {
	border-radius: 50%;
}

.dvb-video--no-poster,
.dvb-figure--no-poster {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.dvb-figure--no-poster {
	position: absolute;
}

.dvb-video--direct {
	aspect-ratio: auto;
	background: transparent;
}

.dvb-video--placeholder {
	background: #f2f2f2;
	border-radius: var(--dvb-poster-radius, 8px);
}

.dvb-video__poster-placeholder {
	position: absolute;
	inset: 0;
	display: block;
	background: #f2f2f2;
	border-radius: inherit;
}

.dvb-video--direct .wp-block-embed {
	margin: 0;
}

.dvb-video--direct .wp-block-embed__wrapper iframe {
	max-width: 100%;
}

.dvb-video--direct .dvb-video-file {
	display: block;
	max-width: 100%;
	width: 100%;
	height: auto;
}

.dvb-modal__body--native-video {
	background: transparent;
}

.dvb-modal__body .dvb-video-file {
	display: block;
	max-width: min(var(--dvb-popup-width, 720px), calc(100vw - 48px));
	width: 100%;
	height: auto;
	background: #000;
	vertical-align: top;
}

.dvb-modal__dialog--native-video {
	background: transparent;
}

button.dvb-video__poster-hit,
.dvb-video__poster-hit {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(255, 255, 255, 0.001);
	cursor: pointer;
	font: inherit;
	color: inherit;
	line-height: normal;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.dvb-video__poster,
.dvb-video__poster-hit {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
	color: inherit;
	line-height: normal;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
	touch-action: manipulation;
}

.dvb-video__poster:active,
.dvb-video__poster-hit:active {
	opacity: 0.92;
}

.dvb-video__poster-surface {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.dvb-video__poster-surface * {
	pointer-events: none !important;
}

.dvb-video__poster-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.dvb-video__logo {
	position: absolute;
	z-index: 2;
	display: block;
	width: auto;
	height: auto;
	max-width: 80px;
	pointer-events: none;
	object-fit: contain;
}

.dvb-video__logo--top-left {
	top: 12px;
	left: 12px;
}

.dvb-video__logo--top-right {
	top: 12px;
	right: 12px;
}

.dvb-video__logo--bottom-left {
	bottom: 12px;
	left: 12px;
}

.dvb-video__logo--bottom-right {
	bottom: 12px;
	right: 12px;
}

.dvb-video__play {
	position: relative;
	z-index: 3;
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--dvb-play-icon-color, rgba(0, 0, 0, 0.55));
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
	pointer-events: none;
	flex-shrink: 0;
}

.dvb-video__play::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin-left: 3px;
	border-style: solid;
	border-width: 14px 0 14px 22px;
	border-color: transparent transparent transparent #fff;
}

/* Popup: natural video proportions */
.dvb-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.dvb-modal.dvb-modal--open {
	display: flex;
}

.dvb-modal[hidden] {
	display: none !important;
}

.dvb-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
}

.dvb-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(var(--dvb-popup-width, 720px), calc(100vw - 48px));
	max-width: min(var(--dvb-popup-width, 720px), calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	overflow: auto;
}

.dvb-modal__close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.dvb-modal__close:hover,
.dvb-modal__close:focus {
	background: rgba(255, 255, 255, 0.3);
}

.dvb-modal__body {
	display: block;
	width: 100%;
	max-width: 100%;
	background: #000;
	line-height: 0;
}

.dvb-modal__body .wp-block-embed,
.dvb-modal__body figure {
	margin: 0;
}

.dvb-modal__body .wp-block-embed__wrapper,
.dvb-modal__body .dvb-embed-fallback .wp-block-embed__wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
}

.dvb-modal__body .wp-block-embed__wrapper::before {
	content: none;
	display: none;
}

.dvb-modal__body .wp-block-embed__wrapper iframe,
.dvb-modal__body .dvb-embed-fallback iframe {
	display: block;
	position: static;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 200px;
	aspect-ratio: 16 / 9;
	border: 0;
	vertical-align: top;
}

.dvb-modal__body .wp-block-embed__wrapper[style*='padding-top'] {
	height: auto !important;
	padding-top: 0 !important;
}

.dvb-modal__body .wp-block-embed__wrapper[style*='padding-top'] iframe {
	position: static;
	width: auto;
	height: auto;
}

body.dvb-modal-open {
	overflow: hidden;
}

.dvb-unlicensed {
	margin: 0;
}

.dvb-unlicensed__header {
	margin: 0 0 1rem;
	padding: 1rem 1.25rem;
	background: #f0f6fc;
	border: 1px solid #c3d9ef;
	border-radius: 4px;
}

.dvb-unlicensed__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	line-height: 1.3;
}

.dvb-unlicensed__link {
	margin: 0;
}

@media (max-width: 600px) {
	.dvb-modal {
		padding: 16px;
	}

	.dvb-modal__dialog {
		max-width: calc(100vw - 32px);
	}

	.dvb-modal__close {
		top: -36px;
	}
}
