/**
 * Giao diện FAQ dùng chung ngoài website.
 *
 * Phạm vi:
 * - details/summary của FAQ trang chủ, danh mục và sản phẩm.
 * - Accordion do connector Flatsome đánh dấu cho FAQ trang chủ.
 *
 * CSS chỉ quản lý giao diện đóng/mở. Bố cục Section, Row, Column, vị trí,
 * kích thước khu vực và responsive tổng thể vẫn do trình dựng giao diện
 * hoặc theme hiện tại quản lý.
 */


/* =====================================================
   01. KHUNG VÀ TỪNG MỤC FAQ
===================================================== */

.tsv-faq,
.tsv-home-faq-source.accordion,
.accordion.tsv-home-faq-source {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	border: 1px solid #e5eaf2;
	border-radius: 10px;
	background: #ffffff;
}

.tsv-faq {
	margin: 16px 0 0;
}

.tsv-home-faq-source.accordion,
.accordion.tsv-home-faq-source {
	margin: 14px 0 0;
}

.tsv-faq > details,
.tsv-home-faq-source .accordion-item {
	margin: 0;
	border: 0;
	border-bottom: 1px solid #e5eaf2;
	background: #ffffff;
}

.tsv-faq > details:last-child,
.tsv-home-faq-source .accordion-item:last-child {
	border-bottom: 0;
}


/* =====================================================
   02. THANH CÂU HỎI DÙNG CHUNG
===================================================== */

.tsv-faq > details > summary,
.tsv-home-faq-source .accordion-title {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 54px;
	box-sizing: border-box;
	padding: 14px 48px 14px 46px;
	border: 0;
	background: #ffffff;
	color: #082b63;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.tsv-faq > details > summary {
	list-style: none;
	user-select: none;
}

.tsv-faq > details > summary::-webkit-details-marker {
	display: none;
}

.tsv-faq > details > summary::marker {
	display: none;
	content: "";
}

.tsv-faq > details > summary:hover,
.tsv-home-faq-source .accordion-title:hover,
.tsv-home-faq-source .accordion-title.active {
	background: #f7fbff;
	color: #082b63;
}

.tsv-faq > details > summary:focus-visible {
	z-index: 1;
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}


/* =====================================================
   03. BIỂU TƯỢNG DETAILS/SUMMARY
===================================================== */

.tsv-faq > details > summary::before,
.tsv-faq > details > summary::after {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: currentColor;
	font-size: 20px;
	font-weight: 800;
	line-height: 1;
}

.tsv-faq > details > summary::before {
	left: 20px;
	content: "+";
}

.tsv-faq > details[open] > summary::before {
	content: "−";
}

.tsv-faq > details > summary::after {
	right: 20px;
	content: "⌄";
	font-weight: 700;
}

.tsv-faq > details[open] > summary::after {
	content: "⌃";
}


/* =====================================================
   04. BIỂU TƯỢNG ACCORDION FLATSOME
===================================================== */

.tsv-home-faq-source .accordion-title .toggle {
	position: absolute;
	top: 50%;
	left: 12px;
	right: auto;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	opacity: 1;
}

.tsv-home-faq-source .accordion-title .toggle i {
	top: 50%;
	transform: translateY(-50%);
	color: currentColor;
	font-size: 18px;
}


/* =====================================================
   05. NỘI DUNG CÂU TRẢ LỜI
===================================================== */

.tsv-faq > details > .tsv-faq-answer,
.tsv-home-faq-source .accordion-inner {
	box-sizing: border-box;
	padding: 0 48px 18px 46px;
	border: 0;
	background: #ffffff;
}

.tsv-faq .tsv-faq-answer > :first-child,
.tsv-home-faq-source .accordion-inner > :first-child {
	margin-top: 0;
}

.tsv-faq .tsv-faq-answer > :last-child,
.tsv-home-faq-source .accordion-inner > :last-child {
	margin-bottom: 0;
}

.tsv-faq .tsv-faq-answer p,
.tsv-home-faq-source .accordion-inner p {
	color: #222222;
	font-size: 15.5px;
	line-height: 1.75;
}

.tsv-faq .tsv-faq-answer ul,
.tsv-faq .tsv-faq-answer ol,
.tsv-home-faq-source .accordion-inner ul,
.tsv-home-faq-source .accordion-inner ol {
	margin: 0 0 14px 20px;
}

.tsv-faq .tsv-faq-answer a,
.tsv-home-faq-source .accordion-inner a {
	text-decoration: underline;
}


/* =====================================================
   06. MOBILE
===================================================== */

@media only screen and (max-width: 768px) {
	.tsv-faq,
	.tsv-home-faq-source.accordion,
	.accordion.tsv-home-faq-source {
		border-radius: 8px;
	}

	.tsv-faq {
		margin-top: 14px;
	}

	.tsv-home-faq-source.accordion,
	.accordion.tsv-home-faq-source {
		margin-top: 12px;
	}

	.tsv-faq > details > summary,
	.tsv-home-faq-source .accordion-title {
		min-height: 50px;
		font-size: 15px;
		line-height: 1.45;
	}

	.tsv-faq > details > summary {
		padding: 13px 40px 13px 38px;
	}

	.tsv-home-faq-source .accordion-title {
		padding: 13px 40px;
	}

	.tsv-faq > details > summary::before {
		left: 15px;
		font-size: 18px;
	}

	.tsv-faq > details > summary::after {
		right: 15px;
		font-size: 18px;
	}

	.tsv-home-faq-source .accordion-title .toggle {
		left: 9px;
		width: 26px;
		height: 26px;
	}

	.tsv-faq > details > .tsv-faq-answer {
		padding: 0 38px 16px;
	}

	.tsv-home-faq-source .accordion-inner {
		padding: 0 38px 16px 40px;
	}

	.tsv-faq .tsv-faq-answer p,
	.tsv-home-faq-source .accordion-inner p {
		font-size: 14.5px;
		line-height: 1.7;
	}
}


/* =====================================================
   07. GIẢM CHUYỂN ĐỘNG KHI NGƯỜI DÙNG YÊU CẦU
===================================================== */

@media (prefers-reduced-motion: reduce) {
	.tsv-faq > details > summary,
	.tsv-home-faq-source .accordion-title {
		transition: none;
	}
}
