/* FAQs page — [codingcafe_faq_archive]. Builds on faq-single.css (.ccfaq-*). */

.ccfaqs-lead {
	max-width: 640px;
	margin: 0 0 28px;
	font-size: clamp(16px, 1.5vw, 18px);
	line-height: 1.6;
	color: rgba(255, 255, 255, .85);
}

/* The hero must not clip the suggestions dropdown, so the big "?" moves into its own clipped layer. */
.ccfaqs .ccfaq-hero {
	z-index: 5;
	overflow: visible;
}

.ccfaqs .ccfaq-hero::after {
	content: none;
}

.ccfaqs-hero-art {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}

.ccfaqs-hero-art::after {
	content: "?";
	position: absolute;
	right: clamp(-10px, 3vw, 48px);
	bottom: -0.32em;
	font-size: clamp(180px, 26vw, 340px);
	font-weight: 900;
	line-height: 1;
	color: rgba(255, 255, 255, .06);
}

/* Search */
.ccfaqs-search {
	position: relative;
	max-width: 640px;
	margin: 0;
}

.ccfaqs-search .ccfaq-icon {
	position: absolute;
	top: 50%;
	left: 20px;
	color: var(--ccfaq-primary);
	transform: translateY(-50%);
	pointer-events: none;
}

.ccfaqs .ccfaqs-search input#ccfaqs-q {
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 0 20px 0 54px;
	border: 2px solid transparent;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45);
	font-family: inherit;
	font-size: 16px;
	color: var(--ccfaq-ink);
}

.ccfaqs .ccfaqs-search input#ccfaqs-q::placeholder {
	color: #8A7F92;
}

.ccfaqs .ccfaqs-search input#ccfaqs-q:focus {
	outline: none;
	border-color: #D3B4DF;
	background: #fff;
}

/* Suggestions dropdown */
.ccfaqs .ccfaqs-suggest {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	z-index: 20;
	max-height: 360px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	border: 1px solid var(--ccfaq-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 24px 50px -20px rgba(31, 22, 38, .45);
}

.ccfaqs-suggest[hidden] {
	display: none;
}

.ccfaqs .ccfaqs-suggest li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 10px 14px;
	border-radius: 10px;
	cursor: pointer;
}

.ccfaqs .ccfaqs-suggest li[aria-selected="true"],
.ccfaqs .ccfaqs-suggest li[role="option"]:hover {
	background: var(--ccfaq-soft);
}

.ccfaqs-suggest__q {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ccfaq-ink);
}

.ccfaqs-suggest__q mark {
	padding: 0;
	background: none;
	color: var(--ccfaq-primary);
}

.ccfaqs-suggest__topic {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ccfaq-text);
}

.ccfaqs .ccfaqs-suggest .ccfaqs-suggest__none {
	font-size: 14px;
	color: var(--ccfaq-text);
	cursor: default;
}

/* Topic chips */
.ccfaqs-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ccfaqs .ccfaqs-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 16px;
	border: 1px solid var(--ccfaq-line);
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ccfaq-ink);
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.ccfaqs .ccfaqs-chip span {
	font-size: 12px;
	font-weight: 600;
	color: var(--ccfaq-text);
}

.ccfaqs .ccfaqs-chip:hover,
.ccfaqs .ccfaqs-chip:focus-visible {
	border-color: rgba(91, 41, 105, .45);
	background: var(--ccfaq-soft);
	color: var(--ccfaq-ink);
}

.ccfaqs .ccfaqs-chip[aria-pressed="true"] {
	border-color: var(--ccfaq-primary);
	background: var(--ccfaq-primary);
	color: #fff;
}

.ccfaqs .ccfaqs-chip[aria-pressed="true"] span {
	color: rgba(255, 255, 255, .75);
}

.ccfaqs-status {
	margin: -16px 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--ccfaq-primary);
}

.ccfaqs-status:empty {
	display: none;
}

/* Groups */
.ccfaqs-group[hidden],
.ccfaqs .ccfaq-item[hidden] {
	display: none;
}

.ccfaqs-group {
	scroll-margin-top: 120px;
}

.ccfaqs-group__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 20px;
}

.ccfaqs .ccfaqs-q mark {
	padding: 0 2px;
	border-radius: 4px;
	background: #F1E3F6;
	color: inherit;
}

.ccfaqs-empty {
	padding: 28px 32px;
	border: 1px dashed var(--ccfaq-line);
	border-radius: var(--ccfaq-radius);
	text-align: center;
}

.ccfaqs-empty[hidden] {
	display: none;
}

.ccfaqs-empty p {
	margin: 0;
	font-size: 15px;
}

@media (max-width: 767px) {
	.ccfaqs .ccfaqs-search input#ccfaqs-q {
		height: 52px;
		font-size: 15px;
	}

	.ccfaqs-topics {
		flex-wrap: nowrap;
		margin-inline: -20px;
		padding: 0 20px 4px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.ccfaqs .ccfaqs-chip {
		flex: none;
	}
}

/* Dark theme */
html[data-theme=dark] .ccfaqs .ccfaqs-search input#ccfaqs-q,
html[data-theme=dark] .ccfaqs .ccfaqs-search input#ccfaqs-q:focus {
	border-color: rgba(211, 180, 223, .35);
	background: var(--cc-surface, #211A29);
	color: var(--cc-heading, #EEE8F3);
}

html[data-theme=dark] .ccfaqs .ccfaqs-search input#ccfaqs-q:focus {
	border-color: #D3B4DF;
}

html[data-theme=dark] .ccfaqs .ccfaqs-search .ccfaq-icon {
	color: #D3B4DF;
}

html[data-theme=dark] .ccfaqs .ccfaqs-suggest {
	background: var(--cc-surface, #211A29);
	box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .7);
}

html[data-theme=dark] .ccfaqs-suggest__q mark {
	color: #D3B4DF;
}

html[data-theme=dark] .ccfaqs .ccfaqs-chip {
	background: var(--cc-surface, #211A29);
}

html[data-theme=dark] .ccfaqs .ccfaqs-chip[aria-pressed="true"] {
	border-color: #D3B4DF;
	background: #D3B4DF;
	color: #17121D;
}

html[data-theme=dark] .ccfaqs .ccfaqs-chip[aria-pressed="true"] span {
	color: rgba(23, 18, 29, .7);
}

html[data-theme=dark] .ccfaqs .ccfaqs-q mark {
	background: rgba(211, 180, 223, .25);
}
