/* ============================================================
 * Section: Pricing FAQs (page-pricing R10)
 * Figma: 5192:18558
 * Cross-fade theme: theo body.ses-dark (.ses observer trigger).
 * ============================================================ */

.frd-section {
	/* Scoped color tokens — light defaults */
	--frd-bg: #ffffff;
	--frd-fg: #050505;
	--frd-fg-secondary: rgba(5, 5, 5, 0.8);
	--frd-stroke: #d3d3d3;

	background: var(--frd-bg);
	padding: var(--var-140) var(--section-horizontal-padding);
	font-family: var(--font-body);
	color: var(--frd-fg);
	contain: layout paint;
	transition: background-color 600ms linear, color 600ms linear;
}

body.ses-dark .frd-section {
	--frd-bg: #050505;
	--frd-fg: #ffffff;
	--frd-fg-secondary: rgba(255, 255, 255, 0.85);
	--frd-stroke: rgba(255, 255, 255, 0.18);
}

.frd-container {
	max-width: 1400px;
	margin-inline: auto;
}

.frd-grid {
	display: flex;
	gap: var(--var-40);
	align-items: flex-start;
}

.frd-title {
	flex: 1 0 0;
	min-width: 0;
	margin: 0;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: var(--fs-h2);
	line-height: 1.15;
	color: var(--frd-fg);
	letter-spacing: 0;
}

.frd-list {
	flex: 1 0 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--var-36);
}

.frd-item {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.frd-item__indicator {
	width: 100%;
	height: 2px;
	background: var(--frd-stroke);
	transition: background 0.25s ease;
}

.frd-item.is-active .frd-item__indicator {
	background: linear-gradient(to right, #ff4e41, #cc6af9);
}

.frd-item__head {
	width: 100%;
	margin-top: var(--var-20);
}

.frd-item__toggle {
	display: flex;
	align-items: center;
	gap: 0;
	width: 100%;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	cursor: pointer;
	text-align: left;
	color: inherit;
	font: inherit;
}

.frd-item__toggle:focus {
	outline: none;
}

.frd-item__toggle:focus-visible {
	outline: 2px solid #cc6af9;
	outline-offset: 4px;
	border-radius: 2px;
}

.frd-item__title {
	flex: 1 0 0;
	min-width: 0;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: var(--fs-h5);
	line-height: 1.15;
	color: var(--frd-fg);
}

.frd-item__chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--frd-fg);
	transition: transform 0.25s ease;
}

.frd-item__chevron svg {
	width: 100%;
	height: 100%;
	display: block;
}

.frd-item.is-active .frd-item__chevron {
	transform: rotate(180deg);
}

.frd-item__body {
	width: 100%;
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fallback khi JS chưa kịp gán inline max-height — đảm bảo item active vẫn hiện trên page load */
.frd-item.is-active .frd-item__body {
	max-height: 2000px;
}

.frd-item__body-inner {
	padding-top: var(--var-36);
	font-family: var(--font-body);
	font-weight: 400;
	font-size: var(--fs-label-lg);
	line-height: 1.4;
	color: var(--frd-fg-secondary);
}

.frd-item__body-inner > *:first-child {
	margin-top: 0;
}

.frd-item__body-inner > *:last-child {
	margin-bottom: 0;
}

.frd-item__body-inner p {
	margin: 0 0 4px;
	line-height: 1.4;
}

.frd-item__body-inner ul {
	list-style: disc;
	margin: 0 0 4px;
	padding-left: 0;
}

.frd-item__body-inner ul li {
	margin-left: var(--var-24);
	line-height: 1.4;
}

/* ----- Structural breakpoint — stack 2 cột, padding/gap/font kế thừa desktop ----- */

@media (max-width: 991px) {
	.frd-grid {
		flex-direction: column;
	}

	.frd-title,
	.frd-list {
		flex: none;
		width: 100%;
	}
}

/* ============================================================
 * Cross-fade theme switch — sync 800ms với .ses
 * ============================================================ */

/* Cross-fade theme — chỉ target descendants (bỏ pseudo, bỏ `background` shorthand) để giảm paint cost.
   Section root tự transition + contain riêng. Per-element transition (frd-item__body, chevron, indicator) ở dưới giữ nguyên. */
.frd-section * {
	transition: background-color 600ms linear, color 600ms linear, border-color 600ms linear;
}

/* Per-element transitions cần ngoài cross-fade list — specificity (0,2,0) đè (0,1,0) cross-fade */
.frd-section .frd-item__body {
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 600ms linear, color 600ms linear;
}

.frd-section .frd-item__chevron {
	transition: transform 0.25s ease, color 600ms linear;
}

.frd-section .frd-item__indicator {
	transition: background 0.25s ease, background-color 600ms linear;
}

@media (prefers-reduced-motion: reduce) {

	.frd-section,
	.frd-section *,
	.frd-section *::before,
	.frd-section *::after {
		transition: none !important;
	}
}
