/* Knowledge Catalog FAQ pages — small additions on top of main.css.
   The hub and question pages reuse the old FAQ page's .page-hero,
   .faq-main, .faq-section, .faq-item and .faq-contact styles; only the
   few classes below are new. */

/* Hub list: each question opens to show its full answer. */
details.faq-item {
	padding: 0;
	border: 1px solid #ecdde5;
	transition: border-color 0.2s;
}
details.faq-item:hover,
details.faq-item[open] {
	border-color: #d9b8ca;
}
details.faq-item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	cursor: pointer;
	list-style: none;
}
details.faq-item summary::-webkit-details-marker {
	display: none;
}
details.faq-item summary::after {
	content: "";
	flex: none;
	width: 0.625rem;
	height: 0.625rem;
	border-right: 2px solid var(--color-primary);
	border-bottom: 2px solid var(--color-primary);
	transform: rotate(45deg);
	transition: transform 0.2s;
}
details.faq-item[open] summary::after {
	transform: rotate(-135deg);
}
details.faq-item summary:focus-visible {
	outline: 3px solid rgba(196, 30, 122, 0.35);
	outline-offset: 2px;
	border-radius: 8px;
}
details.faq-item summary h3 {
	margin: 0;
}
.faq-a {
	padding: 0 1.25rem 1rem;
	max-width: 46rem;
}
.faq-a p + p {
	margin-top: 0.75rem;
}
.faq-a .faq-permalink {
	margin-top: 0.75rem;
	font-size: 0.9375rem;
}
.faq-a .faq-permalink a {
	font-weight: 600;
}
.faq-to-topics {
	margin: 0.5rem 0 0;
}
.faq-to-topics a {
	font-weight: 600;
}

/* Single-question page body. */
.faq-detail .faq-answer {
	max-width: 44rem;
	font-size: 1.0625rem;
	line-height: 1.7;
}
.faq-detail .faq-answer p {
	margin: 0 0 1rem;
}

/* "Last updated" line and the back link. */
.faq-updated {
	margin-top: 1.5rem;
	font-size: 0.9375rem;
	color: #6b6b6b;
}
.faq-back {
	margin-top: 0.75rem;
}
.faq-back a {
	font-weight: 600;
	text-decoration: none;
}
.faq-back a:hover,
.faq-back a:focus {
	text-decoration: underline;
}

/* Hub: topic menu and search beside the questions. */
.faq-layout [hidden] {
	display: none !important;
}
.faq-layout {
	display: grid;
	gap: 2rem;
}
.faq-nav {
	background: var(--color-light);
	border: 1px solid #e7d3de;
	border-radius: 12px;
	padding: 1rem;
	align-self: start;
}
.faq-search label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.375rem;
}
.faq-search input {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	font: inherit;
	font-size: 1rem;
	border: 1px solid #c9b3bf;
	border-radius: 8px;
	background: var(--color-white);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-search input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(196, 30, 122, 0.2);
}
.faq-nav-title {
	font-size: 1rem;
	margin: 1rem 0 0.5rem;
	color: var(--color-dark);
}
.faq-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.faq-nav-list a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 40px;
	padding: 0.25rem 0.75rem;
	border-radius: 8px;
	background: var(--color-white);
	border: 1px solid #e7d3de;
	color: var(--color-dark);
	font-size: 1rem;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.faq-nav-list a:hover,
.faq-nav-list a:focus-visible {
	border-color: var(--color-primary);
	color: var(--color-primary);
}
.faq-nav-list a:active {
	transform: translateY(1px);
}
.faq-nav-count {
	font-size: 0.875rem;
	color: var(--color-gray);
	font-variant-numeric: tabular-nums;
}
.faq-content .faq-section,
.faq-nav {
	scroll-margin-top: 90px;
}
.faq-no-match {
	font-size: 1.0625rem;
	padding: 1rem;
	border-left: 4px solid var(--color-primary);
	background: var(--color-light);
}

@media (min-width: 900px) {
	.faq-layout {
		grid-template-columns: minmax(220px, 1fr) 3fr;
	}
	.faq-nav {
		position: sticky;
		top: 90px;
		max-height: calc(100vh - 110px);
		overflow-y: auto;
	}
	.faq-nav-list {
		flex-direction: column;
		gap: 0.25rem;
	}
	.faq-nav-list a {
		display: flex;
		justify-content: space-between;
		border-color: transparent;
		background: transparent;
	}
	.faq-nav-list a:hover,
	.faq-nav-list a:focus-visible {
		background: var(--color-white);
	}
	.faq-to-topics {
		display: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
