@charset "UTF-8";
/*
 * Athena XAI: FAQ page (patterns/faq-*.php, inc/faq.php, assets/js/faq.js).
 * Loaded on pages with FAQ questions and in the editor.
 *
 * Without JavaScript the search UI is hidden and every question shows in one
 * column. With it (.has-js, set before first paint) the search and topics sit in a
 * sticky column on wide screens and above the questions on narrow ones.
 */

.athena-faq__body > *,
.athena-faq__topic > *,
.athena-faq__tools > *,
.athena-faq-contact__card > *,
.athena-faq-contact__text > * {
	margin-block: 0 !important;
}

/* ── Layout ───────────────────────────────────────────────────── */

.athena-faq__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
}

.athena-faq__tools,
.athena-faq__empty[hidden] {
	display: none;
}

.has-js .athena-faq__tools {
	display: grid;
	gap: 1.25rem;
	align-content: start;
}

@media (min-width: 1024px) {
	/* No row gap: the sticky column spans spare rows, and each would add one. Topics space themselves. */
	.has-js .athena-faq__body {
		grid-template-columns: 17.5rem minmax(0, 1fr);
		gap: 0 clamp(2.5rem, 5vw, 5rem);
		align-items: start;
	}

	.has-js .athena-faq__empty:not([hidden]) + .athena-faq__topic {
		margin-top: var(--wp--preset--spacing--40) !important;
	}

	.has-js .athena-faq__tools {
		position: sticky;
		top: 6rem;
		grid-row: 1 / span 20;
	}

	.has-js .athena-faq__body > :not(.athena-faq__tools) {
		grid-column: 2;
	}

	/* Questions read best at a measured width. */
	.athena-faq__topic,
	.athena-faq__empty {
		max-width: 52rem;
	}
}

/* ── Search ───────────────────────────────────────────────────── */

.athena-faq__search {
	display: grid;
	gap: 0.5rem;
}

.athena-faq__label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 650;
}

.athena-faq__field {
	position: relative;
}

.athena-faq__icon {
	position: absolute;
	top: 50%;
	left: 0.9rem;
	color: var(--wp--preset--color--muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.athena-faq__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 3rem;
	margin: 0;
	padding: 0.6rem 0.9rem 0.6rem 2.75rem;
	border: 1px solid var(--athena-border-strong);
	border-radius: 12px;
	background: var(--wp--preset--color--raised);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
}

.athena-faq__input::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

.athena-faq__input:focus-visible {
	border-color: var(--wp--preset--color--accent);
	border-radius: 12px;
	outline-offset: 2px;
}

/* One line, always: the count changes, the layout does not. */
.athena-faq__status {
	min-height: 1.5em;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
}

/* ── Topic chips ──────────────────────────────────────────────── */

/* Narrow screens: one row that scrolls sideways; the cut-off chip shows there is more. */
.athena-faq__chips {
	display: flex;
	gap: 0.5rem;
	margin-inline: -0.25rem !important;
	padding: 0.25rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.athena-faq__chips::-webkit-scrollbar {
	display: none;
}

.athena-faq__chip {
	flex: none;
}

.athena-faq__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	/* The site's 44 px touch target. */
	min-height: 2.75rem;
	margin: 0;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--athena-border-strong);
	border-radius: 999px;
	background: var(--wp--preset--color--raised);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Hover devices only: on touch, :hover sticks to the last tapped topic. */
@media (hover: hover) {
	.athena-faq__chip:hover {
		border-color: var(--wp--preset--color--accent);
	}
}

.athena-faq__chip-count {
	color: var(--wp--preset--color--muted);
	font-variant-numeric: tabular-nums;
	font-weight: 500;
}

.athena-faq__chip[aria-pressed="true"] {
	border-color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.athena-faq__chip[aria-pressed="true"] .athena-faq__chip-count {
	color: inherit;
}

.athena-faq__chip.is-empty:not([aria-pressed="true"]) .athena-faq__chip-label {
	color: var(--wp--preset--color--muted);
}

/* Wide screens: the topics become a vertical list in the sticky column. */
@media (min-width: 1024px) {
	.athena-faq__chips {
		flex-direction: column;
		gap: 0.25rem;
		margin-inline: 0 !important;
		padding: 0;
		overflow: visible;
	}

	.athena-faq__chip {
		justify-content: space-between;
		width: 100%;
		border-color: transparent;
		border-radius: 10px;
		background: transparent;
		font-size: var(--wp--preset--font-size--small);
	}

	.athena-faq__chip:hover {
		border-color: var(--wp--preset--color--border);
		background: var(--wp--preset--color--surface);
	}

	.athena-faq__chip[aria-pressed="true"],
	.athena-faq__chip[aria-pressed="true"]:hover {
		border-color: var(--wp--preset--color--contrast);
		background: var(--wp--preset--color--contrast);
	}
}

/* ── Topics and questions ─────────────────────────────────────── */

.athena-faq__topic[hidden] {
	display: none;
}

.athena-faq__topic + .athena-faq__topic {
	margin-top: var(--wp--preset--spacing--40) !important;
}

.athena-faq__topic-title {
	margin-bottom: 0.75rem !important;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.25;
	scroll-margin-top: 6rem;
}

.athena-faq__item {
	border-bottom: 1px solid var(--wp--preset--color--border);
	scroll-margin-top: 6rem;
}

.athena-faq__item[hidden] {
	display: none;
}

.athena-faq__topic-title + .athena-faq__item {
	border-top: 1px solid var(--wp--preset--color--border);
}

.athena-faq__item > summary {
	position: relative;
	display: block;
	padding: 1.1rem 2.75rem 1.1rem 0;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 650;
	line-height: 1.45;
	list-style: none;
	cursor: pointer;
}

.athena-faq__item > summary::-webkit-details-marker {
	display: none;
}

/* Chevron: a bordered square turned 45°, pointing down; up when open. */
.athena-faq__item > summary::after {
	content: "";
	position: absolute;
	top: 1.55rem;
	right: 0.75rem;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.athena-faq__item[open] > summary::after {
	top: 1.8rem;
	transform: rotate(225deg);
}

.athena-faq__item > summary:hover {
	color: var(--wp--preset--color--accent);
}

.athena-faq__item > summary:focus-visible {
	outline-offset: 2px;
	border-radius: 6px;
}

.athena-faq__item > :not(summary) {
	max-width: 46rem;
	margin: 0 0 1.25rem;
	color: var(--wp--preset--color--muted);
	line-height: 1.65;
}

/* Space under an open answer, as padding on the item: core's flow layout zeroes
   the last child's bottom margin (".is-layout-flow > :last-child"), so a margin
   there never reaches the divider. Matches the summary's 1.1rem above the answer;
   closed rows keep their height. */
.athena-faq__item[open] {
	padding-bottom: 1.1rem;
}

.athena-faq__item[open] > :last-child:not(summary) {
	margin-bottom: 0;
}

.athena-faq__item a {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.athena-faq__mark {
	padding: 0 0.05em;
	border-radius: 3px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 24%, transparent);
	/* Full contrast on the tint, also inside links (accent on the tint is below 4.5:1). */
	color: var(--wp--preset--color--contrast);
}

@media (prefers-reduced-motion: no-preference) {
	.athena-faq__item > summary::after {
		transition: transform 0.2s var(--athena-ease), top 0.2s var(--athena-ease);
	}

	.athena-faq__item[open] > :not(summary) {
		animation: athena-faq-open 0.22s var(--athena-ease);
	}
}

@keyframes athena-faq-open {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
}

/* ── Empty state ──────────────────────────────────────────────── */

.athena-faq__empty {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border: 1px dashed var(--athena-border-strong);
	border-radius: 16px;
	text-align: center;
}

.athena-faq__empty p {
	margin: 0;
}

.athena-faq__empty-title {
	margin-bottom: 0.5rem !important;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 650;
}

.athena-faq__empty a {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/* ── Still have a question? ───────────────────────────────────── */

.athena-faq-contact__card {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.5rem;
	align-items: center;
	justify-content: space-between;
	padding: clamp(1.5rem, 4vw, 2.75rem);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 24px;
	background: var(--wp--preset--color--surface);
}

.athena-faq-contact__text {
	flex: 1 1 22rem;
}

.athena-faq-contact__text h2 {
	margin-bottom: 0.5rem !important;
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

.athena-faq-contact__text p {
	color: var(--wp--preset--color--muted);
}

/* ── Editor: every question visible and labelled while editing ── */

.editor-styles-wrapper .athena-faq__item > summary {
	cursor: text;
}
