/**
 * Bedots Popup Video
 */

.bpv {
	display: inline-block;
}

.bpv--placeholder {
	padding: 12px 16px;
	border: 1px dashed #ccc;
	border-radius: 6px;
	color: #666;
	font-size: 14px;
}

.bpv__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 14px 28px;
	border: none;
	border-radius: 999px;
	background: #9d224e;
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.bpv__trigger:hover {
	filter: brightness(1.08);
}

.bpv__trigger:focus {
	outline: 2px solid #9d224e;
	outline-offset: 3px;
}

.bpv__overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	margin: 0;
	background: rgba(0, 0, 0, 0.82);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	isolation: isolate;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.bpv__overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.bpv__overlay[hidden] {
	display: flex !important;
}

.bpv__dialog {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	margin: auto;
	width: min(960px, calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.25s ease;
}

.bpv__dialog--fit {
	width: auto;
	max-width: calc(100vw - 48px);
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

.bpv__overlay.is-open .bpv__dialog {
	transform: translateY(0) scale(1);
}

.bpv__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.bpv__close:hover {
	background: rgba(0, 0, 0, 0.8);
}

.bpv__player {
	position: relative;
	width: 100%;
	background: #000;
	line-height: 0;
}

.bpv__dialog--fit .bpv__player {
	background: transparent;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.bpv__player--landscape {
	aspect-ratio: 16 / 9;
}

.bpv__player--portrait {
	aspect-ratio: 9 / 16;
	width: min(calc((100vh - 96px) * 9 / 16), calc(100vw - 48px), 420px);
	max-height: calc(100vh - 96px);
}

.bpv__player--native {
	width: auto;
	height: auto;
	max-width: calc(100vw - 48px);
	max-height: calc(100vh - 96px);
}

.bpv__iframe,
.bpv__video {
	display: block;
	border: 0;
	vertical-align: top;
}

.bpv__player--landscape .bpv__iframe,
.bpv__player--portrait .bpv__iframe {
	width: 100%;
	height: 100%;
}

.bpv__player--native .bpv__video {
	width: 100%;
	height: 100%;
	object-fit: fill;
	background: #000;
}

body.bpv-modal-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.bpv__overlay {
		padding: 16px;
	}

	.bpv__dialog,
	.bpv__dialog--fit .bpv__player {
		border-radius: 8px;
	}

	.bpv__player--portrait {
		width: min(calc((100vh - 64px) * 9 / 16), calc(100vw - 32px));
		max-height: calc(100vh - 64px);
	}

	.bpv__player--native {
		max-width: calc(100vw - 32px);
		max-height: calc(100vh - 64px);
	}
}
