/*! FAQ widget (v1.0.2) */

.avd-faq {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.avd-faq__groups {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.avd-faq__list {
	display: flex;
	flex-direction: column;
}

.avd-faq__item {
	border-bottom: 1px solid var(--sc-border);
}

.avd-faq__group .avd-faq__item:last-child {
	border-bottom: 0;
}

.avd-faq__h {
	margin: 0;
	font: inherit;
}

.avd-faq__q {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 24px 0;
	border: 0;
	background: transparent;
	color: var(--sc-heading);
	font-family: inherit;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.4;
	word-spacing: inherit;
	text-align: left;
	cursor: pointer;
	transition: color 0.2s ease;
}

.avd-faq__q:hover {
	color: var(--sc-accent);
}

.avd-faq__chev {
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--sc-accent);
	border-radius: 50%;
	color: var(--sc-accent);
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* Open question: filled royal blue circle, white chevron. */
.avd-faq__q[aria-expanded="true"] .avd-faq__chev {
	border-color: var(--avd-blue);
	background-color: var(--avd-blue);
	color: #FFFFFF;
	transform: rotate(180deg);
}

.avd-faq__a {
	padding: 0 56px 26px 0;
	font-size: 17px;
	line-height: 1.65;
	color: var(--sc-text);
	animation: avd-rise 0.3s ease both;
}

.avd-faq__a p {
	margin: 0 0 0.9em;
}

.avd-faq__a p:last-child {
	margin-bottom: 0;
}

.avd-faq__a a {
	font-weight: 600;
	color: var(--sc-accent);
}

.avd-faq__a ul,
.avd-faq__a ol {
	margin: 0 0 0.9em;
	padding-left: 1.3em;
}

/* Grouped by topic */
.avd-faq__group {
	padding: 12px clamp(20px, 3vw, 36px) 8px;
	border: 1px solid var(--sc-border);
	border-radius: var(--avd-radius-card);
	background: var(--sc-card);
	scroll-margin-top: calc(var(--faq-top, 0px) + 96px);
	animation: avd-rise 0.35s ease both;
}

.avd-faq__group[hidden] {
	display: none;
}

.avd-faq__ghead {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px 0 14px;
	border-bottom: 1px solid var(--sc-border);
}

.avd-faq__gicon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--avd-black);
	color: var(--avd-cyan);
}

.avd-faq__gtitle {
	flex: 1;
	margin: 0;
	font-family: var(--avd-font-body);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--sc-heading);
}

.avd-faq__gcount {
	font-size: 14px;
	color: var(--sc-muted);
}

/* Topic bar */
.avd-faq__bar {
	margin-inline: calc(50% - 50vw);
	padding-inline: calc(50vw - 50%);
	border-bottom: 1px solid var(--avd-border);
	background: #FFFFFF;
	box-shadow: 0 10px 30px rgba(10, 10, 10, 0.05);
}

.avd-faq__bar.is-sticky {
	position: sticky;
	top: calc(var(--faq-top, 0px) + var(--wp-admin--admin-bar--height, 0px));
	z-index: 20;
}

.avd-faq__track {
	max-width: var(--avd-container);
	margin: 0 auto;
	display: flex;
	overflow-x: auto;
	scrollbar-width: none;
}

.avd-faq__track::-webkit-scrollbar {
	display: none;
}

.avd-faq__cat {
	position: relative;
	flex: 1 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 68px;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: var(--avd-text-muted);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	word-spacing: inherit;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease;
}

.avd-faq__cat:hover {
	color: var(--avd-text);
}

.avd-faq__cat::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--avd-blue);
	transform: scaleX(0);
	transition: transform 0.25s ease;
}

.avd-faq__cat:hover::after {
	transform: scaleX(0.35);
}

.avd-faq__cat[aria-pressed="true"] {
	color: var(--avd-text);
	font-weight: 600;
}

.avd-faq__cat[aria-pressed="true"]::after {
	transform: scaleX(1);
}

.avd-faq__count {
	min-width: 24px;
	height: 22px;
	padding: 0 7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #EEF1F5;
	font-size: 12px;
	font-weight: 600;
	color: var(--avd-text-muted);
}

.avd-faq__cat[aria-pressed="true"] .avd-faq__count {
	background: var(--avd-blue);
	color: #FFFFFF;
}

.avd-faq__more {
	align-self: center;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 600;
	color: var(--sc-accent);
	text-decoration: none;
}

.avd-faq__more:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 767px) {
	.avd-faq__q {
		font-size: 17px;
		padding: 20px 0;
	}

	.avd-faq__a {
		padding-right: 0;
		font-size: 16px;
	}

	.avd-faq__gtitle {
		font-size: 21px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.avd-faq__a,
	.avd-faq__group {
		animation: none;
	}
}
