/* Grow Paradise Plant Finder
   Palette intentionally matches Grow Paradise Plant Library's own
   custom properties (see that plugin's public/css/public.css) so the
   quiz and its results feel like one continuous product, not a bolt-on.
   Values are duplicated here (rather than assumed) so this file still
   looks right even on the rare page where gp-public.css hasn't loaded. */

.gp-plant-finder {
	--gp-green: #2f5233;
	--gp-green-light: #eef3ea;
	--gp-ink: #1f2421;
	--gp-muted: #5c6660;
	--gp-border: #e1e6de;
	--gpf-amber: #7a5b1e;
	--gpf-amber-light: #fbf1dd;
	--gpf-radius: 16px;
	--gpf-shadow: 0 8px 24px rgba(31, 36, 33, 0.08);

	max-width: 800px;
	margin: 0 auto;
	padding: 8px;
	color: var(--gp-ink);
	font-size: 16px;
	box-sizing: border-box;
}

.gp-plant-finder *,
.gp-plant-finder *::before,
.gp-plant-finder *::after {
	box-sizing: border-box;
}

.gp-plant-finder img {
	max-width: 100%;
	display: block;
}

.gpf-noscript {
	background: var(--gpf-amber-light);
	color: var(--gpf-amber);
	border-radius: 10px;
	padding: 12px 16px;
}

/* ---------- Intro ---------- */

.gpf-intro {
	text-align: center;
	margin-bottom: 24px;
}

.gpf-heading {
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	margin: 0 0 8px;
	color: var(--gp-ink);
}

.gpf-subheading {
	color: var(--gp-muted);
	max-width: 52ch;
	margin: 0 auto;
	line-height: 1.5;
}

/* ---------- Progress ---------- */

.gpf-progress {
	margin: 0 auto 28px;
	max-width: 480px;
}

.gpf-progress__bar {
	background: var(--gp-border);
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}

.gpf-progress__fill {
	display: block;
	height: 100%;
	background: var(--gp-green);
	border-radius: inherit;
	transition: width 0.35s ease;
}

.gpf-progress__label {
	text-align: center;
	font-size: 0.85rem;
	color: var(--gp-muted);
	margin: 8px 0 0;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* ---------- Quiz card ---------- */

.gpf-quiz {
	background: #fff;
	border: 1px solid var(--gp-border);
	border-radius: var(--gpf-radius);
	box-shadow: var(--gpf-shadow);
	padding: clamp(20px, 4vw, 40px);
	overflow: hidden;
}

.gpf-steps {
	min-height: 260px;
}

.gpf-step {
	animation: gpfFadeSlide 0.35s ease both;
}

@keyframes gpfFadeSlide {
	from {
		opacity: 0;
		transform: translateX(16px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.gpf-step--back {
	animation-name: gpfFadeSlideBack;
}

@keyframes gpfFadeSlideBack {
	from {
		opacity: 0;
		transform: translateX(-16px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.gpf-step__title {
	font-size: clamp(1.15rem, 3vw, 1.5rem);
	margin: 0 0 4px;
}

.gpf-step__hint {
	color: var(--gp-muted);
	margin: 0 0 20px;
}

/* ---------- Tile options (light / soil / water) ---------- */

.gpf-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
}

.gpf-option {
	appearance: none;
	background: #fff;
	border: 1.5px solid var(--gp-border);
	border-radius: 14px;
	padding: 20px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	cursor: pointer;
	font: inherit;
	color: var(--gp-ink);
	position: relative;
	transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
	min-height: 100px;
}

.gpf-option:hover {
	border-color: var(--gp-green);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(47, 82, 51, 0.12);
}

.gpf-option:focus-visible {
	outline: 3px solid var(--gp-green);
	outline-offset: 2px;
}

.gpf-option[aria-checked="true"] {
	background: var(--gp-green-light);
	border-color: var(--gp-green);
	color: var(--gp-green);
	font-weight: 700;
}

.gpf-option[aria-checked="true"]::after {
	content: "\2713";
	position: absolute;
	top: 8px;
	right: 8px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--gp-green);
	color: #fff;
	font-size: 0.7rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gpf-option__icon {
	font-size: 1.9rem;
	line-height: 1;
}

.gpf-option__label {
	font-size: 0.95rem;
}

/* ---------- Size step (height / width mini pill-groups) ---------- */

.gpf-size-group + .gpf-size-group {
	margin-top: 22px;
}

.gpf-size-group__label {
	font-weight: 700;
	margin: 0 0 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.gpf-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gpf-pill {
	appearance: none;
	background: #fff;
	border: 1.5px solid var(--gp-border);
	border-radius: 999px;
	padding: 9px 18px;
	font: inherit;
	font-size: 0.9rem;
	color: var(--gp-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gpf-pill:hover {
	border-color: var(--gp-green);
}

.gpf-pill:focus-visible {
	outline: 3px solid var(--gp-green);
	outline-offset: 2px;
}

.gpf-pill[aria-checked="true"] {
	background: var(--gp-green);
	border-color: var(--gp-green);
	color: #fff;
	font-weight: 600;
}

/* ---------- Colour swatches ---------- */

.gpf-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.gpf-swatch {
	appearance: none;
	background: none;
	border: none;
	font: inherit;
	color: var(--gp-muted);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	width: 76px;
}

.gpf-swatch__dot {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1.5px solid var(--gp-border);
	position: relative;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.gpf-swatch:hover .gpf-swatch__dot {
	transform: scale(1.06);
}

.gpf-swatch:focus-visible .gpf-swatch__dot {
	outline: 3px solid var(--gp-green);
	outline-offset: 2px;
}

.gpf-swatch[aria-checked="true"] .gpf-swatch__dot {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gp-green);
}

.gpf-swatch[aria-checked="true"] .gpf-swatch__dot::after {
	content: "\2713";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	font-size: 0.9rem;
}

.gpf-swatch[aria-checked="true"] {
	color: var(--gp-green);
	font-weight: 700;
}

.gpf-swatch--any .gpf-swatch__dot {
	background: conic-gradient(from 180deg, #d1382c, #f4c430, #4a7c3f, #4472c4, #7b4fa0, #d1382c);
}

/* ---------- Nav ---------- */

.gpf-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--gp-border);
}

.gpf-btn {
	appearance: none;
	border-radius: 999px;
	padding: 13px 26px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, opacity 0.12s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1.5px solid transparent;
}

.gpf-btn--primary {
	background: var(--gp-green);
	border-color: var(--gp-green);
	color: #fff;
}

.gpf-btn--primary:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(47, 82, 51, 0.28);
}

.gpf-btn--ghost {
	background: #fff;
	border-color: var(--gp-border);
	color: var(--gp-ink);
}

.gpf-btn--ghost:hover:not(:disabled) {
	border-color: var(--gp-muted);
}

.gpf-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.gpf-btn:focus-visible {
	outline: 3px solid var(--gp-green);
	outline-offset: 2px;
}

.gpf-spinner {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	animation: gpfSpin 0.7s linear infinite;
}

@keyframes gpfSpin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Results ---------- */

.gpf-results {
	margin-top: 32px;
	animation: gpfFadeSlide 0.35s ease both;
}

.gpf-results__header {
	text-align: center;
	margin-bottom: 20px;
}

.gpf-results__header h3 {
	font-size: clamp(1.3rem, 3.5vw, 1.7rem);
	margin: 0 0 4px;
}

.gpf-results__count {
	color: var(--gp-muted);
	margin: 0;
}

.gpf-summary {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 20px;
}

.gpf-chip {
	background: var(--gp-green-light);
	color: var(--gp-green);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 600;
}

.gpf-notice {
	background: var(--gpf-amber-light);
	color: var(--gpf-amber);
	border-radius: 12px;
	padding: 12px 16px;
	margin: 0 0 24px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.gpf-results__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

/* Fallback card styling used only if gp-public.css (Plant Library) isn't
   loaded on this page for some reason — kept minimal so the real
   stylesheet's rules win whenever it's present. */
.gp-plant-finder .gp-plant-card.gpf-card {
	display: block;
	border: 1px solid var(--gp-border);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gp-plant-finder .gp-plant-card.gpf-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--gpf-shadow);
}

.gp-plant-finder .gpf-badge--water {
	background: #eaf2fb;
	color: #2f5680;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 0.78rem;
	font-weight: 600;
}

.gpf-results__empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--gp-muted);
}

.gpf-results__empty-icon {
	font-size: 2.6rem;
	margin-bottom: 12px;
}

.gpf-results__empty h3 {
	color: var(--gp-ink);
	margin: 0 0 8px;
}

.gpf-results__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
	.gpf-quiz {
		padding: 18px;
		border-radius: 14px;
	}

	.gpf-options {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	}

	.gpf-option {
		padding: 16px 10px;
		min-height: 88px;
	}

	.gpf-nav {
		flex-direction: column-reverse;
	}

	.gpf-nav .gpf-btn {
		width: 100%;
		justify-content: center;
	}

	.gpf-results__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gp-plant-finder * {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
