/* ------------------------------------------------
  YouTube popup (grt-youtube-popup) - themed
------------------------------------------------ */
.grtyoutube-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px 20px;
	animation: grtyoutube-fade 0.3s ease;
}

.grtyoutube-popup-content {
	position: relative;
	width: min(960px, 100%, (100vh - 100px) * 16 / 9);
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	animation: grtyoutube-zoom 0.35s ease;
}

.grtyoutube-iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 16px;
	background: #000;
}

/* Close button - drawn with CSS, no image needed */
.grtyoutube-popup-close {
	position: absolute;
	top: -55px;
	right: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--theme-color, #D3224D) !important;
	cursor: pointer;
	font-size: 0;
	transition: transform 0.3s ease, background 0.3s ease;
}
.grtyoutube-popup-close::before,
.grtyoutube-popup-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
}
.grtyoutube-popup-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}
.grtyoutube-popup-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.grtyoutube-popup-close:hover {
	transform: rotate(90deg);
	background: var(--title-color2, #00274C) !important;
}

/* Dark theme (default) */
.grtyoutube-dark-theme {
	background: rgba(8, 25, 51, 0.92);
	backdrop-filter: blur(4px);
}
.grtyoutube-dark-theme .grtyoutube-popup-content {
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Light theme */
.grtyoutube-light-theme {
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(4px);
}
.grtyoutube-light-theme .grtyoutube-popup-content {
	box-shadow: 0 20px 60px rgba(0, 39, 76, 0.25);
}

@keyframes grtyoutube-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes grtyoutube-zoom {
	from { opacity: 0; transform: scale(0.92); }
	to { opacity: 1; transform: scale(1); }
}

@media (max-width: 767px) {
	.grtyoutube-popup {
		padding: 70px 12px 12px;
	}
	.grtyoutube-popup-content,
	.grtyoutube-iframe {
		border-radius: 10px;
	}
	.grtyoutube-popup-close {
		top: -52px;
		width: 40px;
		height: 40px;
	}
}
