/**
 * Aha Product FAQ - Frontend (accordion)
 *
 * @package AhaProductFaq
 */

.aha-product-faq {
	margin: 1.5em 0;
	width: 100%;
}

.aha-product-faq-title {
	margin: 0 0 0.75em 0;
	font-size: 1.25rem;
}

.aha-product-faq-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}

.aha-product-faq-item {
	border-bottom: 1px solid #e0e0e0;
}

.aha-product-faq-item:last-child {
	border-bottom: none;
}

/* ── Layout: Bordered (left accent border + chevron) ──────────────────────── */
.aha-product-faq--bordered .aha-product-faq-list {
	border: none;
	border-radius: 0;
	overflow: visible;
}

.aha-product-faq--bordered .aha-product-faq-item {
	border-left: 4px solid #e0e0e0;
	border-bottom: 1px solid #ebebeb;
	background: #fff;
	transition: border-left-color 0.2s ease;
	margin-bottom: 20px;
}

.aha-product-faq--bordered .aha-product-faq-item:last-child {
	border-bottom: none;
}

.aha-product-faq--bordered .aha-product-faq-question {
	background: transparent;
	padding-left: 1.1em;
	font-weight: 600;
}

.aha-product-faq--bordered .aha-product-faq-question:hover {
	background: rgba(0, 0, 0, 0.03);
}

.aha-product-faq--bordered .aha-product-faq-question::after {
	content: '';
	display: inline-block;
	flex-shrink: 0;
	width: 0.45em;
	height: 0.45em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-left: 0.6em;
	transition: transform 0.25s ease;
}

.aha-product-faq--bordered .aha-product-faq-question[aria-expanded="true"]::after {
	transform: rotate(-135deg);
}

.aha-product-faq--bordered .aha-product-faq-answer-inner {
	border-top: none;
	padding-left: 1.1em;
	background: #fafafa;
}

/* ── Layout: Minimal (full-color question rows, no container) ─────────────── */
.aha-product-faq--minimal .aha-product-faq-list {
	border: none;
	border-radius: 0;
	overflow: visible;
}

.aha-product-faq--minimal .aha-product-faq-item {
	border-bottom: 2px solid #e0e0e0;
	background: transparent;
	margin-bottom: 20px;
}

.aha-product-faq--minimal .aha-product-faq-item:last-child {
	border-bottom: none;
}

.aha-product-faq--minimal .aha-product-faq-question {
	background: #fafafa;
	font-weight: 600;
	border-radius: 0;
}

.aha-product-faq--minimal .aha-product-faq-question::after {
	display: none;
}

.aha-product-faq--minimal .aha-product-faq-answer {
	background: #fff;
}

.aha-product-faq--minimal .aha-product-faq-answer-inner {
	border-top: none;
	padding-top: 1em;
	background: #fff;
}

/* ── Layout: Cards (each FAQ in a rounded, spaced box) ───────────────────── */
.aha-product-faq--cards .aha-product-faq-list {
	border: none;
	border-radius: 0;
	overflow: visible;
}

.aha-product-faq--cards .aha-product-faq-item {
	border: 1px solid #e0e0e0;
	border-bottom: 1px solid #e0e0e0;
	border-radius: 10px;
	margin-bottom: 1em;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	background: #fff;
}

.aha-product-faq--cards .aha-product-faq-item:last-child {
	margin-bottom: 0;
}

.aha-product-faq--cards .aha-product-faq-question {
	border-radius: 10px 10px 0 0;
}

.aha-product-faq--cards .aha-product-faq-answer-inner {
	border-top: 1px solid #e0e0e0;
}

.aha-product-faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 1em 1.25em;
	background: #fafafa;
	color: #1d2327;
	border: none;
	border-radius: 0px;
	font-size: 1rem;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

/* Hover: keep configured color; prevent theme button:hover overrides. */
.aha-product-faq-question:hover {
	background: #f0f0f0;
	color: inherit;
}

/* Focus/focus-visible: match hover exactly; don't let the theme recolor the button. */
.aha-product-faq-question:focus,
.aha-product-faq-question:focus-visible {
	background: #f0f0f0;
	color: inherit;
	outline: 2px solid currentColor;
	outline-offset: -3px;
	box-shadow: none;
}

.aha-product-faq-question::after {
	content: '+';
	flex-shrink: 0;
	margin-left: 0.5em;
	font-size: 1.25em;
	line-height: 1;
}

.aha-product-faq-question[aria-expanded="true"]::after {
	content: '−';
}

.aha-product-faq-answer {
	padding: 0;
	background: #fff;
}

.aha-product-faq-answer[hidden] {
	display: none;
}

.aha-product-faq-answer-inner {
	padding: 1em 1.25em 1.25em;
	border-top: 1px solid #e0e0e0;
	font-size: 1rem;
	line-height: 1.6;
	color: #333;
	white-space: normal;
}

/* First/last elements: no extra margin against container */
.aha-product-faq-answer-inner > *:first-child {
	margin-top: 0;
}

.aha-product-faq-answer-inner > *:last-child {
	margin-bottom: 0;
}

/* Paragraphs */
.aha-product-faq-answer-inner p {
	margin: 0 0 1em 0;
	font-size: 1em;
}

.aha-product-faq-answer-inner p:last-child {
	margin-bottom: 0;
}

/* Headings inside FAQ answer */
.aha-product-faq-answer-inner h1 {
	font-size: 1.5rem;
	margin: 1.25em 0 0.5em 0;
	line-height: 1.3;
	font-weight: 700;
}

.aha-product-faq-answer-inner h2 {
	font-size: 1.3rem;
	margin: 1.1em 0 0.45em 0;
	line-height: 1.35;
	font-weight: 700;
}

.aha-product-faq-answer-inner h3,
.aha-product-faq-answer-inner h4 {
	font-size: 1.15rem;
	margin: 1em 0 0.4em 0;
	line-height: 1.4;
	font-weight: 600;
}

.aha-product-faq-answer-inner h5,
.aha-product-faq-answer-inner h6 {
	font-size: 1.05rem;
	margin: 0.9em 0 0.35em 0;
	line-height: 1.4;
	font-weight: 600;
}

.aha-product-faq-answer-inner h1:first-child,
.aha-product-faq-answer-inner h2:first-child,
.aha-product-faq-answer-inner h3:first-child,
.aha-product-faq-answer-inner h4:first-child,
.aha-product-faq-answer-inner h5:first-child,
.aha-product-faq-answer-inner h6:first-child {
	margin-top: 0;
}

/* Unordered and ordered lists */
.aha-product-faq-answer-inner ul,
.aha-product-faq-answer-inner ol {
	margin: 0.75em 0 1em 0;
	padding-left: 1.5em;
	font-size: 1em;
}

.aha-product-faq-answer-inner ul {
	list-style-type: disc;
}

.aha-product-faq-answer-inner ol {
	list-style-type: decimal;
}

.aha-product-faq-answer-inner li {
	margin-bottom: 0.35em;
	line-height: 1.6;
}

.aha-product-faq-answer-inner li:last-child {
	margin-bottom: 0;
}

/* Bold and emphasis */
.aha-product-faq-answer-inner strong,
.aha-product-faq-answer-inner b {
	font-weight: 700;
}

.aha-product-faq-answer-inner em,
.aha-product-faq-answer-inner i {
	font-style: italic;
}

/* Links */
.aha-product-faq-answer-inner a {
	color: #0073aa;
	text-decoration: none;
}

.aha-product-faq-answer-inner a:hover {
	text-decoration: underline;
}
