/* ==========================================================================
   FAQ Popup Widget
   ========================================================================== */

/* Header icon */
.header-faq-icon {
	display: flex;
	align-items: center;
}

.le-faq-popup-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	text-decoration: none;
	padding: 5px;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.2s;
}

.le-faq-popup-trigger svg {
	pointer-events: none;
}

.le-faq-popup-trigger:hover {
	opacity: 1;
	color: inherit;
}

/* Overlay */
.le-faq-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 999998;
	opacity: 0;
	transition: opacity 0.25s;
}

.le-faq-popup-overlay.active {
	display: block;
	opacity: 1;
}

/* Popup container */
.le-faq-popup {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.95);
	width: 480px;
	max-width: 94vw;
	max-height: 85vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	z-index: 999999;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.25s, transform 0.25s;
}

.le-faq-popup.active {
	display: flex;
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* Header */
.le-faq-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px 14px;
	border-bottom: 1px solid #f0f0f0;
}

.le-faq-popup-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	color: #1a1a2e;
}

.le-faq-popup-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #9ca3af;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: color 0.2s;
}

.le-faq-popup-close:hover {
	color: #374151;
}

/* Search */
.le-faq-popup-search {
	position: relative;
	padding: 12px 20px;
}

.le-faq-popup-search-icon {
	position: absolute;
	left: 32px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	pointer-events: none;
}

#le-faq-popup-search {
	width: 100%;
	padding: 10px 14px 10px 40px;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	font-size: 14px;
	color: #374151;
	background: #f9fafb;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
}

#le-faq-popup-search:focus {
	border-color: #1a1a2e;
	background: #fff;
}

#le-faq-popup-search::placeholder {
	color: #9ca3af;
}

/* Tabs */
.le-faq-popup-tabs {
	display: flex;
	gap: 6px;
	padding: 0 20px 12px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.le-faq-popup-tabs::-webkit-scrollbar {
	display: none;
}

.le-faq-popup-tab {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	border: 1.5px solid #e5e7eb;
	border-radius: 20px;
	background: #fff;
	color: #374151;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s;
	text-transform: none !important;
	letter-spacing: normal !important;
}

.le-faq-popup-tab:hover {
	border-color: #1a1a2e;
}

.le-faq-popup-tab.active {
	background: #1a1a2e;
	color: #fff;
	border-color: #1a1a2e;
}

.le-faq-popup-tab-emoji {
	font-size: 14px;
	line-height: 1;
}

/* Body / scroll area */
.le-faq-popup-body {
	flex: 1;
	overflow-y: auto;
	padding: 0 20px 10px;
	scrollbar-width: thin;
}

.le-faq-popup-section-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #6b7280;
	padding: 12px 0 8px;
}

/* FAQ items */
.le-faq-popup-item {
	border-bottom: 1px solid #f3f4f6;
	padding: 12px 0;
}

.le-faq-popup-item:last-child {
	border-bottom: none;
}

.le-faq-popup-question {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	border: none;
	background: none;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
	font-weight: 500;
	color: #1f2937;
	padding: 0;
	line-height: 1.5;
	text-transform: none !important;
	letter-spacing: normal !important;
}

.le-faq-popup-question:hover {
	color: #1a1a2e;
}

.le-faq-popup-q-text {
	flex: 1;
}

.le-faq-popup-chevron {
	flex-shrink: 0;
	margin-top: 3px;
	color: #9ca3af;
	transition: transform 0.25s;
}

.le-faq-popup-item.open .le-faq-popup-chevron {
	transform: rotate(180deg);
}

/* Badge */
.le-faq-popup-badge {
	display: inline-block;
	margin-top: 6px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	background: #eef2ff;
	color: #4f46e5;
}

/* Answer */
.le-faq-popup-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, padding 0.3s ease;
	font-size: 13px;
	line-height: 1.7;
	color: #6b7280;
}

.le-faq-popup-item.open .le-faq-popup-answer {
	max-height: 300px;
	padding-top: 10px;
}

.le-faq-popup-answer p {
	margin: 0 0 8px;
}

/* No results */
.le-faq-popup-no-results,
.le-faq-popup-empty {
	text-align: center;
	color: #9ca3af;
	font-size: 14px;
	padding: 30px 0;
}

/* Footer */
.le-faq-popup-footer {
	padding: 14px 20px;
	border-top: 1px solid #f0f0f0;
	text-align: center;
}

.le-faq-popup-footer a {
	color: #1a1a2e;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.le-faq-popup-footer a:hover {
	text-decoration: underline;
}

/* Mobile */
@media (max-width: 549px) {
	.le-faq-popup {
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
		top: 0;
		left: 0;
		transform: translateY(100%);
	}

	.le-faq-popup.active {
		transform: translateY(0);
	}
}
