/**
 * שאלות נפוצות מורויז׳ן — front-end
 *
 * Every rule is kept at (0,1,0) specificity so the widget's Elementor style
 * controls ({{WRAPPER}} .mvfaq__x = (0,2,0)) always win without !important.
 * Logical properties throughout: RTL/LTR both work untouched.
 */

/* The optional heading lives inside the widget, so it disappears together with
   the accordion on entries that have no FAQs. Its font is deliberately NOT
   reset: it inherits the theme's heading scale until a control overrides it. */
.mvfaq__title {
	margin-block-start: 0;
	margin-block-end: 16px;
}

.mvfaq__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mvfaq__item {
	border-radius: 12px;
	overflow: hidden;
}

/* The heading is a semantic wrapper only — all typography lives on the trigger.
   Scoped to `.mvfaq .mvfaq__heading` (0,2,0) so it outranks a theme's
   `.elementor-kit-N h3` (0,1,1) instead of inheriting stray heading styles. */
.mvfaq .mvfaq__heading {
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
}

.mvfaq__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	inline-size: 100%;
	margin: 0;
	padding: 16px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: start;
	cursor: pointer;
	appearance: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Themes commonly style bare `button:hover / button:focus` (e.g. a coloured
   fill at (0,1,1)), which would bleed into the trigger. Neutralise it here at
   (0,3,0): beats the theme, still loses to the widget's own Elementor control
   selectors, so a designer's hover/active colours keep working. */
.mvfaq .mvfaq__trigger,
.mvfaq .mvfaq__trigger:hover,
.mvfaq .mvfaq__trigger:focus,
.mvfaq .mvfaq__trigger:active {
	background-color: transparent;
	color: inherit;
	box-shadow: none;
	border: 0;
	/* Themes also ship `button { white-space: nowrap }`, which `font: inherit`
	   does not reset — long questions would overflow instead of wrapping. */
	white-space: normal;
}

.mvfaq__trigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Always-open mode: the row is a plain label, not a control. */
.mvfaq__trigger--static {
	cursor: default;
}

/* No collapsing, so the panel must never be height-clipped or transitioned. */
.mvfaq__list--static .mvfaq__panel {
	overflow: visible;
	transition: none;
	height: auto;
}

.mvfaq__question {
	flex: 1 1 auto;
	min-inline-size: 0;
	overflow-wrap: break-word;
}

/* Sized in em against the trigger, so the icon tracks the question type scale. */
.mvfaq__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	font-size: 0.7em;
	line-height: 1;
	transition: transform 0.2s ease;
}

.mvfaq__icon svg {
	inline-size: 1em;
	block-size: 1em;
	fill: currentColor;
}

.mvfaq__icon i {
	font-size: 1em;
	font-style: normal;
}

/* State lives in aria-expanded — no parallel class to drift out of sync. */
.mvfaq__trigger[aria-expanded="true"] .mvfaq__icon-closed,
.mvfaq__trigger[aria-expanded="false"] .mvfaq__icon-open {
	display: none;
}

.mvfaq__panel {
	overflow: hidden;
	transition: height 0.3s ease;
}

.mvfaq__panel[hidden] {
	display: none;
}

.mvfaq__answer {
	padding: 16px;
}

.mvfaq__answer > :first-child {
	margin-block-start: 0;
}

.mvfaq__answer > :last-child {
	margin-block-end: 0;
}

/* Editor-only hint when the post has no FAQs. Never rendered on the front end. */
.mvfaq__placeholder {
	padding: 16px;
	border: 1px dashed currentColor;
	border-radius: 8px;
	opacity: 0.7;
	font-size: 14px;
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.mvfaq__panel,
	.mvfaq__trigger,
	.mvfaq__icon {
		transition: none;
	}
}
