/**
 * CTM FAQ ([faq-lists] shortcode) — styles for the single-render markup in inc/faq.php.
 *
 * Flatsome's own CSS for .tabbed-content, .nav-*, .tab-panels, .panel, .accordion-title, .accordion-inner
 * and .toggle still applies (plus the Flatsome "Custom CSS" theme option). This file only:
 *  - recreates the flex layout on the .ctm-faq__layout wrapper,
 *  - styles the category <h2> and question <h3>/<button> elements to look like the previous markup,
 *  - provides the mobile (<= 849px) stacked-category design that used to be a separate .faq-mobile-tabs block.
 * Values were matched against computed styles of the previous FAQ on 2026-11-20.
 */

/* ---------- Layout ---------- */

.ctm-faq .ctm-faq__layout {
	display: flex;
	flex-flow: row wrap;
	width: 100%;
}

.ctm-faq .ctm-faq__visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------- Category heading (desktop: the red heading above the questions) ---------- */

.ctm-faq .ctm-faq__category {
	display: block;
	width: 100%;
	margin: 0 0 1em;
	padding: calc(32px + 0.6em) 0 0; /* previous 32px gap element + heading margin-top */
	color: #c23933;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.ctm-faq .ctm-faq__category-toggle {
	display: none; /* mobile only */
}

.ctm-faq .ctm-faq__body {
	padding-top: 18px; /* previous 18px gap element below the heading */
}

/* ---------- Questions: <h3><button class="accordion-title"> ---------- */

.ctm-faq .ctm-faq__question-heading {
	width: 100%;
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-style: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-rendering: inherit;
}

/* Reset Flatsome's generic <button> styles; .accordion-title supplies border-top, font-size, padding, colours. */
.ctm-faq .ctm-faq__question {
	display: block;
	width: 100%;
	max-width: none;
	min-height: 0;
	margin: 0;
	border-right: 0;
	border-bottom: 0;
	border-left: 0;
	border-radius: 0;
	box-shadow: none;
	font-weight: inherit;
	letter-spacing: normal;
	line-height: inherit;
	text-align: inherit;
	text-decoration: none;
	text-rendering: inherit;
	text-shadow: none;
	text-transform: none;
	vertical-align: baseline;
	white-space: normal;
	-webkit-appearance: none;
	appearance: none;
}

.ctm-faq .ctm-faq__question.active {
	font-weight: 700;
}

.ctm-faq .ctm-faq__question:not(.active):hover {
	color: #000; /* previous link hover colour */
}

/* The arrow icon was a nested <button class="toggle">; it is now a <span>, given the same box. */
.ctm-faq .ctm-faq__question .toggle {
	display: flex; /* centres the icon like the content of the former <button> */
	align-items: center;
	justify-content: center;
	height: 2.5em;
	padding: 0;
	border: 1px solid transparent;
	letter-spacing: 0.03em;
}

/* ---------- Mobile: stacked collapsible categories ---------- */

@media (max-width: 849px) {
	.ctm-faq .ctm-faq__nav {
		display: none;
	}

	.ctm-faq .ctm-faq__nav + .tab-panels {
		margin: 0;
		padding: 0;
		border: 0;
		background-color: transparent;
	}

	.ctm-faq .tab-panels .ctm-faq__panel:not(.active) {
		height: auto;
		opacity: 1;
		overflow: visible;
		visibility: visible;
	}

	.ctm-faq .ctm-faq__category {
		margin: 0;
		padding: 0;
		color: inherit;
		font-size: 1em;
		line-height: inherit;
		letter-spacing: normal;
		text-transform: none;
	}

	.ctm-faq .ctm-faq__category-heading {
		display: none;
	}

	.ctm-faq .ctm-faq__category-toggle {
		display: block;
		position: relative;
		width: 100%;
		max-width: none;
		min-height: 0;
		margin: 0;
		padding: 16px;
		border-style: solid;
		border-color: #ddd;
		border-width: 0 1px 1px;
		border-radius: 0;
		box-shadow: none;
		background-color: #f5f5f5;
		color: #666;
		font-family: "Open Sans", sans-serif;
		font-size: 0.9em;
		font-style: normal;
		font-weight: 700;
		line-height: 1.6;
		letter-spacing: normal;
		text-align: start;
		text-decoration: none;
		text-shadow: none;
		text-transform: none;
		vertical-align: baseline;
		white-space: normal;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
	}

	.ctm-faq .ctm-faq__panel:first-child .ctm-faq__category-toggle {
		border-top-width: 1px;
	}

	.ctm-faq .ctm-faq__panel.active .ctm-faq__category-toggle {
		border-bottom-width: 0;
		border-left: 3px solid #c23933;
		background-color: #fff;
		color: #c23933;
	}

	.ctm-faq .ctm-faq__body {
		padding: 0 16px 16px;
		border-style: solid;
		border-color: #ddd;
		border-width: 0 1px 1px;
	}

	.ctm-faq .ctm-faq__panel.active .ctm-faq__body {
		border-left: 3px solid #c23933;
	}

	.ctm-faq .ctm-faq__panel:not(.active) .ctm-faq__body {
		display: none;
	}
}
