/* PopupPulse Frontend Styles */

/* native dialog reset and styling */
dialog.emp-popup-overlay {
	border: none;
	padding: 0;
	background: transparent;
	max-width: 90vw;
	max-height: 90vh;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	border-radius: 12px;
	overflow: visible;
	outline: none;
}

/* Glassmorphism backdrop filter */
dialog.emp-popup-overlay::backdrop {
	background-color: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* CSS variables for customizable transitions */
:root {
	--emp-popup-transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Open scale-up animation */
dialog.emp-popup-overlay[open] {
	animation: empShow var(--emp-popup-transition) forwards;
}

@keyframes empShow {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Inner wrapper container */
.emp-popup-container {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.emp-popup-close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 32px;
	height: 32px;
	padding: 0;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	transition: all 0.2s ease-in-out;
}

.emp-popup-close:hover {
	background: rgba(255, 255, 255, 0.35);
	transform: scale(1.1) rotate(90deg);
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.6);
}

/* Scroll wrapper for inner template content */
.emp-popup-content {
	overflow: hidden;
	width: 100%;
	border-radius: 8px;
}

/* Hide default scrollbar but allow scrolling inside popup content */
.emp-popup-content::-webkit-scrollbar {
	width: 6px;
}
.emp-popup-content::-webkit-scrollbar-track {
	background: transparent;
}
.emp-popup-content::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 3px;
}
.emp-popup-content::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Disable body scrolling when dialog modal is shown */
body.emp-popup-active {
	overflow: hidden;
}
