/* =========================================================================
 * Video Popup Made — Styles
 * ====================================================================== */

/* ===========================================
 * STANDARD BUTTON
 * ========================================= */
.vpm-button-wrap {
	display: block;
}

.vpm-trigger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	border: none;
	font-family: inherit;
	line-height: 1.4;
	transition: all 0.25s ease;
	text-decoration: none;
	outline: none;
}

.vpm-trigger-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(108, 60, 225, 0.45);
}

.vpm-trigger-btn .vpm-btn-icon {
	font-size: 1em;
	line-height: 1;
}
.vpm-trigger-btn .vpm-btn-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ===========================================
 * CIRCLE FIXED BUTTON
 * ========================================= */
.vpm-circle-fixed-wrap {
	position: fixed;
	z-index: 999990;
	bottom: 30px;
	left: 30px;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Hidden state when past boundary */
.vpm-circle-fixed-wrap.vpm-boundary-hidden {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.vpm-circle-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	background-color: #6C3CE1;
	transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	outline: none;
	overflow: hidden;
}

.vpm-circle-btn:hover {
	transform: scale(1.08);
}

.vpm-circle-btn:focus-visible {
	box-shadow: 0 0 0 4px rgba(108, 60, 225, 0.45);
}

/* --- SVG circular text --- */
.vpm-circle-btn .vpm-circle-svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.vpm-circle-btn .vpm-circle-text {
	fill: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
}

/* --- Center icon — CRITICAL FIX --- */
.vpm-circle-icon-wrap {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-size: 28px;
	line-height: 1;
	pointer-events: none;
}

/* Font Awesome <i> icons */
.vpm-circle-icon-wrap i {
	display: block;
	font-size: inherit;
	color: inherit;
	line-height: 1;
}

/* Elementor SVG icons */
.vpm-circle-icon-wrap svg {
	display: block;
	width: 28px;
	height: 28px;
	fill: currentColor;
}
.vpm-circle-icon-wrap svg path {
	fill: currentColor;
}

/* Fallback play character */
.vpm-circle-icon-wrap .vpm-default-play {
	font-size: inherit;
	color: inherit;
	line-height: 1;
}

/* ===========================================
 * CIRCLE BUTTON ANIMATIONS
 * ========================================= */

/* Spin text */
.vpm-circle-anim-spin-text .vpm-circle-svg {
	animation: vpm-spin 12s linear infinite;
}

@keyframes vpm-spin {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Pulse */
.vpm-circle-anim-pulse {
	animation: vpm-pulse 2s ease-in-out infinite;
}

@keyframes vpm-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(108, 60, 225, 0.5); }
	50%      { box-shadow: 0 0 0 18px rgba(108, 60, 225, 0); }
}

/* Bounce */
.vpm-circle-anim-bounce {
	animation: vpm-bounce 2s ease infinite;
}

@keyframes vpm-bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40%  { transform: translateY(-14px); }
	60%  { transform: translateY(-7px); }
}

/* ===========================================
 * POPUP OVERLAY
 * ========================================= */
.vpm-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.vpm-popup-overlay.vpm-active {
	display: flex;
	opacity: 1;
}

.vpm-popup-overlay.vpm-closing {
	opacity: 0;
}

/* --- Popup content --- */
.vpm-popup-content {
	position: relative;
	max-width: 100%;
	max-height: 95vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Position: bottom */
.vpm-popup-overlay[data-vpm-position="bottom"] {
	align-items: flex-end;
}

.vpm-popup-content.vpm-pos-bottom {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	border-bottom-left-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

/* --- Video wrapper --- */
.vpm-video-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vpm-video-wrap iframe,
.vpm-video-wrap video {
	width: 100%;
	height: 100%;
	display: block;
	border: none;
	object-fit: contain;
}

/* --- Close button --- */
.vpm-popup-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 10;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	font-size: 28px;
	line-height: 1;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.vpm-popup-close:hover {
	background: rgba(0, 0, 0, 0.75);
	transform: scale(1.1);
}

/* ===========================================
 * POPUP ANIMATIONS
 * ========================================= */

/* Fade Scale */
.vpm-popup-overlay[data-vpm-animation="fade-scale"] .vpm-popup-content {
	transform: scale(0.85); opacity: 0;
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.vpm-popup-overlay[data-vpm-animation="fade-scale"].vpm-active .vpm-popup-content {
	transform: scale(1); opacity: 1;
}
.vpm-popup-overlay[data-vpm-animation="fade-scale"] .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) scale(0.85);
}
.vpm-popup-overlay[data-vpm-animation="fade-scale"].vpm-active .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) scale(1);
}

/* Fade */
.vpm-popup-overlay[data-vpm-animation="fade"] .vpm-popup-content {
	opacity: 0; transition: opacity 0.35s ease;
}
.vpm-popup-overlay[data-vpm-animation="fade"].vpm-active .vpm-popup-content { opacity: 1; }

/* Slide Up */
.vpm-popup-overlay[data-vpm-animation="slide-up"] .vpm-popup-content {
	transform: translateY(60px); opacity: 0;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.vpm-popup-overlay[data-vpm-animation="slide-up"].vpm-active .vpm-popup-content {
	transform: translateY(0); opacity: 1;
}
.vpm-popup-overlay[data-vpm-animation="slide-up"] .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) translateY(60px);
}
.vpm-popup-overlay[data-vpm-animation="slide-up"].vpm-active .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) translateY(0);
}

/* Slide Down */
.vpm-popup-overlay[data-vpm-animation="slide-down"] .vpm-popup-content {
	transform: translateY(-60px); opacity: 0;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.vpm-popup-overlay[data-vpm-animation="slide-down"].vpm-active .vpm-popup-content {
	transform: translateY(0); opacity: 1;
}
.vpm-popup-overlay[data-vpm-animation="slide-down"] .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) translateY(-60px);
}
.vpm-popup-overlay[data-vpm-animation="slide-down"].vpm-active .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) translateY(0);
}

/* Zoom In */
.vpm-popup-overlay[data-vpm-animation="zoom-in"] .vpm-popup-content {
	transform: scale(0.3); opacity: 0;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.vpm-popup-overlay[data-vpm-animation="zoom-in"].vpm-active .vpm-popup-content {
	transform: scale(1); opacity: 1;
}
.vpm-popup-overlay[data-vpm-animation="zoom-in"] .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) scale(0.3);
}
.vpm-popup-overlay[data-vpm-animation="zoom-in"].vpm-active .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) scale(1);
}

/* Flip */
.vpm-popup-overlay[data-vpm-animation="flip"] .vpm-popup-content {
	transform: perspective(1000px) rotateX(70deg); opacity: 0;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.vpm-popup-overlay[data-vpm-animation="flip"].vpm-active .vpm-popup-content {
	transform: perspective(1000px) rotateX(0); opacity: 1;
}
.vpm-popup-overlay[data-vpm-animation="flip"] .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) perspective(1000px) rotateX(70deg);
}
.vpm-popup-overlay[data-vpm-animation="flip"].vpm-active .vpm-popup-content.vpm-pos-bottom {
	transform: translateX(-50%) perspective(1000px) rotateX(0);
}

/* Closing states */
.vpm-popup-overlay.vpm-closing .vpm-popup-content { opacity: 0 !important; }
.vpm-popup-overlay[data-vpm-animation="fade-scale"].vpm-closing .vpm-popup-content  { transform: scale(0.85) !important; }
.vpm-popup-overlay[data-vpm-animation="slide-up"].vpm-closing .vpm-popup-content     { transform: translateY(60px) !important; }
.vpm-popup-overlay[data-vpm-animation="slide-down"].vpm-closing .vpm-popup-content   { transform: translateY(-60px) !important; }
.vpm-popup-overlay[data-vpm-animation="zoom-in"].vpm-closing .vpm-popup-content      { transform: scale(0.3) !important; }
.vpm-popup-overlay[data-vpm-animation="flip"].vpm-closing .vpm-popup-content          { transform: perspective(1000px) rotateX(70deg) !important; }

/* ===========================================
 * Responsive
 * ========================================= */
@media (max-width: 767px) {
	.vpm-popup-content {
		width: 95% !important;
		height: auto !important;
		max-height: 80vh;
		aspect-ratio: 16 / 9;
	}
	.vpm-circle-fixed-wrap {
		bottom: 16px !important;
		left: 16px !important;
	}
}
