/*
 * GDC Lead Popup - frontend styles
 * Professional pharma education theme: teal/blue medical palette.
 */

.pnlp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(var(--pnlp-overlay-rgb, 8, 15, 35), 0.72);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.pnlp-overlay.pnlp-visible {
	display: flex;
}

.pnlp-overlay.pnlp-fade-in {
	opacity: 1;
}

.pnlp-popup {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 64px rgba(4, 36, 60, 0.35);
	padding: 36px 32px 32px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	transform: translateY(16px) scale(0.97);
	transition: transform 0.35s ease;
}

.pnlp-overlay.pnlp-fade-in .pnlp-popup {
	transform: translateY(0) scale(1);
}

/* Close button */
.pnlp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: #f0f4f8;
	color: #50677c;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	padding: 0;
}

.pnlp-close:hover,
.pnlp-close:focus {
	background: #e1eaf2;
	color: #0b3954;
	outline: none;
}

/* Header */
.pnlp-popup-header {
	text-align: center;
	margin-bottom: 22px;
}

.pnlp-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 14px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--pnlp-primary, #5649ff), var(--pnlp-secondary, #4f3bff));
	color: #ffffff;
}

.pnlp-icon svg {
	width: 28px;
	height: 28px;
}

/* Custom logo image (any size scales to fit the header area) */
.pnlp-popup .pnlp-logo {
	display: block !important;
	width: 100% !important;
	margin: 0 0 14px !important;
	padding: 0 !important;
	text-align: center !important;
	float: none !important;
}

.pnlp-popup .pnlp-logo-img {
	display: inline-block !important;
	margin: 0 auto !important;
	padding: 0 !important;
	width: 100% !important;
	max-width: var(--pnlp-logo-width, 340px) !important;
	height: auto !important;
	max-height: none !important;
	object-fit: contain;
	float: none !important;
	position: static !important;
	transform: none !important;
}

.pnlp-title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--pnlp-title-color, #12172a);
}

.pnlp-description {
	margin: 0;
	font-size: 15px;
	color: #5a7184;
}

/* Form */
.pnlp-form {
	display: block;
}

.pnlp-field {
	margin-bottom: 16px;
}

.pnlp-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #33475b;
	letter-spacing: 0.02em;
	transition: color 0.18s ease;
}

.pnlp-required {
	color: #dc2626;
}

.pnlp-popup .pnlp-form .pnlp-field input[type="text"],
.pnlp-popup .pnlp-form .pnlp-field input[type="tel"] {
	width: 100% !important;
	height: 52px !important;
	min-height: 52px !important;
	box-sizing: border-box !important;
	padding: 0 14px !important;
	font-size: 15px !important;
	line-height: 50px !important;
	color: #1f2d3d !important;
	background: #f8fafc !important;
	border: 1px solid #d7e0ea !important;
	border-radius: 10px !important;

	appearance: none;
	-webkit-appearance: none;
}

.pnlp-popup .pnlp-form .pnlp-field input[type="text"]:focus,
.pnlp-popup .pnlp-form .pnlp-field input[type="text"]:focus-visible,
.pnlp-popup .pnlp-form .pnlp-field input[type="tel"]:focus,
.pnlp-popup .pnlp-form .pnlp-field input[type="tel"]:focus-visible {
	
	border: 1px solid var(--pnlp-primary, #5649ff) !important;
	background: #f8fafc !important;
	
}


.pnlp-popup .pnlp-form .pnlp-field input.pnlp-input-error,
.pnlp-popup .pnlp-form .pnlp-field input.pnlp-input-error:focus,
.pnlp-popup .pnlp-form .pnlp-field input.pnlp-input-error:hover {
	border: 1px solid #dc2626 !important;
	background: #f8fafc !important;
	box-shadow: none !important;

}

/* Error message */
.pnlp-error {
	display: none;
	margin-bottom: 14px;
	padding: 10px 12px;
	font-size: 13.5px;
	color: #991b1b;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
}

.pnlp-error.pnlp-show {
	display: block;
}

/* Submit button */
.pnlp-submit {
	width: 100%;
	padding: 13px 18px;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--pnlp-primary, #5649ff), var(--pnlp-secondary, #4f3bff));
	color: var(--pnlp-button-text, #ffffff);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	box-shadow: 0 8px 20px rgba(var(--pnlp-primary-rgb, 86, 73, 255), 0.35);
}

.pnlp-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(var(--pnlp-primary-rgb, 86, 73, 255), 0.45);
}

.pnlp-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Success state */
.pnlp-success {
	text-align: center;
	padding: 10px 0 4px;
}

.pnlp-success-icon {
	display: inline-flex;
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
	color: #16a34a;
}

.pnlp-success-icon svg {
	width: 56px;
	height: 56px;
}

.pnlp-success p {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #14532d;
	line-height: 1.5;
}

/* App download popup (second popup) */
.pnlp-icon-app {
	background: linear-gradient(135deg, var(--pnlp-primary, #5649ff), var(--pnlp-secondary, #4f3bff));
}

.pnlp-store-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 6px;
	padding-bottom: 4px;
}

.pnlp-store-btn {
	display: inline-block;
	line-height: 0;
	border-radius: 10px;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pnlp-store-btn:hover,
.pnlp-store-btn:focus {
	transform: translateY(-3px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
	outline: none;
}

.pnlp-store-btn img {
	display: block;
	height: 56px;
	width: auto;
	border-radius: 10px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
	.pnlp-popup {
		max-width: 100%;
		padding: 30px 22px 24px;
		border-radius: 14px;
	}

	.pnlp-title {
		font-size: 20px;
	}

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

	.pnlp-popup .pnlp-logo-img {
		max-width: 100% !important;
	}

	.pnlp-store-buttons {
		flex-direction: column;
	}

	.pnlp-store-btn img {
		height: 52px;
	}
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.pnlp-overlay,
	.pnlp-popup {
		transition: none;
	}
}
