/* PVL Consultation Popup — left side slide-in panel. Scoped under .pvl-* to avoid theme clashes.
   --pvl-accent   = panel background (PVL navy)
   --pvl-accent-2 = buttons / accent text / reopen tab (PVL green) */

/* ---- dim overlay behind the panel ---- */
.pvl-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(3, 18, 45, 0.55);
	opacity: 0;
	transition: opacity 0.3s ease;
}
.pvl-popup-overlay[hidden] { display: none; }
.pvl-popup-overlay.pvl-visible { opacity: 1; }

/* ---- the sliding panel ---- */
.pvl-popup {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	width: 420px;
	max-width: 90vw;
	height: 100vh;
	height: 100dvh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--pvl-accent, #03246b);
	color: #fff;
	box-shadow: 4px 0 30px rgba(0, 0, 0, 0.35);
	padding: 28px 30px 40px;
	transform: translateX(-100%);
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
	font-family: inherit;
	line-height: 1.5;
	box-sizing: border-box;
}
.pvl-popup[hidden] { display: none; }
.pvl-popup.pvl-visible { transform: translateX(0); }
.pvl-popup *, .pvl-popup *::before, .pvl-popup *::after { box-sizing: border-box; }

.pvl-popup-close {
	position: absolute;
	top: 16px;
	right: 18px;
	width: 38px;
	height: 38px;
	border: none;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease;
}
.pvl-popup-close:hover { background: rgba(255, 255, 255, 0.34); }

.pvl-popup-eyebrow {
	margin: 4px 40px 6px 0;
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}
.pvl-popup-heading {
	margin: 0 0 10px;
	font-size: 1.5em;
	line-height: 1.2;
	font-weight: 800;
	color: var(--pvl-accent-2, #61ce70);
}
.pvl-popup-sub {
	margin: 0 0 22px;
	font-size: 0.92em;
	color: rgba(255, 255, 255, 0.82);
}

/* ---- underline-style fields on the coloured panel ---- */
.pvl-popup-field { margin-bottom: 20px; }
.pvl-popup-field label {
	display: block;
	margin-bottom: 2px;
	font-size: 0.92em;
	font-weight: 600;
	color: #fff;
}
.pvl-popup-field label span { color: var(--pvl-accent-2, #61ce70); }

/* High-specificity + !important so the host theme's form styles can't turn
   these into white rounded pill boxes. */
.pvl-popup .pvl-popup-field input,
.pvl-popup .pvl-popup-field textarea {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	padding: 8px 0 !important;
	margin: 0 !important;
	border: none !important;
	border-bottom: 1.5px solid rgba(255, 255, 255, 0.4) !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 16px !important; /* 16px stops iOS zoom-on-focus */
	line-height: 1.4 !important;
	font-family: inherit !important;
	height: auto !important;
	min-height: 0 !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	transition: border-color 0.15s ease;
}
.pvl-popup .pvl-popup-field textarea {
	resize: vertical !important;
	min-height: 90px !important;
	border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
	border-radius: 8px !important;
	padding: 10px 12px !important;
}
.pvl-popup .pvl-popup-field input::placeholder,
.pvl-popup .pvl-popup-field textarea::placeholder { color: rgba(255, 255, 255, 0.55) !important; }
.pvl-popup .pvl-popup-field input:focus,
.pvl-popup .pvl-popup-field textarea:focus {
	outline: none !important;
	border-color: var(--pvl-accent-2, #61ce70) !important;
	border-bottom-color: var(--pvl-accent-2, #61ce70) !important;
	background: transparent !important;
	box-shadow: none !important;
}
.pvl-popup .pvl-popup-field input.pvl-invalid,
.pvl-popup .pvl-popup-field textarea.pvl-invalid {
	border-bottom-color: #ff8b80 !important;
}
/* kill the autofill yellow-on-white that breaks dark fields */
.pvl-popup .pvl-popup-field input:-webkit-autofill,
.pvl-popup .pvl-popup-field input:-webkit-autofill:focus {
	-webkit-text-fill-color: #fff !important;
	-webkit-box-shadow: 0 0 0 1000px var(--pvl-accent, #03246b) inset !important;
	transition: background-color 9999s ease-out 0s;
}

/* ---- treatment radio group ---- */
.pvl-popup-group-label {
	display: block;
	margin: 0 0 10px;
	font-size: 0.92em;
	font-weight: 700;
	color: #fff;
}
.pvl-popup-radios { margin: 0 0 22px; }
.pvl-popup-radio {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 11px;
	font-size: 0.95em;
	color: rgba(255, 255, 255, 0.92);
	cursor: pointer;
}
.pvl-popup .pvl-popup-radio input {
	appearance: none !important;
	-webkit-appearance: none !important;
	width: 19px !important;
	height: 19px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
	border-radius: 50% !important;
	background: transparent !important;
	box-shadow: none !important;
	flex: 0 0 auto;
	position: relative;
	cursor: pointer;
	transition: border-color 0.15s ease;
}
.pvl-popup .pvl-popup-radio input:checked {
	border-color: var(--pvl-accent-2, #61ce70) !important;
}
.pvl-popup-radio input:checked::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--pvl-accent-2, #61ce70);
}

/* honeypot */
.pvl-popup-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px; overflow: hidden;
}

.pvl-popup-submit {
	display: block;
	width: 100%;
	padding: 14px 18px;
	border: none;
	border-radius: 8px;
	background: var(--pvl-accent-2, #61ce70);
	color: #fff;
	font-size: 1.04em;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
}
.pvl-popup-submit:hover { filter: brightness(0.92); }
.pvl-popup-submit:disabled { opacity: 0.6; cursor: default; }

.pvl-popup-error {
	margin: 14px 0 0;
	padding: 10px 12px;
	background: rgba(255, 139, 128, 0.18);
	border-left: 3px solid #ff8b80;
	border-radius: 4px;
	color: #ffd9d4;
	font-size: 0.88em;
}
.pvl-popup-error[hidden] { display: none; }

.pvl-popup-consent {
	margin: 14px 0 0;
	font-size: 0.74em;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
	line-height: 1.4;
}

/* ---- thank-you state ---- */
.pvl-popup-thanks { text-align: center; padding: 40px 6px; }
.pvl-popup-thanks[hidden] { display: none; }
.pvl-popup-tick {
	width: 70px; height: 70px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--pvl-accent-2, #61ce70);
	color: #fff;
	font-size: 38px; line-height: 70px;
}
.pvl-popup-thanks p { font-size: 1.1em; color: #fff; margin: 0 0 24px; }

/* ---- persistent reopen tab on the left edge ----
   High-specificity + !important so the theme can't stretch it to full width. */
button.pvl-popup-reopen {
	position: fixed !important;
	left: 0 !important;
	right: auto !important;
	top: 50% !important;
	bottom: auto !important;
	transform: translateY(-50%) !important;
	z-index: 99990 !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	border: none !important;
	background: var(--pvl-accent, #03246b) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-weight: 700 !important;
	font-size: 0.9em !important;
	line-height: 1.2 !important;
	letter-spacing: 0.03em !important;
	text-transform: none !important;
	padding: 18px 12px !important;
	cursor: pointer;
	border-radius: 0 8px 8px 0 !important;
	writing-mode: vertical-rl !important;
	text-orientation: mixed !important;
	box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.25) !important;
	display: none;
	transition: filter 0.15s ease;
}
button.pvl-popup-reopen.pvl-visible {
	display: inline-block !important;
}
button.pvl-popup-reopen:hover { filter: brightness(0.92); }

@media (max-width: 480px) {
	.pvl-popup { width: 90vw; max-width: 90vw; padding: 20px 20px 28px; }
	.pvl-popup-heading { font-size: 1.28em; margin-bottom: 8px; }
	.pvl-popup-eyebrow { margin-bottom: 4px; }
	.pvl-popup-sub { margin-bottom: 14px; }
	.pvl-popup-field { margin-bottom: 13px; }
	.pvl-popup-radios { margin-bottom: 14px; }
	.pvl-popup-radio { margin-bottom: 8px; }
	.pvl-popup .pvl-popup-field textarea { min-height: 64px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.pvl-popup-overlay, .pvl-popup { transition: none; }
}
