/* Popup Overlay */
#pnp-popup {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6); /* Darker overlay */
	z-index: 9999;
	opacity: 0;
	visibility: hidden; /* Hidden by default */
	transition: opacity 0.3s ease, visibility 0.3s ease;
	display: flex; /* Use flexbox for centering */
	align-items: center;
	justify-content: center;
}

#pnp-popup.show {
	opacity: 1;
	visibility: visible;
}

/* Popup Content */
.pnp-popup-content {
	background: var(--wawp-ac-card-bg, #ffffff);
	border-radius: 12px; /* Slightly more rounded corners */
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
	width: 90%; /* Responsive width */
	max-width: 550px; /* Max width for larger screens */
	text-align: center;
	padding: 30px; /* Increased padding */
	position: relative;
	transform: translateY(20px); /* Initial state for animation */
	opacity: 0; /* Initial state for animation */
	transition: transform 0.3s ease-out, opacity 0.3s ease-out, background-color 0.2s ease;
	overflow: hidden; /* To keep banner inside border-radius */
}

.pnp-popup-content:hover {
	background: var(--wawp-ac-card-bg-hover, #ffffff);
}

#pnp-popup.show .pnp-popup-content {
	transform: translateY(0); /* Final state for animation */
	opacity: 1;
}

/* Close Button */
.pnp-close {
	position: absolute;
	right: 15px;
	top: 15px;
	cursor: pointer;
	font-size: 28px; /* Larger close icon */
	color: #888;
	transition: color 0.2s ease;
	z-index: 10;
}

.pnp-close:hover {
	color: #333;
}

/* Focus outline for accessibility */
.pnp-close:focus,
#pnp-save-phone:focus,
#pnp-close-success:focus {
	outline: 2px solid var(--wawp-ac-btn-bg, #004449);
	outline-offset: 2px;
}

/* Images */
.pnp-popup-banner-image {
	width: calc(100% + 60px);
	margin: -30px -30px 20px -30px; /* Offset parent padding */
	display: block;
}

.pnp-popup-banner-image img {
	width: 100%;
	max-height: 150px;
	object-fit: cover;
	display: block;
}

.pnp-popup-inline-image {
	margin-bottom: 15px;
	display: flex;
}

.pnp-popup-inline-image img {
	max-width: 120px;
	max-height: 120px;
	object-fit: contain;
}

/* Input Wrapper for intl-tel-input */
.pnp-input-wrapper {
	margin-bottom: 20px;
}

.pnp-input-wrapper .iti {
	width: 100%; /* Ensure intl-tel-input takes full width */
}

.pnp-input-wrapper .iti__flag-container {
	border-radius: 8px 0 0 8px; /* Match popup border-radius */
}

.pnp-input-wrapper .iti__country-list {
	border-radius: 0 0 8px 8px; /* Match popup border-radius */
}

.pnp-input-wrapper input[type="tel"] {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 8px; /* Rounded input field */
	font-size: 16px;
	box-sizing: border-box; /* Include padding and border in element's total width and height */
	background: transparent;
}

/* Buttons */
.pnp-button {
	background: var(--wawp-ac-btn-bg, #004449);
	color: var(--wawp-ac-btn-text, #ffffff);
	border: none;
	border-radius: 8px;
	padding: 12px 30px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 120px; /* Ensure consistent button size */
}

.pnp-button:hover {
	background: var(--wawp-ac-btn-bg-hover, #003337);
	transform: translateY(-1px); /* Slight lift effect */
}

.pnp-button:active {
	transform: translateY(0); /* Press effect */
}

/* Loading Spinner for button */
.loading-spinner {
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top: 3px solid #fff;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Popup Titles and Descriptions */
.pnp-popup-title {
	font-size: 32px; /* Larger title */
	color: var(--wawp-ac-title-color, #333333);
	margin-bottom: 10px;
	line-height: 1.2;
	transition: color 0.2s ease;
}

.pnp-popup-content:hover .pnp-popup-title {
	color: var(--wawp-ac-title-hover, #333333);
}

.pnp-popup-des {
	color: var(--wawp-ac-desc-color, #666666); /* Softer text color */
	margin-bottom: 25px;
	font-size: 16px;
	transition: color 0.2s ease;
}

.pnp-popup-content:hover .pnp-popup-des {
	color: var(--wawp-ac-desc-hover, #666666);
}

/* Messages (Success/Error) */
.pnp-message {
	font-size: 14px;
	margin-top: -10px;
	margin-bottom: 15px;
	font-weight: 500;
}

.pnp-message.pnp-success {
	color: #28a745; /* Green for success */
}

.pnp-message.pnp-error {
	color: #dc3545; /* Red for error */
}

/* Success State */
.pnp-success-state {
	padding: 20px 0;
}

.success-icon {
	width: 120px;
	height: 120px;
	margin-bottom: 20px;
}

#pnp-close-success {
	margin-top: 25px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.pnp-popup-content {
		width: 95%;
		padding: 20px;
	}

	.pnp-popup-banner-image {
		margin: -20px -20px 15px -20px; /* Adjusted for smaller padding */
		width: calc(100% + 40px);
	}

	.pnp-popup-title {
		font-size: 28px;
	}

	.pnp-button {
		padding: 10px 25px;
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.pnp-popup-content {
		padding: 15px;
	}

	.pnp-popup-banner-image {
		margin: -15px -15px 15px -15px;
		width: calc(100% + 30px);
	}

	.pnp-popup-title {
		font-size: 24px;
	}

	.pnp-popup-des {
		font-size: 14px;
	}

	.pnp-button {
		padding: 8px 20px;
		font-size: 15px;
	}

	.success-icon {
		width: 100px;
		height: 100px;
	}
}

/* Verification/OTP States */
.pnp-otp-state,
.pnp-list-pending-state {
	padding: 20px 0;
	position: relative;
	text-align: center;
}

.pnp-back-to-input {
	position: absolute;
	left: 0;
	top: -10px;
	background: transparent;
	border: none;
	color: #666;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.pnp-back-to-input:hover {
	color: #111;
	background: rgba(0, 0, 0, 0.05);
}

.pnp-back-icon {
	stroke: currentColor;
	transition: transform 0.2s ease;
}

.pnp-back-to-input:hover .pnp-back-icon {
	transform: translateX(-2px);
}

.pnp-otp-input-wrapper {
	margin: 25px auto;
	max-width: 250px;
}

.pnp-otp-code-input {
	text-align: center;
	letter-spacing: 12px;
	font-size: 28px !important;
	font-weight: 700 !important;
	padding: 10px !important;
	border: 2px solid #ddd !important;
	border-radius: 8px !important;
	transition: border-color 0.2s ease !important;
}

.pnp-otp-code-input:focus {
	border-color: var(--wawp-ac-btn-bg, #004449) !important;
	outline: none !important;
}

.pnp-otp-resend-wrapper {
	margin-top: 20px;
}

.pnp-link-button {
	background: transparent;
	border: none;
	color: var(--wawp-ac-btn-bg, #004449);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	transition: opacity 0.2s ease;
}

.pnp-link-button:hover:not(:disabled) {
	opacity: 0.8;
}

.pnp-link-button:disabled {
	color: #aaa;
	cursor: not-allowed;
	text-decoration: none;
}

/* Loading Pulse Animation for List Polling */
.pnp-loading-pulse-container {
	position: relative;
	width: 80px;
	height: 80px;
	margin: 30px auto;
}

.pnp-pulse-circle {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: var(--wawp-ac-btn-bg, #004449);
	opacity: 0.15;
	position: absolute;
	animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pnp-pulse-circle-inner {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--wawp-ac-btn-bg, #004449);
	position: absolute;
	top: 20px;
	left: 20px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
	animation: pulse-dot 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) -0.4s infinite;
}

@keyframes pulse-ring {
	0% { transform: scale(0.6); opacity: 0.5; }
	80%, 100% { transform: scale(1.3); opacity: 0; }
}

@keyframes pulse-dot {
	0% { transform: scale(0.9); }
	50% { transform: scale(1.1); }
	100% { transform: scale(0.9); }
}

/* General classes */
.wawp-hide {
	display: none !important;
}
