/* ==========================================================================
   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-beck-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-beck-container.faq-loading {
	cursor: wait;
}

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

.faq-beck-search-title {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.faq-beck-search-row {
	display: flex;
	align-items: stretch;
	gap: 12px;
	width: 100%;
}

.faq-beck-search-input {
	flex: 1 1 auto;
	min-width: 0;
	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-beck-search-input:focus {
	outline: none;
	border-color: #007cba; /* Standard WordPress Blue baseline */
	box-shadow: 0 0 0 1px #007cba;
}

.faq-beck-clear-filters-button {
	flex: 0 0 auto;
	padding: 0 18px;
	border: 0;
	border-radius: 4px;
	background: #102433;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.faq-beck-clear-filters-button:hover,
.faq-beck-clear-filters-button:focus {
	background: #008a6a;
	color: #fff;
}

@media (max-width: 640px) {
	.faq-beck-search-row {
		flex-direction: column;
	}

	.faq-beck-clear-filters-button {
		min-height: 44px;
	}
}

/* ------------------------------------
   3. Tag Pills Widget
------------------------------------ */
.faq-beck-tags-wrapper,
.faq-beck-category-list {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 10px !important;
	margin: 18px 0 34px !important;
	padding: 0 !important;
	list-style: none !important;
}

.faq-beck-category-list li {
	display: inline-flex !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

.faq-beck-filter-hidden {
	display: none !important;
}

.faq-beck-tags-wrapper .faq-beck-filter-hidden,
.faq-beck-category-list .faq-beck-filter-hidden {
	display: none !important;
}

.faq-beck-tags-title,
.faq-beck-categories-title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.faq-beck-tag-pill,
.faq-beck-tags-wrapper a,
.faq-beck-tags-wrapper .faq-beck-tag-pill,
.faq-beck-tags-wrapper a.faq-beck-tag-pill,
.faq-beck-category-list a,
.faq-beck-category-list a.faq-beck-tag-pill,
.faq-beck-categories-wrapper .faq-beck-category-list a,
.faq-beck-categories-wrapper .faq-beck-category-list a.faq-beck-tag-pill {
	display: inline-flex !important;
	align-items: center !important;
	width: auto !important;
	max-width: 100% !important;
	padding: 9px 15px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	color: #0095A8 !important;
	background-color: #f0f0f0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-decoration: none !important;
	white-space: normal !important;
	transition: all 0.2s ease;
	cursor: pointer;
}

.faq-beck-tag-pill:hover,
.faq-beck-tags-wrapper a:hover,
.faq-beck-tags-wrapper .faq-beck-tag-pill:hover,
.faq-beck-tags-wrapper a.faq-beck-tag-pill:hover,
.faq-beck-category-list a:hover,
.faq-beck-category-list a.faq-beck-tag-pill:hover,
.faq-beck-categories-wrapper .faq-beck-category-list a:hover,
.faq-beck-categories-wrapper .faq-beck-category-list a.faq-beck-tag-pill:hover {
	background-color: #0095A8 !important;
	color: #fff !important;
	text-decoration: none !important;
}

/* The Active Filter State */
.faq-beck-tag-pill.active,
.faq-beck-tag-pill.is-active,
.faq-beck-tags-wrapper .faq-beck-tag-pill.active,
.faq-beck-tags-wrapper a.faq-beck-tag-pill.active,
.faq-beck-category-list a.is-active,
.faq-beck-category-list a.faq-beck-tag-pill.is-active,
.faq-beck-categories-wrapper .faq-beck-category-list a.is-active,
.faq-beck-categories-wrapper .faq-beck-category-list a.faq-beck-tag-pill.is-active {
	background-color: #0095A8 !important;
	color: #fff !important;
	border-color: #0095A8 !important;
}

.faq-beck-categories-wrapper .faq-cat-count {
	color: currentColor !important;
	font-size: inherit !important;
	line-height: inherit !important;
	opacity: 0.65 !important;
}

/* Tag pills displayed inside the actual FAQ answer */
.faq-item-tags .faq-beck-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;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.28s ease, opacity 0.22s ease;
}

/* 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;
	opacity: 1;
}

/* 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;
}
