/*
 * IM-Press Popup Builder — v5.0.3
 * Styles for popups emitted by class-popup-builder.php render_popup_html().
 * Markup: .imp-popup-wrapper > .imp-popup-overlay + .imp-popup-content > .imp-popup-close + .imp-popup-inner
 */

.imp-popup-wrapper {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	pointer-events: none;
}

.imp-popup-wrapper.imp-popup-visible {
	display: block;
	pointer-events: auto;
}

.imp-popup-overlay {
	position: absolute;
	inset: 0;
	background-color: #000;
	opacity: 0.7;
	cursor: pointer;
}

.imp-popup-content {
	position: absolute;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: #fff;
	color: #222;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	border-radius: 10px;
	padding: 32px 28px;
	box-sizing: border-box;
}

/* ── Position variants ─────────────────────────────────────── */
.imp-popup-content.imp-popup-center {
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 480px;
}
.imp-popup-content.imp-popup-top {
	top: 0; left: 0; right: 0;
	width: 100%;
	max-width: 100%;
	border-radius: 0;
}
.imp-popup-content.imp-popup-bottom {
	bottom: 0; left: 0; right: 0;
	width: 100%;
	max-width: 100%;
	border-radius: 0;
}
.imp-popup-content.imp-popup-top-left,
.imp-popup-content.imp-popup-top-right,
.imp-popup-content.imp-popup-bottom-left,
.imp-popup-content.imp-popup-bottom-right {
	width: 360px;
	max-width: calc(100vw - 32px);
}
.imp-popup-content.imp-popup-top-left    { top: 16px; left: 16px; }
.imp-popup-content.imp-popup-top-right   { top: 16px; right: 16px; }
.imp-popup-content.imp-popup-bottom-left { bottom: 16px; left: 16px; }
.imp-popup-content.imp-popup-bottom-right{ bottom: 16px; right: 16px; }

/* ── Close button ──────────────────────────────────────────── */
.imp-popup-close {
	position: absolute;
	top: 8px; right: 12px;
	background: transparent;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: #888;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.imp-popup-close:hover,
.imp-popup-close:focus {
	background-color: rgba(0, 0, 0, 0.06);
	color: #222;
	outline: 0;
}

.imp-popup-inner {
	margin-top: 4px;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes imp-popup-fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes imp-popup-fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes imp-popup-slideUp     { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes imp-popup-slideDown   { from { transform: translateY(-40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes imp-popup-zoomIn      { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes imp-popup-slideRight  { from { transform: translateX(60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes imp-popup-slideLeft   { from { transform: translateX(-60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.imp-popup-wrapper[data-animation="fadeIn"]    .imp-popup-content { animation: imp-popup-fadeIn 0.3s ease-out; }
.imp-popup-wrapper[data-animation="slideUp"]   .imp-popup-content { animation: imp-popup-slideUp 0.35s ease-out; }
.imp-popup-wrapper[data-animation="slideDown"] .imp-popup-content { animation: imp-popup-slideDown 0.35s ease-out; }
.imp-popup-wrapper[data-animation="zoomIn"]    .imp-popup-content { animation: imp-popup-zoomIn 0.3s ease-out; }
.imp-popup-wrapper[data-animation="slideRight"]  .imp-popup-content { animation: imp-popup-slideRight 0.35s ease-out; }
.imp-popup-wrapper[data-animation="slideLeft"] .imp-popup-content { animation: imp-popup-slideLeft 0.35s ease-out; }

.imp-popup-wrapper.imp-popup-closing { animation: imp-popup-fadeOut 0.2s ease-out forwards; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
	.imp-popup-content.imp-popup-center {
		width: calc(100vw - 32px);
		padding: 24px 18px;
	}
	.imp-popup-content.imp-popup-top-left,
	.imp-popup-content.imp-popup-top-right,
	.imp-popup-content.imp-popup-bottom-left,
	.imp-popup-content.imp-popup-bottom-right {
		left: 16px; right: 16px;
		width: auto;
	}
}
