/**
 * Noxora Media Player — premium/SaaS modal styles.
 */

.nx-media-player {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	transition: opacity 0.25s ease;
}

.nx-media-player.is-closing {
	opacity: 0;
}

.nx-media-player__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 12, 0.94);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.nx-media-player__frame {
	position: relative;
	z-index: 1;
	width: min(92vw, 1240px);
	max-height: 94vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 28px;
	box-sizing: border-box;
	outline: none;
}

.nx-media-player__close,
.nx-media-player__nav {
	position: absolute;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.07);
	color: #fff;
	cursor: pointer;
	transition: all 0.2s ease;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	font-family: inherit;
	line-height: 1;
}

.nx-media-player__close:hover,
.nx-media-player__close:focus,
.nx-media-player__nav:hover,
.nx-media-player__nav:focus {
	background: rgba(212, 175, 55, 0.18);
	border-color: rgba(246, 230, 184, 0.55);
	color: #f6e6b8;
	transform: scale(1.08);
	outline: none;
}

.nx-media-player__close {
	top: 6px;
	right: 6px;
	font-size: 1.6rem;
}

.nx-media-player__close::before {
	content: '×';
}

.nx-media-player__nav--prev {
	left: 0;
	top: 50%;
	transform: translateY(-50%);
}

.nx-media-player__nav--next {
	right: 0;
	top: 50%;
	transform: translateY(-50%);
}

.nx-media-player__nav--prev::before,
.nx-media-player__nav--next::before {
	font-size: 1.8rem;
	font-weight: 300;
	color: currentColor;
}

.nx-media-player__nav--prev::before {
	content: '‹';
	margin-right: 3px;
}

.nx-media-player__nav--next::before {
	content: '›';
	margin-left: 3px;
}

.nx-media-player__stage {
	position: relative;
	width: 100%;
	max-height: 78vh;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 18px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.28);
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nx-media-player__stage.is-loading::after {
	content: '';
	position: absolute;
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: #d4af37;
	border-radius: 50%;
	animation: nx-media-player-spin 0.85s linear infinite;
}

@keyframes nx-media-player-spin {
	to { transform: rotate(360deg); }
}

.nx-media-player__image,
.nx-media-player__video,
.nx-media-player__iframe {
	display: block;
	border-radius: 18px;
}

.nx-media-player__image {
	max-width: 100%;
	max-height: 78vh;
	height: auto;
	object-fit: contain;
}

.nx-media-player__video {
	width: 100%;
	max-height: 78vh;
	background: #000;
	outline: none;
}

.nx-media-player__iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 78vh;
	border: 0;
	background: #000;
}

.nx-media-player__caption {
	margin-top: 14px;
	font-size: 0.92rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
	text-align: center;
	max-width: 76%;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	line-height: 1.4;
}

.nx-media-player__counter {
	margin-top: 5px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #f6e6b8;
	letter-spacing: 0.06em;
}

/* Plyr integration: keep it inside the rounded stage */
.nx-media-player__stage .plyr {
	width: 100%;
	border-radius: 18px;
}

.nx-media-player__stage .plyr--video {
	background: #000;
}

@media (max-width: 768px) {
	.nx-media-player__frame {
		width: 100vw;
		max-height: 100vh;
		padding: 52px 10px 10px;
	}

	.nx-media-player__close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}

	.nx-media-player__nav {
		width: 38px;
		height: 38px;
	}

	.nx-media-player__nav--prev { left: 6px; }
	.nx-media-player__nav--next { right: 6px; }

	.nx-media-player__stage {
		border-radius: 12px;
		max-height: 74vh;
	}

	.nx-media-player__image,
	.nx-media-player__video,
	.nx-media-player__iframe {
		border-radius: 12px;
		max-height: 74vh;
	}

	.nx-media-player__caption {
		font-size: 0.85rem;
		max-width: 90%;
	}
}
