/**
 * VBP FAQ widget.
 *
 * TEMPLATE FILE: compiled by Elementor into uploads/elementor/css/vbp-faq.css with the
 * ELEMENTOR_SCREEN_* placeholders replaced by the Site Settings breakpoints.
 * Do not use relative url()s here (icons are rendered as <img> from PHP).
 *
 * Figma: list 1153px wide, 40px apart; item radius 12, 24px padding, soft shadow.
 * Closed: #fbfbfb / border #ebebeb, dark chevron. Open: white / border #eaeaea, chevron turns up
 * in a #ffce78 circle; answer 12px under the question, 111px clear of the right edge.
 */

.vbp-faq {
	--vbp-faq-speed: 0.4s;

	font-family: var(--vbp-font);
}

.vbp-faq__list {
	display: flex;
	flex-direction: column;
	gap: 40px;
	max-width: 1153px;
	margin: 0 auto;
}

.vbp-faq__item {
	overflow: hidden;
	border: 1px solid #ebebeb;
	border-radius: 12px;
	background-color: #fbfbfb;
	box-shadow: 0 4px 28.9px rgba(0, 0, 0, 0.05);
	transition: background-color var(--vbp-faq-speed) ease, border-color var(--vbp-faq-speed) ease;
}

.vbp-faq__item.is-open {
	border-color: #eaeaea;
	background-color: #fff;
}

.vbp-faq .vbp-faq__heading {
	margin: 0;
	padding: 0;
	font: inherit;
}

/* Reset Hello Elementor's button styles (pink border/colour, hover fill). */
.vbp-faq .vbp-faq__toggle,
.vbp-faq .vbp-faq__toggle:hover,
.vbp-faq .vbp-faq__toggle:focus {
	box-sizing: border-box;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	margin: 0;
	padding: 23px 24px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.vbp-faq .vbp-faq__toggle:focus-visible {
	outline: 2px solid #c08e2f;
	outline-offset: -4px;
	border-radius: 12px;
}

.vbp-faq__question {
	color: #323232;
	font-family: var(--vbp-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 32px;
	text-transform: uppercase;
}

/* 40px circle; overlaps the bottom padding like in Figma so closed items stay 79px tall. */
.vbp-faq__icon {
	position: relative;
	flex: none;
	width: 40px;
	height: 40px;
	margin: -4px 0 -4px;
	border-radius: 50%;
	background-color: #fbfbfb;
	transition: background-color var(--vbp-faq-speed) ease, transform var(--vbp-faq-speed) ease;
}

.vbp-faq__item.is-open .vbp-faq__icon {
	background-color: #ffce78;
	transform: rotate(180deg);
}

.vbp-faq .vbp-faq__chevron {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 24px;
	max-width: none;
	height: 24px;
	transition: opacity var(--vbp-faq-speed) ease;
}

.vbp-faq .vbp-faq__chevron--open {
	opacity: 0;
}

.vbp-faq__item.is-open .vbp-faq__chevron--open {
	opacity: 1;
}

/* Smooth height: the panel's single grid row animates from 0fr to 1fr. */
.vbp-faq__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--vbp-faq-speed) ease;
}

.vbp-faq__item.is-open .vbp-faq__panel {
	grid-template-rows: 1fr;
}

.vbp-faq__panel-inner {
	min-height: 0;
	overflow: hidden;
	transition: margin-top var(--vbp-faq-speed) ease;
}

/* Pull the open answer up into the question's bottom padding: question → answer is 12px, as in Figma. */
.vbp-faq__item.is-open .vbp-faq__panel-inner {
	margin-top: -11px;
}

.vbp-faq__answer {
	padding: 0 111px 24px 24px;
	color: #383838;
	font-size: 20px;
	line-height: 28px;
	opacity: 0;
	transition: opacity var(--vbp-faq-speed) ease;
}

.vbp-faq__item.is-open .vbp-faq__answer {
	opacity: 1;
}

.vbp-faq__answer > :first-child {
	margin-top: 0;
}

.vbp-faq__answer > :last-child {
	margin-bottom: 0;
}

.vbp-faq__answer p {
	margin: 0 0 12px;
}

.vbp-faq__answer a {
	color: #c08e2f;
}

@media (prefers-reduced-motion: reduce) {
	.vbp-faq {
		--vbp-faq-speed: 0s;
	}
}

/* Tablet and below */
@media (max-width: 1024px) {
	.vbp-faq__list {
		gap: 24px;
	}

	.vbp-faq__question {
		font-size: 18px;
		line-height: 28px;
	}

	.vbp-faq__answer {
		padding-right: 64px;
		font-size: 18px;
		line-height: 26px;
	}
}

/* Mobile (Figma 393px): tight cards 7px apart, 18px uppercase questions, 61px chevron circle. */
@media (max-width: 767px) {
	.vbp-faq__list {
		gap: 7px;
	}

	.vbp-faq__item {
		border-width: 0.5px;
		border-radius: 3.46px;
		box-shadow: 0 1.15px 8.33px rgba(0, 0, 0, 0.05);
	}

	.vbp-faq .vbp-faq__toggle,
	.vbp-faq .vbp-faq__toggle:hover,
	.vbp-faq .vbp-faq__toggle:focus {
		align-items: center;
		gap: 8px;
		padding: 7px;
	}

	.vbp-faq__question {
		font-size: 18px;
		line-height: 23px;
	}

	.vbp-faq__icon {
		width: 61px;
		height: 61px;
		margin: 0;
	}

	.vbp-faq .vbp-faq__chevron {
		top: 12.2px;
		left: 12.2px;
		width: 36.65px;
		height: 36.65px;
	}

	.vbp-faq__item.is-open .vbp-faq__panel-inner {
		margin-top: 6px;
	}

	.vbp-faq__answer {
		padding: 0 7px 14px;
		font-size: 18px;
		line-height: 20px;
	}
}
