/**
 * WhatsApp Locker — front-end overlay styles.
 * Uses CSS custom properties (set inline per-page) for opacity/width/radius
 * so admin design settings apply without extra stylesheets.
 */

.wl-overlay {
	--wl-overlay-opacity: 0.9;
	--wl-popup-width: 450px;
	--wl-border-radius: 20px;

	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	background-color: rgba(17, 24, 39, var(--wl-overlay-opacity));
	opacity: 0;
	transition: opacity 0.25s ease;
}

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

.wl-overlay[hidden] {
	display: none !important;
}

.wl-popup {
	width: 100%;
	max-width: var(--wl-popup-width);
	background: #ffffff;
	border-radius: var(--wl-border-radius);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	padding: 36px 28px;
	text-align: center;
	box-sizing: border-box;
	transform: translateY(16px) scale(0.98);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
	max-height: 90vh;
	overflow-y: auto;
}

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

.wl-icon {
	font-size: 42px;
	line-height: 1;
	margin-bottom: 12px;
}

.wl-title {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}

.wl-description {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.5;
	color: #4b5563;
}

.wl-btn {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	padding: 13px 20px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
}

.wl-btn:active {
	transform: scale(0.98);
}

.wl-btn:focus-visible {
	outline: 3px solid #93c5fd;
	outline-offset: 2px;
}

.wl-btn-whatsapp {
	background-color: #25d366;
	color: #ffffff;
	box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.wl-btn-whatsapp:hover {
	background-color: #1fb959;
}

.wl-return-message {
	margin: 18px 0 14px;
	padding: 10px 14px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-radius: 10px;
	color: #065f46;
	font-size: 14px;
}

.wl-return-message[hidden] {
	display: none !important;
}

.wl-btn-unlock {
	background-color: #111827;
	color: #ffffff;
	margin-top: 4px;
}

.wl-btn-unlock:hover {
	background-color: #1f2937;
}

.wl-btn[hidden] {
	display: none !important;
}

/* Prevent background scrolling while the overlay is active. */
body.wl-locked {
	overflow: hidden !important;
	height: 100%;
}

/* Shortcode-locked content blocks. */
.wl-shortcode-block[data-wl-hidden="1"] .wl-shortcode-content {
	display: none;
}

.wl-shortcode-locked-notice {
	padding: 16px;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	background: #f9fafb;
	color: #4b5563;
	font-size: 14px;
	text-align: center;
}

@media (max-width: 480px) {
	.wl-popup {
		padding: 28px 20px;
		border-radius: min(var(--wl-border-radius), 18px);
	}

	.wl-title {
		font-size: 19px;
	}

	.wl-description {
		font-size: 14px;
	}
}
