/* ============================================================
   Phytosanitary Certificate Finder
   Scoped under .phyto-cert-finder. Uses WikiPress CSS custom
   properties where available, with safe fallbacks so the tool
   also works if embedded outside the theme.
   ============================================================ */

.phyto-cert-finder {
	--pcf-primary: var(--wikipress-primary, #0645ad);
	--pcf-primary-hover: var(--wikipress-primary-hover, #043a7a);
	--pcf-text: var(--wikipress-text, #202122);
	--pcf-muted: var(--wikipress-text-light, #54595d);
	--pcf-border: var(--wikipress-border, #a2a9b1);
	--pcf-border-light: var(--wikipress-border-light, #eaecf0);
	--pcf-bg: var(--wikipress-bg, #ffffff);
	--pcf-bg-off: var(--wikipress-bg-off, #f8f9fa);
	--pcf-ui-font: var(--wikipress-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);

	font-family: var(--pcf-ui-font);
	color: var(--pcf-text);
	background: var(--pcf-bg);
	border: 1px solid var(--pcf-border);
	border-radius: 4px;
	padding: 1.25rem 1.25rem 1rem;
	margin: 1.5rem 0;
	max-width: 760px;
	line-height: 1.55;
}

.phyto-cert-finder * { box-sizing: border-box; }

.pcf-header { margin-bottom: 1rem; }

.pcf-title {
	font-size: 1.35rem;
	line-height: 1.2;
	margin: 0 0 .35rem;
	color: var(--pcf-text);
	font-family: var(--pcf-ui-font);
}

.pcf-intro {
	margin: 0;
	color: var(--pcf-muted);
	font-size: .95rem;
}

/* ---- Form ---- */
.pcf-form {
	display: grid;
	gap: 1rem;
	margin-bottom: .75rem;
}

@media (min-width: 560px) {
	.pcf-form { grid-template-columns: 1fr 1fr; }
	.pcf-refine { grid-column: 1 / -1; }
}

.pcf-field { display: flex; flex-direction: column; gap: .35rem; }

.pcf-label {
	font-weight: 600;
	font-size: .9rem;
	color: var(--pcf-text);
}

.pcf-select {
	width: 100%;
	padding: .55rem .6rem;
	font-size: 1rem;
	font-family: inherit;
	color: var(--pcf-text);
	background: var(--pcf-bg);
	border: 1px solid var(--pcf-border);
	border-radius: 3px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2354595d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .7rem center;
	padding-right: 2rem;
}

.pcf-select:focus {
	outline: 2px solid var(--pcf-primary);
	outline-offset: 1px;
	border-color: var(--pcf-primary);
}

.pcf-actions { margin: .25rem 0 1rem; }

.pcf-reset {
	background: none;
	border: 1px solid var(--pcf-border);
	color: var(--pcf-muted);
	font: inherit;
	font-size: .85rem;
	padding: .3rem .8rem;
	border-radius: 3px;
	cursor: pointer;
}
.pcf-reset:hover { background: var(--pcf-bg-off); color: var(--pcf-text); }

/* ---- Result ---- */
.pcf-result {
	border-top: 1px solid var(--pcf-border-light);
	padding-top: 1rem;
}

.pcf-prompt, .pcf-headline { margin: 0; }

.pcf-prompt {
	color: var(--pcf-muted);
	font-style: italic;
}

.pcf-headline {
	font-size: 1.05rem;
	font-weight: 600;
	margin-bottom: .75rem;
}

.pcf-badges {
	list-style: none;
	margin: 0 0 .5rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem .5rem;
}

.pcf-badges li {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	background: var(--pcf-bg-off);
	border: 1px solid var(--pcf-border-light);
	border-radius: 999px;
	padding: .2rem .6rem .2rem .7rem;
	font-size: .82rem;
}

.pcf-badge-label { color: var(--pcf-muted); }

.pcf-badge {
	font-weight: 700;
	font-size: .78rem;
	padding: .05rem .5rem;
	border-radius: 999px;
	white-space: nowrap;
	color: #fff;
}
.pcf-badge--red   { background: #b32424; }
.pcf-badge--amber { background: #ac6600; }
.pcf-badge--green { background: #14866d; }
.pcf-badge--blue  { background: var(--pcf-primary); }

.pcf-note-inline {
	font-size: .9rem;
	color: var(--pcf-muted);
	margin: .35rem 0 0;
}

.pcf-block { margin-top: 1rem; }

.pcf-block-title {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pcf-muted);
	margin: 0 0 .4rem;
}

.pcf-list { margin: 0; padding-left: 1.15rem; }
.pcf-list li { margin: .25rem 0; font-size: .95rem; }

.pcf-fineprint {
	font-size: .82rem;
	color: var(--pcf-muted);
	font-style: italic;
	margin: .4rem 0 0;
}

/* ---- Authority / official-source call-to-action ---- */
.pcf-authority {
	margin-top: 1.1rem;
	background: var(--pcf-bg-off);
	border: 1px solid var(--pcf-border-light);
	border-left: 4px solid var(--pcf-primary);
	border-radius: 3px;
	padding: .85rem 1rem 1rem;
}
.pcf-authority p { margin: 0 0 .5rem; font-size: .95rem; }

.pcf-cta {
	display: inline-block;
	margin-top: .5rem;
	background: var(--pcf-primary);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: .9rem;
	padding: .5rem .9rem;
	border-radius: 3px;
}
.pcf-cta:hover { background: var(--pcf-primary-hover); color: #fff; }

/* ---- Disclaimer (server-rendered, always visible) ---- */
.pcf-disclaimer {
	margin-top: 1.1rem;
	padding-top: .85rem;
	border-top: 1px solid var(--pcf-border-light);
	font-size: .85rem;
	color: var(--pcf-muted);
}
.pcf-disclaimer strong { color: var(--pcf-text); }

.pcf-verified {
	display: block;
	margin-top: .4rem;
	font-size: .8rem;
	font-style: italic;
}

/* JS-off notice */
.phyto-cert-finder noscript p {
	margin: 0;
	padding: .6rem .8rem;
	background: var(--pcf-bg-off);
	border: 1px solid var(--pcf-border-light);
	border-radius: 3px;
	font-size: .9rem;
}
