/**
 * FalakCart FAQ — front-end styles
 * Light, readable, RTL-first. All colors come from CSS variables set by the plugin settings.
 */

:root {
	--fcfaq-primary: #050c9c;
	--fcfaq-accent: #3572ef;
	--fcfaq-soft: #a7e6ff;
	--fcfaq-gold: #ffb84c;
	--fcfaq-bg: #f5faff;
	--fcfaq-card: #ffffff;
	--fcfaq-border: #e2eeff;
	--fcfaq-text: #3f4a6b;
	--fcfaq-radius: 18px;
}

.fcfaq {
	position: relative;
	margin: 48px 0;
	padding: 34px 30px;
	background: var(--fcfaq-bg);
	background: linear-gradient(180deg, var(--fcfaq-bg) 0%, var(--fcfaq-card) 72%);
	border: 1px solid var(--fcfaq-border);
	border-radius: calc(var(--fcfaq-radius) + 8px);
	font-family: inherit;
	box-sizing: border-box;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
}

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

/* Soft glow — no square/box patterns. */
.fcfaq::before {
	content: "";
	position: absolute;
	inset-inline-start: -90px;
	top: -120px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	background: radial-gradient(circle, var(--fcfaq-soft) 0%, rgba(255, 255, 255, 0) 70%);
	opacity: .45;
	pointer-events: none;
}

/* ---------- Head ---------- */

.fcfaq__head {
	position: relative;
	margin-bottom: 22px;
}

.fcfaq__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	margin-bottom: 12px;
	border-radius: 999px;
	background: #ffffff;
	background: color-mix(in srgb, var(--fcfaq-soft) 30%, #ffffff);
	border: 1px solid var(--fcfaq-border);
	color: var(--fcfaq-accent);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0;
}

.fcfaq__badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--fcfaq-gold);
	flex: none;
}

.fcfaq__title {
	margin: 0 0 8px;
	padding: 0;
	color: var(--fcfaq-primary);
	font-size: clamp(21px, 2.6vw, 27px);
	font-weight: 800;
	line-height: 1.5;
	letter-spacing: 0;
}

.fcfaq__title::after {
	content: "";
	display: block;
	width: 46px;
	height: 4px;
	margin-top: 10px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--fcfaq-accent), var(--fcfaq-gold));
}

.fcfaq__subtitle {
	margin: 0;
	color: var(--fcfaq-text);
	font-size: 15px;
	line-height: 1.9;
	opacity: .85;
}

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

.fcfaq__list {
	position: relative;
	display: grid;
	gap: 12px;
}

.fcfaq__item {
	position: relative;
	background: var(--fcfaq-card);
	border: 1px solid var(--fcfaq-border);
	border-radius: var(--fcfaq-radius);
	box-shadow: 0 2px 10px rgba(5, 12, 156, .04);
	transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
	overflow: hidden;
}

.fcfaq__item::before {
	content: "";
	position: absolute;
	inset-block: 10px;
	inset-inline-start: 0;
	width: 3px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--fcfaq-accent), var(--fcfaq-soft));
	opacity: 0;
	transition: opacity .25s ease;
}

.fcfaq__item:hover {
	border-color: var(--fcfaq-soft);
	box-shadow: 0 6px 18px rgba(5, 12, 156, .07);
}

.fcfaq__item.is-open {
	border-color: color-mix(in srgb, var(--fcfaq-accent) 38%, #ffffff);
	box-shadow: 0 10px 26px rgba(5, 12, 156, .09);
}

.fcfaq__item.is-open::before {
	opacity: 1;
}

/* ---------- Question trigger ---------- */

.fcfaq__q {
	margin: 0;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	font-weight: inherit;
	border: 0;
}

.fcfaq__trigger {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 17px 20px;
	background: none;
	border: 0;
	border-radius: var(--fcfaq-radius);
	color: var(--fcfaq-primary);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.7;
	text-align: start;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.fcfaq__trigger:hover {
	background-color: color-mix(in srgb, var(--fcfaq-soft) 14%, #ffffff);
}

.fcfaq__trigger:focus-visible {
	outline: 2px solid var(--fcfaq-accent);
	outline-offset: -2px;
}

.fcfaq__num {
	display: none;
	flex: none;
	min-width: 30px;
	height: 30px;
	padding: 0 6px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--fcfaq-soft) 26%, #ffffff);
	color: var(--fcfaq-accent);
	font-size: 13px;
	font-weight: 800;
	line-height: 30px;
	text-align: center;
}

.fcfaq--numbered .fcfaq__num {
	display: block;
}

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

.fcfaq__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--fcfaq-soft) 26%, #ffffff);
	color: var(--fcfaq-accent);
	transition: transform .35s cubic-bezier(.4, 0, .2, 1), background-color .25s ease, color .25s ease;
}

.fcfaq__icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

.fcfaq__item.is-open .fcfaq__icon {
	background: var(--fcfaq-accent);
	color: #ffffff;
	transform: rotate(135deg);
}

.fcfaq__item.is-open .fcfaq__trigger {
	color: var(--fcfaq-primary);
}

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

.fcfaq__panel {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows .35s cubic-bezier(.4, 0, .2, 1);
}

.fcfaq.is-ready .fcfaq__panel {
	grid-template-rows: 0fr;
}

.fcfaq.is-ready .fcfaq__item.is-open .fcfaq__panel {
	grid-template-rows: 1fr;
}

.fcfaq__answer {
	overflow: hidden;
	min-height: 0;
	padding: 0 20px;
	color: var(--fcfaq-text);
	font-size: 16px;
	line-height: 2;
	visibility: hidden;
	opacity: 0;
	transition: opacity .3s ease .05s, visibility .3s;
}

.fcfaq:not(.is-ready) .fcfaq__answer,
.fcfaq__item.is-open .fcfaq__answer {
	visibility: visible;
	opacity: 1;
}

.fcfaq__answer > *:first-child {
	margin-top: 0;
	padding-top: 2px;
}

.fcfaq__answer > *:last-child {
	margin-bottom: 0;
	padding-bottom: 20px;
}

.fcfaq__answer p {
	margin: 0 0 14px;
}

.fcfaq__answer ul,
.fcfaq__answer ol {
	margin: 0 0 14px;
	padding-inline-start: 22px;
}

.fcfaq__answer li {
	margin-bottom: 6px;
}

.fcfaq__answer a {
	color: var(--fcfaq-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.fcfaq__answer a:hover {
	color: var(--fcfaq-primary);
}

.fcfaq__answer strong {
	color: var(--fcfaq-primary);
}

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

@media (max-width: 782px) {
	.fcfaq {
		margin: 32px 0;
		padding: 24px 16px;
		border-radius: var(--fcfaq-radius);
	}

	.fcfaq__trigger {
		gap: 10px;
		padding: 15px 14px;
		font-size: 16px;
	}

	.fcfaq__answer {
		padding: 0 14px;
		font-size: 15.5px;
		line-height: 1.95;
	}

	.fcfaq__answer > *:last-child {
		padding-bottom: 16px;
	}

	.fcfaq__num {
		min-width: 26px;
		height: 26px;
		line-height: 26px;
		font-size: 12px;
	}

	.fcfaq__icon {
		width: 28px;
		height: 28px;
	}
}

/* ---------- Print & motion ---------- */

@media print {
	.fcfaq.is-ready .fcfaq__panel {
		grid-template-rows: 1fr;
	}

	.fcfaq__answer {
		visibility: visible;
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fcfaq__panel,
	.fcfaq__icon,
	.fcfaq__item,
	.fcfaq__answer {
		transition: none !important;
	}
}
