/**
 * Tank Free Home - FAQ page
 * Category jump nav and the question accordion.
 * Loaded alongside home.css, which supplies the shared page header and
 * section-head styles this template also relies on.
 */

/* ==========================================================================
   1. Category nav
   ========================================================================== */

.tfh-faq__nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--tfh-space-3);
	max-width: 820px;
	margin: 0 auto var(--tfh-space-10);
}

.tfh-faq__nav a {
	padding: var(--tfh-space-2) var(--tfh-space-5);
	border: 1px solid var(--tfh-grey-100);
	border-radius: var(--tfh-radius-pill);
	color: var(--tfh-ink);
	font-size: var(--tfh-fs-sm);
	font-weight: var(--tfh-fw-medium);
	transition: background-color var(--tfh-transition), border-color var(--tfh-transition), color var(--tfh-transition);
}

.tfh-faq__nav a:hover {
	border-color: var(--tfh-accent);
	color: var(--tfh-accent);
}

/* ==========================================================================
   2. Categories
   ========================================================================== */

.tfh-faq__categories {
	max-width: 820px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: var(--tfh-space-10);
}

.tfh-faq__category-title {
	margin-bottom: var(--tfh-space-5);
	padding-left: var(--tfh-space-3);
	border-left: 3px solid var(--tfh-accent);
	font-size: var(--tfh-fs-h4);
}

/* ==========================================================================
   3. Accordion
   ========================================================================== */

.tfh-faq__list {
	display: flex;
	flex-direction: column;
	gap: var(--tfh-space-4);
}

.tfh-faq__item {
	border-radius: var(--tfh-radius-lg);
	background: var(--tfh-grey-50);
	overflow: hidden;
}

.tfh-faq__item[open] {
	background: var(--tfh-white);
	box-shadow: var(--tfh-shadow-md);
}

.tfh-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tfh-space-4);
	padding: var(--tfh-space-5) var(--tfh-space-6);
	color: var(--tfh-ink);
	font-weight: var(--tfh-fw-semibold);
	cursor: pointer;
	list-style: none;
}

.tfh-faq__question::-webkit-details-marker {
	display: none;
}

.tfh-faq__item[open] .tfh-faq__question {
	color: var(--tfh-accent);
}

.tfh-faq__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--tfh-radius-circle);
	background: var(--tfh-accent-10);
	color: var(--tfh-accent);
	transition: transform var(--tfh-transition);
}

.tfh-faq__item[open] .tfh-faq__icon {
	transform: rotate(180deg);
}

.tfh-faq__answer {
	padding: 0 var(--tfh-space-6) var(--tfh-space-5);
}

.tfh-faq__answer p {
	margin: 0;
	color: var(--tfh-grey-500);
	line-height: var(--tfh-lh-body);
}
