/* ==========================================================================
   FAQ Knowledge Base - Baseline Structural Styles
   These styles provide the core layout and functional visuals (like +/- icons).
   Colors, typography, and spacing should ideally be overridden via Elementor.
   ========================================================================== */

/* ------------------------------------
   1. The FAQ Container & Loading State
------------------------------------ */
.faq-kb-container {
	position: relative;
	width: 100%;
	transition: opacity 0.3s ease-in-out;
	min-height: 100px;
}

/* Optional: Add a subtle loading cursor when AJAX is fetching */
.faq-kb-container.faq-loading {
	cursor: wait;
}

/* ------------------------------------
   2. Search Bar Widget
------------------------------------ */
.faq-kb-search-wrapper {
	margin-bottom: 20px;
	width: 100%;
}

.faq-kb-search-input {
	width: 100%;
	padding: 12px 16px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	transition: border-color 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.faq-kb-search-input:focus {
	outline: none;
	border-color: #007cba; /* Standard WordPress Blue baseline */
	box-shadow: 0 0 0 1px #007cba;
}

/* ------------------------------------
   3. Tag Pills Widget
------------------------------------ */
.faq-kb-tags-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 25px;
}

.faq-kb-tag-pill {
	display: inline-block;
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 500;
	color: #555;
	background-color: #f0f0f0;
	border-radius: 20px;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border: 1px solid transparent;
}

.faq-kb-tag-pill:hover {
	background-color: #e0e0e0;
	color: #333;
}

/* The Active Filter State */
.faq-kb-tag-pill.active {
	background-color: #007cba;
	color: #fff;
	border-color: #007cba;
}

/* Tag pills displayed inside the actual FAQ answer */
.faq-item-tags .faq-kb-tag-pill {
	font-size: 12px;
	padding: 4px 10px;
	pointer-events: none; /* Prevent clicking inside the answer block if desired */
}

/* ------------------------------------
   4. FAQ Accordion List
------------------------------------ */
.faq-item-toggle {
	margin-bottom: 15px;
	border: 1px solid #eaeaea;
	border-radius: 6px;
	background-color: #fff;
	overflow: hidden; /* Keeps the answer content contained */
}

/* Accordion Header */
.faq-question-title {
	margin: 0;
	padding: 18px 45px 18px 20px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	position: relative;
	user-select: none; /* Prevents text highlighting on double-click */
	transition: background-color 0.2s ease;
}

.faq-question-title:hover {
	background-color: #fcfcfc;
}

/* The +/- Icon generated via CSS */
.faq-question-title::after {
	content: '+';
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	font-weight: 300;
	color: #777;
	line-height: 1;
	transition: transform 0.3s ease;
}

/* Change icon to '-' when open */
.faq-item-toggle.is-open .faq-question-title::after {
	content: '−'; /* Using a true minus sign for better vertical alignment */
}

/* Accordion Body */
.faq-answer-content {
	padding: 0 20px 20px 20px;
	color: #444;
	font-size: 16px;
	line-height: 1.6;
	border-top: 1px solid transparent;
}

/* Add a subtle line between question and answer when open */
.faq-item-toggle.is-open .faq-answer-content {
	border-top-color: #eaeaea;
	padding-top: 20px;
}

/* Ensure embedded images or videos don't break the container */
.faq-answer-content img,
.faq-answer-content iframe {
	max-width: 100%;
	height: auto;
}

/* ------------------------------------
   5. No Results State
------------------------------------ */
.faq-no-results {
	text-align: center;
	padding: 40px 20px;
	background-color: #f9f9f9;
	border-radius: 6px;
	border: 1px dashed #ccc;
}

.faq-no-results h4 {
	margin-top: 0;
	margin-bottom: 10px;
	color: #333;
}

.faq-no-results p {
	margin: 0;
	color: #666;
}