/* ==========================================================================
   Toronto Reptiles — "Which Exotic Reptile Are You?" quiz  (v2)
   v2: result page reworked into a horoscope-style profile (personality /
   likes / dislikes / most compatible with). Birth-month zodiac kept but
   re-themed to NON-reptile signs so it complements the reptile result.
   Self-contained, mobile-first. Theme palette tokens (Nunito / green). No gold.
   ========================================================================== */

.tr-quiz {
	--q-green:        var(--wp--preset--color--primary,       #2D6A4F);
	--q-green-mid:    var(--wp--preset--color--primary-mid,   #40916C);
	--q-green-light:  var(--wp--preset--color--primary-light, #52B788);
	--q-green-300:    #74C69D;
	--q-green-200:    var(--wp--preset--color--green-200,     #B7E4C7);
	--q-green-100:    var(--wp--preset--color--green-100,     #D8F3DC);
	--q-sage:         var(--wp--preset--color--sage,          #F0F7F4);
	--q-dark:         var(--wp--preset--color--dark-green,    #1B3A2F);
	--q-charcoal:     var(--wp--preset--color--charcoal,      #111111);
	--q-muted:        var(--wp--preset--color--muted,         #6B7280);
	--q-border:       var(--wp--preset--color--border,        #E5E7EB);
	--q-white:        #FFFFFF;
	--q-radius:       18px;
	--q-radius-sm:    12px;
	--q-shadow:       0 10px 30px rgba(27, 58, 47, 0.10);
	--q-shadow-sm:    0 4px 14px rgba(27, 58, 47, 0.08);

	font-family: var(--wp--preset--font-family--body, "Nunito", system-ui, sans-serif);
	color: var(--q-charcoal);
	max-width: 640px;
	margin: 0 auto;
	padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 1.5rem) clamp(3rem, 7vw, 5rem);
	min-height: 60vh;
	box-sizing: border-box;
}

.tr-quiz *,
.tr-quiz *::before,
.tr-quiz *::after { box-sizing: border-box; }

/* --- Screen wrapper + fade ----------------------------------------------- */
.tr-quiz__screen { animation: tr-quiz-fade 0.32s ease both; }
@keyframes tr-quiz-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .tr-quiz__screen { animation: none; } }

/* --- Progress ------------------------------------------------------------ */
.tr-quiz__progress { margin: 0 0 1.5rem; }
.tr-quiz__progress-label {
	display: block;
	font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
	text-transform: uppercase; color: var(--q-green-mid); margin-bottom: 0.5rem;
}
.tr-quiz__progress-track {
	height: 8px; width: 100%; background: var(--q-green-100);
	border-radius: 999px; overflow: hidden;
}
.tr-quiz__progress-bar {
	display: block; height: 100%; background: var(--q-green);
	border-radius: 999px; transition: width 0.35s ease;
}

/* --- Intro --------------------------------------------------------------- */
.tr-quiz__intro { text-align: center; }
.tr-quiz__eyebrow {
	display: inline-block;
	font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--q-green-mid);
	background: var(--q-green-100); padding: 0.4rem 0.9rem;
	border-radius: 999px; margin-bottom: 1.25rem;
}
.tr-quiz__title {
	font-family: var(--wp--preset--font-family--heading, "Nunito", sans-serif);
	font-weight: 900; line-height: 1.1;
	font-size: clamp(2rem, 7vw, 3rem); margin: 0 0 1rem; color: var(--q-dark);
}
.tr-quiz__lead {
	font-size: clamp(1rem, 3.4vw, 1.15rem); color: var(--q-muted);
	max-width: 30rem; margin: 0 auto 2rem; line-height: 1.6;
}
.tr-quiz__intro-badge { width: 110px; height: 110px; margin: 0 auto 1.5rem; }

/* --- Questions ----------------------------------------------------------- */
.tr-quiz__question {
	font-family: var(--wp--preset--font-family--heading, "Nunito", sans-serif);
	font-weight: 800; line-height: 1.2;
	font-size: clamp(1.4rem, 5vw, 1.9rem); color: var(--q-dark); margin: 0 0 1.5rem;
}
.tr-quiz__options { display: grid; gap: 0.85rem; }

/* --- Buttons (answers, months) ------------------------------------------- */
.tr-quiz__option,
.tr-quiz__month {
	display: flex; align-items: center; width: 100%; text-align: left;
	font-family: inherit; font-size: 1.05rem; font-weight: 700; color: var(--q-charcoal);
	background: var(--q-white); border: 2px solid var(--q-border);
	border-radius: var(--q-radius-sm); padding: 1.05rem 1.15rem; min-height: 60px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}
.tr-quiz__option:hover,
.tr-quiz__month:hover { border-color: var(--q-green-light); background: var(--q-sage); }
.tr-quiz__option:active,
.tr-quiz__month:active { transform: scale(0.985); }
.tr-quiz__option:focus-visible,
.tr-quiz__month:focus-visible,
.tr-quiz__btn:focus-visible { outline: 3px solid var(--q-green-light); outline-offset: 2px; }
.tr-quiz__option.is-selected { border-color: var(--q-green); background: var(--q-green-100); }
.tr-quiz__option-key {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; margin-right: 0.85rem; border-radius: 8px;
	background: var(--q-green-100); color: var(--q-green); font-weight: 800; font-size: 0.9rem;
}
.tr-quiz__option.is-selected .tr-quiz__option-key { background: var(--q-green); color: var(--q-white); }

/* --- Month picker -------------------------------------------------------- */
.tr-quiz__months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.tr-quiz__month { justify-content: center; min-height: 56px; padding: 0.9rem 0.75rem; }
@media (min-width: 420px) { .tr-quiz__months { grid-template-columns: repeat(3, 1fr); } }

/* --- Generic action buttons ---------------------------------------------- */
.tr-quiz__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	font-family: inherit; font-size: 1.05rem; font-weight: 800; line-height: 1;
	border-radius: 999px; padding: 1rem 2rem; min-height: 56px;
	border: 2px solid transparent; cursor: pointer; text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
	-webkit-tap-highlight-color: transparent;
}
.tr-quiz__btn:active { transform: scale(0.98); }
.tr-quiz__btn--primary { background: var(--q-green); color: var(--q-white); }
.tr-quiz__btn--primary:hover { background: var(--q-green-mid); color: var(--q-white); }
.tr-quiz__btn--secondary { background: var(--q-white); color: var(--q-green); border-color: var(--q-green); }
.tr-quiz__btn--secondary:hover { background: var(--q-sage); }
.tr-quiz__btn--ghost { background: transparent; color: var(--q-muted); border-color: transparent; font-weight: 700; }
.tr-quiz__btn--ghost:hover { color: var(--q-green); }
.tr-quiz__btn--lg { font-size: 1.15rem; padding: 1.1rem 2.4rem; min-height: 60px; }
.tr-quiz__btn--block { width: 100%; }

/* --- Result header ------------------------------------------------------- */
.tr-quiz__result { text-align: center; }
.tr-quiz__result-badge {
	width: 128px; height: 128px; margin: 0 auto 1.25rem; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; box-shadow: var(--q-shadow);
}
.tr-quiz__result-badge svg { width: 64%; height: 64%; }
.tr-quiz__result-kicker {
	font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--q-green-mid); margin: 0 0 0.35rem;
}
.tr-quiz__result-name {
	font-family: var(--wp--preset--font-family--heading, "Nunito", sans-serif);
	font-weight: 900; line-height: 1.08;
	font-size: clamp(2rem, 7vw, 2.8rem); color: var(--q-dark); margin: 0 0 0.25rem;
}
.tr-quiz__result-persona {
	font-size: 1.15rem; font-weight: 700; font-style: italic;
	color: var(--q-green); margin: 0 0 1.25rem;
}
.tr-quiz__result-blurb {
	font-size: 1.05rem; line-height: 1.65; color: var(--q-charcoal);
	max-width: 34rem; margin: 0 auto 1.75rem; text-align: left;
}

/* --- Horoscope profile --------------------------------------------------- */
.tr-quiz__profile {
	display: grid; grid-template-columns: 1fr; gap: 0.85rem;
	text-align: left; margin: 0 0 1.75rem;
}
@media (min-width: 560px) {
	.tr-quiz__profile { grid-template-columns: 1fr 1fr; }
	.tr-quiz__profile-card--full { grid-column: 1 / -1; }
}
.tr-quiz__profile-card {
	background: var(--q-sage); border: 1px solid var(--q-green-100);
	border-radius: var(--q-radius-sm); padding: 1.05rem 1.15rem;
}
.tr-quiz__profile-label {
	display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
	text-transform: uppercase; color: var(--q-green-mid); margin: 0 0 0.7rem;
}
.tr-quiz__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tr-quiz__chip {
	background: var(--q-green-100); color: var(--q-dark); font-weight: 700;
	font-size: 0.9rem; padding: 0.35rem 0.8rem; border-radius: 999px;
}
.tr-quiz__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.tr-quiz__list li {
	position: relative; padding-left: 1.3rem; font-size: 0.95rem;
	line-height: 1.4; color: var(--q-charcoal);
}
.tr-quiz__list--like li::before {
	content: ""; position: absolute; left: 0; top: 0.45em;
	width: 9px; height: 9px; border-radius: 50%; background: var(--q-green);
}
.tr-quiz__list--dislike li::before {
	content: ""; position: absolute; left: 0; top: 0.62em;
	width: 11px; height: 2.5px; border-radius: 2px; background: var(--q-muted);
}
/* Most compatible with — mini reptile pills */
.tr-quiz__match { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tr-quiz__match-pill {
	display: flex; align-items: center; gap: 0.6rem;
	background: var(--q-white); border: 1px solid var(--q-border);
	border-radius: 999px; padding: 0.4rem 0.95rem 0.4rem 0.4rem;
}
.tr-quiz__match-badge {
	flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
}
.tr-quiz__match-badge svg { width: 62%; height: 62%; color: #fff; }
.tr-quiz__match-text { line-height: 1.15; }
.tr-quiz__match-name { display: block; font-weight: 800; font-size: 0.92rem; color: var(--q-dark); }
.tr-quiz__match-persona { display: block; font-weight: 600; font-size: 0.74rem; color: var(--q-muted); }

/* --- Fun fact ------------------------------------------------------------ */
.tr-quiz__fact {
	display: block; text-align: left; background: var(--q-green-100);
	border-radius: var(--q-radius-sm); padding: 1rem 1.15rem; margin: 0 0 2rem;
	font-size: 0.95rem; line-height: 1.55; color: var(--q-dark);
}
.tr-quiz__fact strong { font-weight: 800; }

/* --- Birth-month horoscope bonus (distinct, dark) ------------------------ */
.tr-quiz__zodiac {
	position: relative; text-align: center; background: var(--q-dark);
	color: var(--q-white); border-radius: var(--q-radius);
	padding: 1.75rem 1.5rem; margin: 0 0 2rem; overflow: hidden;
}
.tr-quiz__zodiac::before {
	content: ""; position: absolute; inset: 0;
	background:
		radial-gradient(circle at 85% 15%, rgba(82, 183, 136, 0.28), transparent 45%),
		radial-gradient(circle at 10% 90%, rgba(116, 198, 157, 0.18), transparent 40%);
	pointer-events: none;
}
.tr-quiz__zodiac > * { position: relative; }
.tr-quiz__zodiac-kicker {
	font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em;
	text-transform: uppercase; color: var(--q-green-200); margin: 0 0 0.6rem;
}
.tr-quiz__zodiac-sign {
	font-family: var(--wp--preset--font-family--heading, "Nunito", sans-serif);
	font-weight: 900; font-size: clamp(1.4rem, 5.5vw, 1.9rem); line-height: 1.15;
	margin: 0 0 0.65rem; color: var(--q-white);
}
.tr-quiz__zodiac-reading {
	font-size: 1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.86);
	max-width: 32rem; margin: 0 auto;
}

/* --- CTA block ----------------------------------------------------------- */
.tr-quiz__cta {
	background: var(--q-sage); border: 1px solid var(--q-green-100);
	border-radius: var(--q-radius); padding: 1.75rem 1.5rem;
	text-align: center; margin: 0 0 1.5rem;
}
.tr-quiz__cta-title {
	font-family: var(--wp--preset--font-family--heading, "Nunito", sans-serif);
	font-weight: 900; font-size: clamp(1.3rem, 5vw, 1.7rem); line-height: 1.2;
	color: var(--q-dark); margin: 0 0 0.6rem;
}
.tr-quiz__cta-sub {
	font-size: 1rem; line-height: 1.6; color: var(--q-muted);
	max-width: 30rem; margin: 0 auto 1.4rem;
}
.tr-quiz__cta-actions {
	display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch;
	max-width: 22rem; margin: 0 auto;
}
.tr-quiz__cta-foot { margin: 1.2rem 0 0; font-size: 0.95rem; color: var(--q-muted); }
.tr-quiz__cta-foot a {
	color: var(--q-green); font-weight: 800; text-decoration: underline; text-underline-offset: 2px;
}

/* --- Result footer actions ---------------------------------------------- */
.tr-quiz__result-foot {
	display: flex; flex-wrap: wrap; justify-content: center;
	gap: 0.5rem 1rem; margin-top: 0.5rem;
}

/* --- Visually hidden ----------------------------------------------------- */
.tr-quiz__sr {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* ===== v3 — element sign pill (Fire / Air / Earth / Water / Sun / Storm) === */
.tr-quiz__result-kicker { margin: 0 0 0.6rem; }   /* now holds the element pill */
.tr-quiz__element {
	display: inline-flex; align-items: center; gap: 0.4rem;
	font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--q-green-mid); background: var(--q-green-100);
	padding: 0.4rem 0.95rem; border-radius: 999px;
}
.tr-quiz__element svg { width: 16px; height: 16px; color: var(--q-green); flex: 0 0 auto; }

/* ===== v4 — element-icon badge inside "Most compatible with" pills ======== */
.tr-quiz__match-badge--el { background: var(--q-green-100); }
.tr-quiz__match-badge--el svg { color: var(--q-green); width: 56%; height: 56%; }

/* ===== quiz v6 — solid circle with a morphing reptile silhouette ========== */
.tr-quiz__morph {
	width: 124px; height: 124px; margin: 0 auto 1.5rem;
	border-radius: 50%;
	background: var(--q-green);
	display: grid; place-items: center;
	box-shadow: 0 12px 30px rgba(27, 58, 47, 0.20);
}
.tr-quiz__morph svg { width: 62%; height: 62%; display: block; overflow: visible; }
.tr-quiz__morph path { fill: #fff; }
