/**
 * Visoop QA (accordion) widget styles.
 *
 * Base layout only — colours, spacing, radius, typography all come from
 * the widget's Style controls so users can theme it entirely from the UI.
 *
 * @package VisoopCore
 */

.visoop-qa {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.visoop-qa__item {
	transition: background-color 0.3s ease;
}

/* Question row — the whole thing is a <button> so click / space / enter all
   work with no extra JS. Reset native button styling. */
.visoop-qa__question-heading {
	margin: 0;
}
.visoop-qa__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	text-align: inherit;
	cursor: pointer;
}
.visoop-qa__question-text {
	flex: 1 1 auto;
	line-height: 1.4;
}

/* Icon box (circle) — the two icon spans stack; JS/CSS shows only one
   depending on the item's open state. */
.visoop-qa__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid currentColor;
	transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
	line-height: 1;
}
.visoop-qa__icon i,
.visoop-qa__icon svg {
	display: block;
}

.visoop-qa__icon-open   { display: none; }
.visoop-qa__icon-closed { display: inline-flex; align-items: center; justify-content: center; }

.visoop-qa__item.is-open .visoop-qa__icon-open   { display: inline-flex; align-items: center; justify-content: center; }
.visoop-qa__item.is-open .visoop-qa__icon-closed { display: none; }

/* Panel — [hidden] handles the closed state cleanly; when open, the
   answer is a normal block. */
.visoop-qa__panel[hidden] {
	display: none;
}
.visoop-qa__answer {
	line-height: 1.6;
}
.visoop-qa__answer > *:first-child { margin-top: 0; }
.visoop-qa__answer > *:last-child  { margin-bottom: 0; }
