/* Custom Popup — isolated styles (prefix: cpmd-) */

html.cpmd-popup-open,
body.cpmd-popup-open {
	overflow: hidden;
}

.cpmd-overlay {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(18, 18, 22, 0.45);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.cpmd-overlay.cpmd-visible {
	opacity: 1;
}

.cpmd-overlay *,
.cpmd-overlay *::before,
.cpmd-overlay *::after {
	box-sizing: border-box;
}

.cpmd-modal {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	margin: 0;
	padding: 28px 22px 24px;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
	font-family: Georgia, "Times New Roman", Times, serif;
	color: #1a1a1a;
	line-height: 1.45;
	-webkit-overflow-scrolling: touch;
	transform: translateY(12px) scale(0.98);
	opacity: 0;
	transition: transform 0.28s ease, opacity 0.28s ease;
}

.cpmd-overlay.cpmd-visible .cpmd-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.cpmd-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #555;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cpmd-close:hover,
.cpmd-close:focus {
	color: #111;
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.cpmd-heading {
	margin: 0 0 12px;
	padding-right: 28px;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #111827;
	text-align: center;
}

.cpmd-subheading {
	margin: 0 0 16px;
	font-size: 0.98rem;
	color: #374151;
	text-align: center;
}

.cpmd-subheading p {
	margin: 0 0 0.6em;
}

.cpmd-subheading p:last-child {
	margin-bottom: 0;
}

.cpmd-image-wrap {
	margin: 0 0 16px;
	text-align: center;
}

.cpmd-image-wrap a {
	display: inline-block;
	max-width: 100%;
	line-height: 0;
	text-decoration: none;
}

.cpmd-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 10px;
}

.cpmd-before-button {
	margin: 0 0 14px;
	font-size: 0.95rem;
	color: #4b5563;
	text-align: center;
}

.cpmd-before-button p {
	margin: 0 0 0.5em;
}

.cpmd-before-button p:last-child {
	margin-bottom: 0;
}

.cpmd-button-wrap {
	margin: 0 0 14px;
	text-align: center;
}

.cpmd-button {
	display: inline-block;
	min-width: 70%;
	max-width: 100%;
	padding: 14px 22px;
	border: 0;
	border-radius: 10px;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.cpmd-button:hover,
.cpmd-button:focus {
	filter: brightness(1.06);
	transform: translateY(-1px);
	outline: none;
	text-decoration: none;
}

.cpmd-after-button {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
	text-align: center;
}

.cpmd-after-button p {
	margin: 0 0 0.4em;
}

.cpmd-after-button p:last-child {
	margin-bottom: 0;
}

@media (min-width: 480px) {
	.cpmd-modal {
		padding: 32px 28px 28px;
		max-width: 460px;
	}

	.cpmd-heading {
		font-size: 1.6rem;
	}

	.cpmd-button {
		min-width: 220px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpmd-overlay,
	.cpmd-modal,
	.cpmd-button {
		transition: none;
	}
}
