/**
 * BC FAQ Manager – front-end styles.
 * Everything is driven by CSS variables so Elementor can override per section.
 */

.bc-faq {
	--bcfaq-accent: #7c3aed;
	--bcfaq-radius: 12px;
	--bcfaq-item-gap: 16px;
	--bcfaq-sidebar-w: 280px;

	--bcfaq-q-from: #7c3aed;
	--bcfaq-q-to: #2a0f5c;
	--bcfaq-q-from-active: #7c3aed;
	--bcfaq-q-to-active: #0b0718;
	--bcfaq-q-color: #ffffff;
	--bcfaq-q-color-active: #ffffff;

	--bcfaq-panel-bg: #ffffff;
	--bcfaq-panel-color: #1c2230;

	--bcfaq-card-bg: #ffffff;
	--bcfaq-card-radius: 20px;
	--bcfaq-card-pad: 16px;

	--bcfaq-cat-bg: #ffffff;
	--bcfaq-cat-color: #131824;
	--bcfaq-cat-bg-active: #7c3aed;
	--bcfaq-cat-color-active: #ffffff;
	--bcfaq-cat-radius: 14px;
	--bcfaq-cat-gap: 14px;

	--bcfaq-search-bg: #ffffff;
	--bcfaq-search-color: #131824;
	--bcfaq-search-border: rgba(124, 58, 237, 0.35);

	box-sizing: border-box;
	width: 100%;
}

.bc-faq *,
.bc-faq *::before,
.bc-faq *::after {
	box-sizing: border-box;
}

/* ---------- Heading ---------- */

.bc-faq__heading {
	margin: 0 0 24px;
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.15;
	font-weight: 800;
}

.bc-faq--dark .bc-faq__heading {
	color: #ffffff;
}

/* ---------- Search ---------- */

.bc-faq__search {
	position: relative;
	margin: 0 0 22px;
}

.bc-faq__search-input {
	width: 100%;
	padding: 15px 46px 15px 48px;
	border: 1px solid var(--bcfaq-search-border);
	border-radius: 999px;
	background: var(--bcfaq-search-bg);
	color: var(--bcfaq-search-color);
	font-size: 16px;
	line-height: 1.4;
	box-shadow: 0 2px 14px rgba(10, 6, 24, 0.18);
	-webkit-appearance: none;
	appearance: none;
}

.bc-faq__search-input:focus {
	outline: 2px solid var(--bcfaq-accent);
	outline-offset: 2px;
}

.bc-faq__search-input::-webkit-search-cancel-button {
	display: none;
}

.bc-faq__search-icon {
	position: absolute;
	top: 50%;
	left: 18px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	fill: none;
	stroke: var(--bcfaq-accent);
	stroke-width: 2;
	stroke-linecap: round;
	pointer-events: none;
}

.bc-faq__search-clear {
	position: absolute;
	top: 50%;
	right: 14px;
	width: 28px;
	height: 28px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: rgba(19, 24, 36, 0.08);
	color: #131824;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.bc-faq__search-clear:hover {
	background: rgba(19, 24, 36, 0.16);
}

/* ---------- Layout ---------- */

.bc-faq__body {
	display: grid;
	gap: 22px;
	align-items: start;
}

.bc-faq--sidebar .bc-faq__body {
	grid-template-columns: var(--bcfaq-sidebar-w) minmax(0, 1fr);
}

.bc-faq--tabs .bc-faq__body,
.bc-faq--list .bc-faq__body,
.bc-faq--solo .bc-faq__body {
	grid-template-columns: minmax(0, 1fr);
}

/* ---------- Category buttons ---------- */

.bc-faq__cats {
	display: flex;
	flex-direction: column;
	gap: var(--bcfaq-cat-gap);
}

.bc-faq--tabs .bc-faq__cats {
	flex-direction: row;
	flex-wrap: wrap;
}

.bc-faq__cat {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 22px 18px;
	border: 0;
	border-radius: var(--bcfaq-cat-radius);
	background: var(--bcfaq-cat-bg);
	color: var(--bcfaq-cat-color);
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.bc-faq--tabs .bc-faq__cat {
	width: auto;
	padding: 13px 24px;
	font-size: 15px;
}

.bc-faq__cat:hover {
	transform: translateY(-1px);
}

.bc-faq__cat:focus-visible {
	outline: 2px solid var(--bcfaq-accent);
	outline-offset: 3px;
}

.bc-faq__cat.is-active {
	background: var(--bcfaq-cat-bg-active);
	color: var(--bcfaq-cat-color-active);
}

.bc-faq__count {
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(19, 24, 36, 0.1);
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
}

.bc-faq__cat.is-active .bc-faq__count {
	background: rgba(255, 255, 255, 0.22);
}

.bc-faq__cat.is-empty {
	display: none;
}

/* ---------- List card ---------- */

.bc-faq__main {
	min-width: 0;
	padding: var(--bcfaq-card-pad);
	border-radius: var(--bcfaq-card-radius);
	background: var(--bcfaq-card-bg);
}

.bc-faq--flat .bc-faq__main {
	padding: 0;
	background: transparent;
}

.bc-faq__list {
	display: flex;
	flex-direction: column;
	gap: var(--bcfaq-item-gap);
}

/* ---------- Item ---------- */

.bc-faq__item.is-hidden {
	display: none;
}

.bc-faq__q {
	margin: 0;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
}

.bc-faq__q-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	width: 100%;
	margin: 0;
	padding: 22px 26px;
	border: 0;
	border-radius: var(--bcfaq-radius);
	background: linear-gradient(90deg, var(--bcfaq-q-from) 0%, var(--bcfaq-q-to) 100%);
	color: var(--bcfaq-q-color);
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: filter 0.25s ease, background 0.25s ease;
}

.bc-faq__q-btn:hover {
	filter: brightness(1.12);
}

.bc-faq__q-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: -4px;
}

.bc-faq__item.is-open .bc-faq__q-btn {
	background: linear-gradient(90deg, var(--bcfaq-q-from-active) 0%, var(--bcfaq-q-to-active) 100%);
	color: var(--bcfaq-q-color-active);
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.bc-faq__q-text {
	flex: 1 1 auto;
	min-width: 0;
}

/* Plus / minus */

.bc-faq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
}

.bc-faq__icon::before,
.bc-faq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: currentColor;
	border-radius: 2px;
	transform: translate(-50%, -50%);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.bc-faq__icon::before {
	width: 20px;
	height: 2px;
}

.bc-faq__icon::after {
	width: 2px;
	height: 20px;
}

.bc-faq__item.is-open .bc-faq__icon::after {
	opacity: 0;
	transform: translate(-50%, -50%) rotate(90deg);
}

/* ---------- Answer ---------- */

.bc-faq__a {
	display: grid;
	grid-template-rows: 0fr;
	background: var(--bcfaq-panel-bg);
	border-radius: 0 0 var(--bcfaq-radius) var(--bcfaq-radius);
	opacity: 0;
	transition: grid-template-rows 0.35s ease, opacity 0.3s ease;
}

.bc-faq__item.is-open .bc-faq__a {
	grid-template-rows: 1fr;
	opacity: 1;
}

.bc-faq__a-inner {
	min-height: 0;
	overflow: hidden;
}

.bc-faq__a-pad {
	padding: 26px 26px 24px;
	color: var(--bcfaq-panel-color);
}

.bc-faq__content {
	color: var(--bcfaq-panel-color);
	font-size: 16px;
	line-height: 1.7;
	word-wrap: break-word;
}

.bc-faq__content > *:first-child {
	margin-top: 0;
}

.bc-faq__content > *:last-child {
	margin-bottom: 0;
}

.bc-faq__content a {
	color: var(--bcfaq-accent);
	text-decoration: underline;
}

.bc-faq__content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.bc-faq__content ol,
.bc-faq__content ul {
	padding-left: 22px;
}

.bc-faq__content li + li {
	margin-top: 6px;
}

.bc-faq__content iframe,
.bc-faq__content video {
	max-width: 100%;
}

/* ---------- Tools ---------- */

.bc-faq__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid rgba(19, 24, 36, 0.1);
}

.bc-faq__tool {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border: 1px solid rgba(124, 58, 237, 0.3);
	border-radius: 999px;
	background: rgba(124, 58, 237, 0.07);
	color: var(--bcfaq-accent);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.bc-faq__tool:hover,
.bc-faq__tool:focus {
	background: var(--bcfaq-accent);
	color: #ffffff;
	text-decoration: none;
}

.bc-faq__tool svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bc-faq__tool.is-copied {
	background: #16a34a;
	border-color: #16a34a;
	color: #ffffff;
}

/* ---------- Empty state ---------- */

.bc-faq__empty {
	margin: 0;
	padding: 40px 24px;
	color: var(--bcfaq-panel-color);
	font-size: 16px;
	text-align: center;
	opacity: 0.75;
}

.bc-faq--flat .bc-faq__empty {
	color: inherit;
}

/* ---------- Search highlight ---------- */

.bc-faq__q-text mark {
	padding: 0 2px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.28);
	color: inherit;
}

/* ---------- Deep-link flash ---------- */

.bc-faq__item.is-targeted .bc-faq__q-btn {
	animation: bcfaq-pulse 1.4s ease 1;
}

@keyframes bcfaq-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
	}
	35% {
		box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.45);
	}
}

/* ---------- Single FAQ page ---------- */

.bc-faq--single-page {
	max-width: 900px;
	margin-inline: auto;
}

.bc-faq__single-card {
	padding: 30px;
	border-radius: var(--bcfaq-card-radius);
	background: var(--bcfaq-panel-bg);
	color: var(--bcfaq-panel-color);
	box-shadow: 0 18px 50px rgba(9, 5, 24, 0.16);
}

.bc-faq__single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(19, 24, 36, 0.1);
}

.bc-faq__badges {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bc-faq__badge {
	padding: 5px 12px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--bcfaq-q-from), var(--bcfaq-q-to));
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.bc-faq__single-body {
	font-size: 17px;
}

.bc-faq__single-foot {
	margin-top: 26px;
	padding-top: 18px;
	border-top: 1px solid rgba(19, 24, 36, 0.1);
}

.bc-faq__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--bcfaq-accent);
	font-weight: 600;
	text-decoration: none;
}

.bc-faq__back svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bc-faq__back:hover {
	text-decoration: underline;
}

.bc-faq__related {
	margin-top: 28px;
	padding: 24px 28px;
	border-radius: var(--bcfaq-card-radius);
	background: rgba(124, 58, 237, 0.08);
}

.bc-faq--dark .bc-faq__related {
	background: rgba(255, 255, 255, 0.05);
}

.bc-faq__related-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
}

.bc-faq--dark .bc-faq__related-title {
	color: #ffffff;
}

.bc-faq__related-list {
	margin: 0;
	padding-left: 20px;
}

.bc-faq__related-list li + li {
	margin-top: 8px;
}

.bc-faq__related-list a {
	color: var(--bcfaq-accent);
	text-decoration: none;
}

.bc-faq--dark .bc-faq__related-list a {
	color: #c4b5fd;
}

.bc-faq__related-list a:hover {
	text-decoration: underline;
}

/* ---------- Editor notice ---------- */

.bc-faq-notice {
	padding: 16px 20px;
	border: 1px dashed rgba(124, 58, 237, 0.5);
	border-radius: 10px;
	background: rgba(124, 58, 237, 0.08);
	color: #4c1d95;
	font-size: 14px;
}

/* ---------- Screen reader text ---------- */

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

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.bc-faq--sidebar .bc-faq__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.bc-faq--sidebar .bc-faq__cats {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.bc-faq--sidebar .bc-faq__cat {
		width: auto;
		padding: 13px 20px;
		font-size: 15px;
	}
}

@media (max-width: 600px) {
	.bc-faq__q-btn {
		padding: 17px 18px;
		font-size: 16px;
	}

	.bc-faq__a-pad {
		padding: 20px 18px;
	}

	.bc-faq__main {
		--bcfaq-card-pad: 10px;
		--bcfaq-card-radius: 14px;
	}

	.bc-faq__single-card {
		padding: 22px 18px;
	}

	.bc-faq__cat {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bc-faq *,
	.bc-faq *::before,
	.bc-faq *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
