/**
 * Popup styling. Uses the theme's own CSS variables when they're present
 * (--accent, --radius, --ink, etc. from lankaads.css) so it matches
 * automatically on this theme family, falling back to sane defaults so
 * the plugin also looks fine on any other theme.
 */

.lgpn-overlay {
	position: fixed;
	inset: 0;
	background: rgba(11, 32, 39, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}

.lgpn-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.lgpn-overlay[hidden] {
	display: flex; /* keep flex centering once JS removes [hidden] via attribute swap */
}

body.lgpn-lock-scroll {
	overflow: hidden;
}

.lgpn-modal {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: var(--panel, #ffffff);
	border-radius: var(--radius, 20px);
	box-shadow: var(--shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.25));
	padding: 28px 26px 26px;
	text-align: center;
	transform: translateY(18px) scale(.97);
	opacity: 0;
	transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

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

.lgpn-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: var(--panel-tint, #f2f2f2);
	color: var(--ink, #0B2027);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease;
}

.lgpn-close:hover {
	background: var(--line, #DCEEEA);
}

.lgpn-image {
	margin: -4px -4px 18px;
	border-radius: calc(var(--radius, 20px) - 4px);
	overflow: hidden;
	max-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-soft, #EEFBF8);
}

.lgpn-image img {
	width: 100%;
	height: 100%;
	max-height: 220px;
	object-fit: cover;
	display: block;
}

.lgpn-heading {
	font-family: 'Sora', sans-serif;
	font-size: clamp(20px, 4vw, 26px);
	font-weight: 800;
	color: var(--ink, #0B2027);
	margin: 0 0 10px;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.lgpn-description {
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	color: var(--ink-muted, #5C7672);
	margin: 0 0 22px;
	line-height: 1.55;
}

.lgpn-description p {
	margin: 0 0 10px;
}

.lgpn-description p:last-child {
	margin-bottom: 0;
}

.lgpn-btn {
	display: inline-block;
	border: none;
	background: var(--gradient-primary, linear-gradient(120deg, #FF8A00 0%, #FFB13D 100%));
	color: #fff;
	font-family: 'Sora', sans-serif;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .01em;
	padding: 13px 32px;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: var(--shadow-glow, 0 10px 30px rgba(255, 138, 0, 0.32));
	transition: transform .15s ease, filter .15s ease;
}

.lgpn-btn:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
}

@media (max-width: 480px) {
	.lgpn-modal {
		padding: 24px 18px 20px;
	}
}
