/* Crushjs FAQ Accordion */
.cjfaq {
	--cjfaq-accent: #2563eb;
	--cjfaq-border: rgba(127, 127, 127, 0.25);
	--cjfaq-bg: rgba(127, 127, 127, 0.06);
	--cjfaq-radius: 8px;
	margin: 1.5em 0;
}

.cjfaq-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cjfaq__search {
	margin-bottom: 1em;
}

.cjfaq__search-input {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75em 1em;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--cjfaq-border);
	border-radius: var(--cjfaq-radius);
}

.cjfaq__search-input:focus {
	outline: 2px solid var(--cjfaq-accent);
	outline-offset: 1px;
	border-color: transparent;
}

.cjfaq__question {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.05em;
	line-height: 1.4;
}

.cjfaq__toggle {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	width: 100%;
	padding: 1em 1.25em;
	font: inherit;
	font-weight: 600;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.cjfaq__toggle:hover,
.cjfaq__item.is-open .cjfaq__toggle {
	color: var(--cjfaq-accent);
}

.cjfaq__toggle:focus-visible {
	outline: 2px solid var(--cjfaq-accent);
	outline-offset: -2px;
	border-radius: var(--cjfaq-radius);
}

.cjfaq__answer-inner {
	padding: 0 1.25em 1.1em;
}

.cjfaq__answer-inner > :first-child { margin-top: 0; }
.cjfaq__answer-inner > :last-child { margin-bottom: 0; }

.cjfaq__empty {
	padding: 1em 1.25em;
	opacity: 0.7;
}

/* Icons */
.cjfaq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.cjfaq--icon-plus .cjfaq__icon::before,
.cjfaq--icon-plus .cjfaq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	margin-top: -1px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s ease;
}

.cjfaq--icon-plus .cjfaq__icon::after { transform: rotate(90deg); }
.cjfaq--icon-plus .is-open .cjfaq__icon::after { transform: rotate(0); }

.cjfaq--icon-chevron .cjfaq__icon::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 3px;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.cjfaq--icon-chevron .is-open .cjfaq__icon { transform: rotate(180deg); }

/* Style: boxed */
.cjfaq--boxed .cjfaq__item {
	margin-bottom: 0.6em;
	background: var(--cjfaq-bg);
	border-radius: var(--cjfaq-radius);
}

/* Style: bordered */
.cjfaq--bordered .cjfaq__item {
	border: 1px solid var(--cjfaq-border);
	border-bottom-width: 0;
}

.cjfaq--bordered .cjfaq__item:first-of-type { border-radius: var(--cjfaq-radius) var(--cjfaq-radius) 0 0; }
.cjfaq--bordered .cjfaq__item:last-of-type {
	border-bottom-width: 1px;
	border-radius: 0 0 var(--cjfaq-radius) var(--cjfaq-radius);
}

.cjfaq--bordered .cjfaq__item.is-open { border-left: 3px solid var(--cjfaq-accent); }

/* Style: minimal */
.cjfaq--minimal .cjfaq__item { border-bottom: 1px solid var(--cjfaq-border); }
.cjfaq--minimal .cjfaq__toggle { padding-left: 0; padding-right: 0; }
.cjfaq--minimal .cjfaq__answer-inner { padding-left: 0; padding-right: 0; }

.cjfaq__item[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
	.cjfaq__icon,
	.cjfaq__icon::before,
	.cjfaq__icon::after { transition: none; }
}

/* Style: card */
.cjfaq--card .cjfaq__item {
	margin-bottom: 0.9em;
	background: #fff;
	color: #1f2937;
	border-radius: var(--cjfaq-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.07);
	transition: box-shadow 0.2s ease;
}

.cjfaq--card .cjfaq__item.is-open {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Style: numbered */
.cjfaq--numbered {
	counter-reset: cjfaq;
}

.cjfaq--numbered .cjfaq__item {
	counter-increment: cjfaq;
	border-bottom: 1px solid var(--cjfaq-border);
}

.cjfaq--numbered .cjfaq__question-text {
	display: flex;
	align-items: baseline;
	gap: 0.75em;
}

.cjfaq--numbered .cjfaq__question-text::before {
	content: counter(cjfaq, decimal-leading-zero);
	flex: 0 0 auto;
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
	color: var(--cjfaq-accent);
}

.cjfaq--numbered .cjfaq__answer-inner,
.cjfaq--numbered .cjfaq__vote {
	padding-left: 3.3em;
}

/* Style: pill */
.cjfaq--pill .cjfaq__item {
	margin-bottom: 0.6em;
}

.cjfaq--pill .cjfaq__toggle {
	background: var(--cjfaq-bg);
	border-radius: 999px;
}

.cjfaq--pill .cjfaq__item.is-open .cjfaq__toggle {
	color: #fff;
	background: var(--cjfaq-accent);
}

.cjfaq--pill .cjfaq__answer-inner {
	padding-top: 1em;
}

/* Style: accent bar */
.cjfaq--accent .cjfaq__item {
	margin-bottom: 0.6em;
	border-left: 4px solid var(--cjfaq-border);
	transition: border-color 0.2s ease;
}

.cjfaq--accent .cjfaq__item.is-open,
.cjfaq--accent .cjfaq__item:hover {
	border-left-color: var(--cjfaq-accent);
}

/* Helpful voting */
.cjfaq__vote {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	padding: 0 1.25em 1.1em;
	font-size: 0.875em;
	opacity: 0.85;
}

.cjfaq--minimal .cjfaq__vote { padding-left: 0; padding-right: 0; }

.cjfaq__vote-btn {
	padding: 0.3em 0.9em;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--cjfaq-border);
	border-radius: 999px;
	cursor: pointer;
}

.cjfaq__vote-btn:hover:not(:disabled),
.cjfaq__vote-btn:focus-visible {
	color: var(--cjfaq-accent);
	border-color: var(--cjfaq-accent);
}

.cjfaq__vote-btn:disabled { cursor: default; opacity: 0.5; }

.cjfaq__vote-btn.is-selected {
	opacity: 1;
	color: #fff;
	background: var(--cjfaq-accent);
	border-color: var(--cjfaq-accent);
}
