/* ==========================================================================
   FAQ widget — ported from pestcontrolgroupusa_core_old
   (components.css .faq__*). Classes are namespaced pcgu-faq(__*) to avoid
   collisions with other plugins/themes; rendered output otherwise matches
   the original exactly. Shares .section-head*, .js-reveal and the generic
   .card surface with other widgets — see shared.css, not duplicated here.

   The question trigger is a <button>, so the theme's reset.css
   "[type=button],[type=submit],button {...}" rule (border, padding,
   border-radius, centered text, and a colored hover background) fights a
   bare ".pcgu-faq__question" selector at the same (0,1,0) specificity —
   same gotcha as Header/Process. Fixed here by prefixing with the widget
   wrapper class and explicitly neutralizing the hover/focus background.

   The answer text is a <p>; the theme's reset.css also gives every <p> a
   default 0.9rem bottom margin (the old static site's own reset zeroed
   this out, this WordPress theme's reset does not) — zeroed explicitly on
   .pcgu-faq__answer below so it doesn't add unintended extra spacing
   inside the collapsed/expanded answer panel. ---- */

.pcgu-faq__list {
	margin-top: 2.5rem;
	overflow: hidden;
}
.pcgu-faq__item + .pcgu-faq__item {
	border-top: 1px solid var(--border);
}

.pcgu-faq .pcgu-faq__question {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	text-align: left;
	border: none;
	border-radius: 0;
	background-color: transparent;
	/* white-space:nowrap is also part of the theme's button reset and is
	   inherited by the question span below — without this, long questions
	   overflow past the card edge on narrow screens instead of wrapping. */
	white-space: normal;
	cursor: pointer;
}
.pcgu-faq .pcgu-faq__question:hover,
.pcgu-faq .pcgu-faq__question:focus {
	background-color: transparent;
	color: inherit;
}
.pcgu-faq__question span {
	/* Flex children default to min-width:auto (their unwrapped content
	   width), which lets long questions overflow past the card edge
	   instead of wrapping on narrow screens. */
	min-width: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--foreground);
}
.pcgu-faq__chevron {
	flex-shrink: 0;
	font-size: 0.875rem;
	color: var(--secondary);
	transition: transform 300ms;
}
.pcgu-faq .pcgu-faq__question[aria-expanded="true"] .pcgu-faq__chevron {
	transform: rotate(180deg);
}

.pcgu-faq__answer-wrap {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 300ms, opacity 300ms;
}
.pcgu-faq__answer-wrap.is-open {
	grid-template-rows: 1fr;
	opacity: 1;
}
.pcgu-faq__answer-inner {
	overflow: hidden;
}
.pcgu-faq__answer {
	margin: 0;
	padding: 0 1.5rem 1.25rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted-foreground);
}
