/*
 * Custom FAQs Plugin — Accordion Styles
 *
 * Class names and CSS custom property references intentionally mirror
 * the child theme's css/faq.php so the accordion looks consistent
 * wherever [faqs] is used, including inside sidebar widgets.
 */

/* ---- Outer item wrapper ---- */
.faqs .colapase-main {
	margin-bottom: 0.75rem;
}

/* ---- Question row (the clickable trigger) ---- */
.faqs .colapase-main h2.head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 1rem;          /* smaller default suits both sidebar and full-width */
	font-weight: normal;
	border-bottom: 1px solid currentColor;
	margin: 0;
	padding: 0.4rem 0;
	cursor: pointer;
	transition: color 0.2s ease;
	line-height: 1.4;
	user-select: none;
}

/* Question text takes all available space */
.faqs .colapase-main h2.head .faq-question-text {
	flex: 1;
}

/* ---- Chevron icon ---- */
.faqs .colapase-main h2.head .faq-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	pointer-events: none;
}

.faqs .colapase-main h2.head .faq-icon svg {
	width: 20px;
	height: 20px;
	transition: transform 0.25s ease;
	fill: currentColor;
}

/* ---- Answer panel (hidden by default) ---- */
.faqs .colapase-main .colapase-wrapper-content {
	display: none;
}

/* ---- Active state: open item ---- */
.faqs .colapase-main.active-me {
	padding: 8px 10px;
	border-radius: 8px;
	background-color: var(--color-light-gray, #f5f5f5);
}

.faqs .colapase-main.active-me h2.head {
	color: var(--color-secondary, #4a4a4a);
	border-bottom-color: transparent;
}

/* Rotate chevron when open */
.faqs .colapase-main.active-me h2.head .faq-icon svg {
	transform: rotate(180deg);
	fill: var(--color-gray, #888);
}

.faqs .colapase-main.active-me .colapase-wrapper-content {
	display: block;
}

/* ---- Answer content ---- */
.faqs .colapase-main .colapase-wrapper-content .no-m {
	margin: 0;
	padding-top: 0.5rem;
	font-size: 0.9rem;
}

.faqs .colapase-main .colapase-wrapper-content p:last-child {
	margin-bottom: 0;
}

/* ---- View All link ---- */
.faqs-view-all {
	margin-top: 1rem;
	text-align: right;
	font-size: 0.9rem;
}

/* ---- Empty state ---- */
.faqs-empty {
	font-style: italic;
	color: var(--color-gray, #888);
}
