/**
 * CSS dành cho Frontend - Hồng Anh FAQ Manager
 * Thiết kế theo phong cách hiện đại, tối giản, sang trọng (Glassmorphism & Harmonious Colors).
 */

/* Accordion FAQ chính */
.ha-faq-accordion {
	max-width: 800px;
	margin: 20px auto;
	padding: 0;
	font-family: inherit;
}

.ha-faq-accordion-item {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	margin-bottom: 15px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ha-faq-accordion-item:hover {
	border-color: #cbd5e1;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Accordion Header */
.ha-faq-accordion-header {
	padding: 18px 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	user-select: none;
	background-color: #fff;
	transition: background-color 0.2s ease;
}

.ha-faq-accordion-header:hover {
	background-color: #f8fafc;
}

.ha-faq-accordion-question {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
	line-height: 1.5;
	padding-right: 15px;
}

.ha-faq-accordion-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.ha-faq-accordion-icon svg {
	width: 16px;
	height: 16px;
}

/* Accordion Content */
.ha-faq-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background-color: #ffffff;
}

.ha-faq-accordion-inner {
	padding: 0 24px 24px 24px;
	color: #272727;
	font-size: 16px;
	line-height: 1.625;
	border-top: 1px solid transparent;
	transition: border-color 0.3s ease;
}

.ha-faq-accordion-inner p {
	margin: 0 0 1em 0;
	padding-top: 15px;
}

.ha-faq-accordion-inner p:last-child {
	margin-bottom: 0;
}

/* Trạng thái hoạt động (Active) */
.ha-faq-accordion-item.is-active {
	border-color: #3b82f6;
}

.ha-faq-accordion-item.is-active .ha-faq-accordion-header {
	background-color: #f8fafc;
}

.ha-faq-accordion-item.is-active .ha-faq-accordion-icon {
	transform: rotate(180deg);
	color: #3b82f6;
}

.ha-faq-accordion-item.is-active .ha-faq-accordion-inner {
	border-top-color: #f1f5f9;
}

/* Trạng thái Highlight (Khi cuộn đến bằng URL hash) */
.ha-faq-accordion-item.is-highlighted {
	animation: haFaqPulseGlow 2s infinite alternate;
	border-width: 2px;
}

@keyframes haFaqPulseGlow {
	0% {
		border-color: #3b82f6;
		box-shadow: 0 0 5px rgba(59, 130, 246, 0.2);
	}
	100% {
		border-color: #10b981;
		box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
	}
}

/* Widget FAQ */
.ha-faq-widget {
	max-width: 300px;
	width: 100%;
	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	font-family: inherit;
	margin: 15px 0;
}

.ha-faq-widget-title {
	margin: 0 0 15px 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	border-bottom: 2px solid #3b82f6;
	padding-bottom: 8px;
}

.ha-faq-widget-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ha-faq-widget-item {
	margin-bottom: 12px;
	padding: 0;
}

.ha-faq-widget-item:last-child {
	margin-bottom: 0;
}

.ha-faq-widget-link {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	text-decoration: none !important;
	color: #000;
	font-size: 15px;
	line-height: 1.4;
}

.ha-faq-widget-index {
	background-color: #0068ff;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 1px;
}

.ha-faq-widget-qtext {
	font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
	.ha-faq-widget {
		width: 100% !important;
		max-width: 100% !important;
	}
	.ha-faq-accordion-header {
		padding: 16px 20px;
	}
	.ha-faq-accordion-question {
		font-size: 15px;
	}
}
