.sp-popup {
	--sp-bg: #ffffff;
	--sp-text: #1f2937;
	--sp-btn: #2563eb;
	--sp-width: 480px;
	position: fixed;
	z-index: 999999;
	visibility: hidden;
	pointer-events: none;
}

.sp-popup.sp-center {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.sp-popup.sp-corner {
	bottom: 20px;
	max-width: calc(100vw - 32px);
}
.sp-popup.sp-bottom-right { right: 16px; }
.sp-popup.sp-bottom-left  { left: 16px; }

.sp-popup.is-open {
	visibility: visible;
	pointer-events: auto;
}

.sp-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.sp-popup.is-open .sp-overlay { opacity: 1; }

.sp-dialog {
	position: relative;
	width: 100%;
	max-width: var(--sp-width);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: var(--sp-bg);
	color: var(--sp-text);
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
	outline: none;
}
.sp-popup.is-open .sp-dialog {
	opacity: 1;
	transform: none;
}

.sp-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px 14px 0 0;
}

.sp-body {
	padding: 28px 28px 24px;
	text-align: center;
}

.sp-title {
	margin: 0 0 10px;
	font-size: 1.5em;
	line-height: 1.3;
	color: inherit;
}

.sp-content { line-height: 1.6; }
.sp-content > :first-child { margin-top: 0; }
.sp-content > :last-child  { margin-bottom: 0; }

.sp-button {
	display: inline-block;
	margin-top: 18px;
	padding: 12px 26px;
	background: var(--sp-btn);
	color: #fff !important;
	border: 0;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter 0.15s ease;
}
.sp-button:hover,
.sp-button:focus { filter: brightness(0.9); }

.sp-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 1;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	color: inherit;
	font-size: 22px;
	line-height: 34px;
	cursor: pointer;
}
.sp-close:hover,
.sp-close:focus { background: rgba(0, 0, 0, 0.16); }

body.sp-no-scroll { overflow: hidden; }

@media (max-width: 480px) {
	.sp-body { padding: 24px 20px 20px; }
	.sp-popup.sp-corner { left: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.sp-overlay,
	.sp-dialog { transition: none; }
}
