/* =====================================================
   Video Popup Manager — Public Styles
   ===================================================== */

/* ── Floating Button ─────────────────────────────── */
.vpm-floating-btn {
	position: fixed;
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 50px;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	line-height: 1;
	letter-spacing: .3px;
	text-decoration: none;
	box-shadow: 0 4px 20px rgba(0,0,0,.25);
	transition: transform .2s, box-shadow .2s, opacity .3s;
	will-change: transform;
}
.vpm-floating-btn:hover {
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 8px 30px rgba(0,0,0,.35);
}

/* Positions */
.vpm-floating-btn--bottom-right  { bottom: 24px; right: 24px; }
.vpm-floating-btn--bottom-left   { bottom: 24px; left: 24px; }
.vpm-floating-btn--bottom-center { bottom: 24px; left: 50%; transform: translateX(-50%); }
.vpm-floating-btn--bottom-center:hover { transform: translateX(-50%) translateY(-3px) scale(1.03); }

/* Animations */
.vpm-floating-btn--anim-pulse {
	animation: vpmPulse 2.5s infinite;
}
.vpm-floating-btn--anim-bounce {
	animation: vpmBounce 1.5s infinite;
}
.vpm-floating-btn--anim-shake {
	animation: vpmShake 3s infinite;
}

@keyframes vpmPulse {
	0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,.25), 0 0 0 0 rgba(0,0,0,.15); }
	50%       { box-shadow: 0 4px 20px rgba(0,0,0,.25), 0 0 0 10px rgba(0,0,0,0); }
}
@keyframes vpmBounce {
	0%, 100% { transform: translateY(0); }
	50%       { transform: translateY(-8px); }
}
@keyframes vpmShake {
	0%, 100%, 60% { transform: rotate(0); }
	70%  { transform: rotate(-4deg); }
	80%  { transform: rotate(4deg); }
	90%  { transform: rotate(-2deg); }
	95%  { transform: rotate(2deg); }
}

/* Icon */
.vpm-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.vpm-btn-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* Entrance */
.vpm-floating-btn--hidden  { opacity: 0; pointer-events: none; }
.vpm-floating-btn--visible { opacity: 1; pointer-events: auto; }

/* ── Overlay ─────────────────────────────────────── */
.vpm-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,.75);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
	backdrop-filter: blur(4px);
}
.vpm-overlay--open {
	opacity: 1;
	visibility: visible;
}

/* ── Popup Container ─────────────────────────────── */
.vpm-popup {
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	width: 100%;
	max-width: 860px;
	position: relative;
	transform: scale(.92) translateY(20px);
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
	box-shadow: 0 25px 60px rgba(0,0,0,.6);
}
.vpm-overlay--open .vpm-popup {
	transform: scale(1) translateY(0);
}

/* ── Close Button ────────────────────────────────── */
.vpm-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	background: rgba(0,0,0,.5);
	border: none;
	color: #fff;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	transition: background .2s;
}
.vpm-close:hover { background: rgba(0,0,0,.8); }

/* ── Video Wrapper ───────────────────────────────── */
.vpm-video-wrapper {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 */
	background: #111;
}
.vpm-video-wrapper iframe,
.vpm-video-wrapper video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* ── Thumbnail / Loading ─────────────────────────── */
.vpm-thumb-overlay {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.vpm-play-circle {
	width: 72px;
	height: 72px;
	background: rgba(255,255,255,.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 20px rgba(0,0,0,.4);
	transition: transform .2s;
}
.vpm-thumb-overlay:hover .vpm-play-circle { transform: scale(1.1); }
.vpm-play-circle svg { width: 28px; height: 28px; fill: #1e293b; margin-left: 4px; }

/* Loading spinner */
.vpm-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
}
.vpm-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255,255,255,.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: vpmSpin .8s linear infinite;
}
@keyframes vpmSpin { to { transform: rotate(360deg); } }

/* Progress bar */
.vpm-progress-wrap {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255,255,255,.2);
}
.vpm-progress-bar {
	height: 100%;
	background: #ef4444;
	width: 0;
	transition: width .5s linear;
}

/* ── Popup Footer (CTA) ──────────────────────────── */
.vpm-popup-footer {
	padding: 14px 20px;
	background: #1a1a1a;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.vpm-popup-title {
	color: #e2e8f0;
	font-size: 14px;
	font-weight: 600;
	margin: 0;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.vpm-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	color: #fff !important;
	transition: filter .2s, transform .15s;
	white-space: nowrap;
	flex-shrink: 0;
}
.vpm-cta-btn:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 600px) {
	.vpm-floating-btn { padding: 10px 16px; font-size: 13px; }
	.vpm-floating-btn--bottom-right  { bottom: 16px; right: 16px; }
	.vpm-floating-btn--bottom-left   { bottom: 16px; left: 16px; }
	.vpm-floating-btn--bottom-center { bottom: 16px; }
	.vpm-popup-footer { flex-direction: column; text-align: center; }
	.vpm-popup-title  { white-space: normal; }
	.vpm-cta-btn      { width: 100%; justify-content: center; }
}

/* ── Newspaper Theme Compat ──────────────────────── */
.vpm-overlay,
.vpm-floating-btn {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
