/* WingManWp Secure Media — frontend gallery + lightbox */

.wmwp-sm-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
	gap: 6px;
	margin-top: 10px;
}

.wmwp-sm-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: #f1f5f9;
	cursor: pointer;
	margin: 0;
	line-height: 0;
	min-height: 220px;
	transition: transform .15s ease;
	-webkit-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
	user-drag: none;
	-webkit-touch-callout: none;
}
.wmwp-sm-item:hover  { transform: scale( 1.01 ); }
.wmwp-sm-item:focus  { outline: 2px solid #1a6eff; outline-offset: 2px; }

.wmwp-sm-canvas {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.wmwp-sm-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background: #e2e8f0;
}
.wmwp-sm-loading::after {
	content: '';
	width: 22px;
	height: 22px;
	border: 3px solid #cbd5e1;
	border-top-color: #1a6eff;
	border-radius: 50%;
	animation: wmwp-sm-spin .9s linear infinite;
}
@keyframes wmwp-sm-spin { to { transform: rotate( 360deg ); } }

/* Video watermark overlay — same look on tile posters + lightbox video. */
.wmwp-sm-wm {
	position: absolute;
	pointer-events: none;
	z-index: 2;
	max-width: 40%;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}
.wmwp-sm-wm img { display: block; max-width: 100%; height: auto; }
.wmwp-sm-wm--top-left     { top: 8px;    left: 8px; }
.wmwp-sm-wm--top-right    { top: 8px;    right: 8px; }
.wmwp-sm-wm--bottom-left  { bottom: 8px; left: 8px; }
.wmwp-sm-wm--bottom-right { bottom: 8px; right: 8px; }
.wmwp-sm-wm--center       { top: 50%; left: 50%; transform: translate( -50%, -50% ); }
.wmwp-sm-wm--modal.wmwp-sm-wm--top-left     { top: 14px;    left: 14px; }
.wmwp-sm-wm--modal.wmwp-sm-wm--top-right    { top: 14px;    right: 14px; }
.wmwp-sm-wm--modal.wmwp-sm-wm--bottom-left  { bottom: 14px; left: 14px; }
.wmwp-sm-wm--modal.wmwp-sm-wm--bottom-right { bottom: 14px; right: 14px; }

.wmwp-sm-play-badge {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.wmwp-sm-play-badge::before {
	content: '';
	width: 0;
	height: 0;
	border-left: 22px solid #fff;
	border-top: 14px solid transparent;
	border-bottom: 14px solid transparent;
	filter: drop-shadow( 0 2px 6px rgba( 0, 0, 0, 0.55 ) );
	margin-left: 4px;
}
.wmwp-sm-play-badge::after {
	content: '';
	position: absolute;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba( 0, 0, 0, 0.42 );
	z-index: -1;
}

/* ─────────────────────────────────────────────
   Lightbox modal
   ───────────────────────────────────────────── */

.wmwp-sm-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
}
.wmwp-sm-modal.is-open { display: flex; }
body.wmwp-sm-modal-open { overflow: hidden; }

.wmwp-sm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 6, 10, 20, 0.90 );
	backdrop-filter: blur( 6px );
	animation: wmwp-sm-fade .18s ease;
}
@keyframes wmwp-sm-fade { from { opacity: 0; } to { opacity: 1; } }

.wmwp-sm-modal__stage {
	position: relative;
	z-index: 1;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wmwp-sm-modal__canvas,
.wmwp-sm-modal__video {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	display: block;
	border-radius: 8px;
	box-shadow: 0 24px 60px rgba( 0, 0, 0, 0.55 );
	background: #000;
}
.wmwp-sm-modal__video { outline: none; }
.wmwp-sm-modal__video-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
}

.wmwp-sm-modal__spinner {
	width: 40px;
	height: 40px;
	border: 4px solid rgba( 255, 255, 255, 0.25 );
	border-top-color: #fff;
	border-radius: 50%;
	animation: wmwp-sm-spin 1s linear infinite;
}
.wmwp-sm-modal__error {
	color: #fecaca;
	font-size: 15px;
	padding: 20px 30px;
	background: rgba( 30, 30, 45, 0.9 );
	border-radius: 8px;
}

.wmwp-sm-modal__close {
	position: absolute;
	top: 20px;
	right: 24px;
	z-index: 2;
	width: 44px;
	height: 44px;
	background: rgba( 255, 255, 255, 0.10 );
	color: #fff;
	border: 0;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .12s ease, transform .12s ease;
}
.wmwp-sm-modal__close:hover,
.wmwp-sm-modal__close:focus {
	background: rgba( 255, 255, 255, 0.22 );
	outline: none;
	transform: rotate( 90deg );
}

.wmwp-sm-modal__nav {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 2;
	width: 48px;
	height: 48px;
	background: rgba( 255, 255, 255, 0.10 );
	color: #fff;
	border: 0;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .12s ease;
}
.wmwp-sm-modal__nav:hover,
.wmwp-sm-modal__nav:focus {
	background: rgba( 255, 255, 255, 0.24 );
	outline: none;
}
.wmwp-sm-modal__nav--prev { left: 22px; }
.wmwp-sm-modal__nav--next { right: 22px; }
.wmwp-sm-modal.is-single .wmwp-sm-modal__nav { display: none; }

.wmwp-sm-modal__counter {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX( -50% );
	z-index: 2;
	color: #fff;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 20px;
	background: rgba( 255, 255, 255, 0.10 );
}
.wmwp-sm-modal.is-single .wmwp-sm-modal__counter { display: none; }

@media ( max-width: 600px ) {
	.wmwp-sm-modal__nav { width: 40px; height: 40px; }
	.wmwp-sm-modal__nav--prev { left: 10px; }
	.wmwp-sm-modal__nav--next { right: 10px; }
	.wmwp-sm-modal__close { top: 12px; right: 12px; }
}
