/* YouTube Link Popup */
html.ytlp-open { overflow: hidden; }

.ytlp-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity .2s ease;
}
.ytlp-modal[hidden] { display: none; }
.ytlp-modal.ytlp-visible { opacity: 1; }

.ytlp-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .85);
	cursor: pointer;
}

.ytlp-dialog {
	position: relative;
	width: 100%;
	max-width: 960px;
	transform: scale(.96);
	transition: transform .2s ease;
}
.ytlp-visible .ytlp-dialog { transform: scale(1); }

.ytlp-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	border-radius: 6px;
	overflow: hidden;
}
/* YouTube Shorts: vertical player */
.ytlp-frame.ytlp-vertical {
	aspect-ratio: 9 / 16;
	width: auto;
	height: min(85vh, 900px);
	margin: 0 auto;
}
.ytlp-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ytlp-close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 34px;
	line-height: 40px;
	cursor: pointer;
	opacity: .85;
}
.ytlp-close:hover,
.ytlp-close:focus-visible { opacity: 1; background: rgba(255, 255, 255, .15); outline: none; }

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