/**
 * Porter Case Quiz — front-end styles.
 * Scoped to .pcq. Matches porterprotects.com Oxygen site: #51230d buttons,
 * 1px solid brown borders, 5px radius, Mulish font.
 */

.pcq {
	--pcq-btn:       #51230d;
	--pcq-btn-hover: #3a1808;
	--pcq-accent:    #893002;
	--pcq-gold:      #d2b05e;
	--pcq-red:       #861b1e;
	--pcq-text:      #404040;
	--pcq-heading:   #000000;
	--pcq-border:    #51230d;
	--pcq-line:      #d9d0c6;
	--pcq-bg-soft:   #faf8f5;
	--pcq-radius:    5px;

	font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--pcq-text);
	max-width: 620px;
	margin: 28px auto;
	box-sizing: border-box;
}
.pcq *, .pcq *::before, .pcq *::after { box-sizing: border-box; }

/* ---- Card ---- */
.pcq-card {
	background: #fff;
	border: 1px solid var(--pcq-border);
	border-radius: var(--pcq-radius);
	padding: 30px 28px;
	animation: pcq-fade 0.3s ease;
}
@keyframes pcq-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---- Typography ---- */
.pcq-h {
	font-size: 24px;
	line-height: 1.3;
	font-weight: 800;
	color: var(--pcq-heading);
	margin: 0 0 12px;
}
.pcq-text {
	font-size: 16px;
	line-height: 1.6;
	margin: 0 0 18px;
}
.pcq-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pcq-accent);
	margin: 0 0 8px;
}

/* ---- Progress ---- */
.pcq-progress {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
}
.pcq-progress__bar {
	flex: 1;
	height: 6px;
	background: var(--pcq-line);
	border-radius: 99px;
	overflow: hidden;
}
.pcq-progress__fill {
	display: block;
	height: 100%;
	background: var(--pcq-gold);
	border-radius: 99px;
	transition: width 0.3s ease;
}
.pcq-progress__label {
	font-size: 13px;
	font-weight: 700;
	color: var(--pcq-accent);
	white-space: nowrap;
}

/* ---- Answer options ---- */
.pcq-answers { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.pcq-answer {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: left;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	color: var(--pcq-heading);
	background: var(--pcq-bg-soft);
	border: 1px solid var(--pcq-line);
	border-radius: var(--pcq-radius);
	padding: 14px 16px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.pcq-answer:hover,
.pcq-answer:focus-visible {
	border-color: var(--pcq-border);
	background: #fff;
	outline: none;
}
.pcq-answer__dot {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--pcq-border);
}
.pcq-answer.is-selected {
	border-color: var(--pcq-border);
	background: #fff;
}
.pcq-answer.is-selected .pcq-answer__dot {
	background: var(--pcq-border);
	box-shadow: inset 0 0 0 3px #fff;
}

/* ---- Buttons — matches Oxygen .ct-link-button ---- */
.pcq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: var(--pcq-btn);
	border: 1px solid var(--pcq-btn);
	border-radius: var(--pcq-radius);
	padding: 12px 24px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	text-decoration: none;
	line-height: 1.4;
}
.pcq-btn:hover { background: var(--pcq-btn-hover); border-color: var(--pcq-btn-hover); }
.pcq-btn:active { opacity: 0.9; }
.pcq-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pcq-btn--block { width: 100%; }

/* Back button — secondary outline style */
.pcq-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--pcq-accent);
	background: none;
	border: 1px solid var(--pcq-line);
	border-radius: var(--pcq-radius);
	padding: 8px 16px;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.pcq-back:hover { border-color: var(--pcq-border); color: var(--pcq-btn); }

/* Call CTA */
.pcq-btn--call { background: var(--pcq-btn); border-color: var(--pcq-btn); }
.pcq-btn--call:hover { background: var(--pcq-btn-hover); border-color: var(--pcq-btn-hover); }

/* ---- Verdict ---- */
.pcq-verdict {
	border-left: 4px solid var(--pcq-gold);
	background: var(--pcq-bg-soft);
	border-radius: var(--pcq-radius);
	padding: 18px 20px;
	margin: 0 0 22px;
}
.pcq-verdict .pcq-h { font-size: 20px; margin-bottom: 6px; }
.pcq-verdict .pcq-text { margin-bottom: 0; font-size: 15px; }

/* ---- Lead form ---- */
.pcq-field { margin: 0 0 12px; }
.pcq-field label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var(--pcq-heading);
	margin: 0 0 5px;
}
.pcq-field input {
	width: 100%;
	font-family: inherit;
	font-size: 16px;
	color: var(--pcq-text);
	border: 1px solid var(--pcq-line);
	border-radius: var(--pcq-radius);
	padding: 11px 12px;
	background: #fff;
	transition: border-color 0.15s ease;
}
.pcq-field input:focus {
	border-color: var(--pcq-border);
	outline: none;
}
.pcq-field input.is-error { border-color: var(--pcq-red); }
.pcq-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.pcq-consent {
	font-size: 12px;
	line-height: 1.5;
	color: #8a8279;
	margin: 12px 0 0;
}
.pcq-error {
	font-size: 14px;
	font-weight: 700;
	color: var(--pcq-red);
	margin: 0 0 12px;
}
.pcq-or {
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: #a89f93;
	margin: 16px 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* ---- Spinner ---- */
.pcq-spinner {
	width: 18px;
	height: 18px;
	border: 3px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pcq-spin 0.7s linear infinite;
}
@keyframes pcq-spin { to { transform: rotate(360deg); } }

/* ---- Thank you ---- */
.pcq-thanks { text-align: center; }
.pcq-thanks .pcq-check {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--pcq-btn);
	color: #fff;
	font-size: 28px;
	line-height: 52px;
	font-weight: 800;
}

/* ---- Popup modal ---- */
.pcq-popup__backdrop {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999998;
	animation: pcq-fade-in 0.3s ease;
}
.pcq-popup__container {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 99999999;
	max-width: 620px;
	width: 90vw;
	max-height: 85vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	animation: pcq-slide-up 0.3s ease;
}
.pcq-popup__container .pcq {
	margin: 0;
}
.pcq-popup__close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--pcq-accent, #893002);
	color: var(--pcq-accent, #893002);
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.15s ease, color 0.15s ease;
}
.pcq-popup__close:hover {
	background: var(--pcq-accent, #893002);
	color: #fff;
}
@keyframes pcq-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes pcq-slide-up {
	from { opacity: 0; transform: translate(-50%, -46%); }
	to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
	.pcq-card { padding: 20px 18px; }
	.pcq-h { font-size: 21px; }
	.pcq-popup__container {
		width: 95vw;
		max-height: 90vh;
		top: 50%;
	}
	.pcq-popup__close {
		top: -10px;
		right: -6px;
		width: 30px;
		height: 30px;
		font-size: 18px;
	}
}
