/* ── Elemance FAQ / Accordion Widget ──────────── */

/* Theme-compatibility hardening: many themes change global box-sizing,
   list, link, or SVG defaults. Scope our own box-sizing and reset the
   handful of tags that can appear inside the WYSIWYG answer so the
   widget looks the same on any Elementor-compatible theme. */
.elmc-acc,
.elmc-acc *,
.elmc-acc *::before,
.elmc-acc *::after {
	box-sizing: border-box;
}

.elmc-acc {
	width: 100%;
	--elmc-divider-color: #e5e7eb;
	--elmc-divider-width: 1.5px;
	--elmc-divider-style: solid;
	--elmc-acc-speed: 320ms;
}

.elmc-acc__icon svg {
	display: block;
	max-width: 100%;
	vertical-align: middle;
}

.elmc-acc__answer a {
	color: inherit;
	text-decoration: underline;
}

.elmc-acc__answer ul,
.elmc-acc__answer ol {
	margin: 0 0 10px 20px;
	padding: 0;
}

.elmc-acc__answer li { margin: 0 0 4px; }
.elmc-acc__answer strong, .elmc-acc__answer b { font-weight: 700; }
.elmc-acc__answer h1, .elmc-acc__answer h2, .elmc-acc__answer h3,
.elmc-acc__answer h4, .elmc-acc__answer h5, .elmc-acc__answer h6 {
	margin: 0 0 10px;
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.4;
}

/* ── Shared item ──────────────────────────────── */
.elmc-acc__item {
	overflow: hidden;
	border-style: none;
}

/* ── Header button ────────────────────────────── */
/* Reset native/theme <button> styling — many WordPress themes apply their
   own background/border to raw <button> elements (e.g. on :hover/:focus),
   which would otherwise bleed into this widget since the question header
   is a real <button> for accessibility/keyboard support. */
.elmc-acc__header,
.elmc-acc__header:hover,
.elmc-acc__header:focus,
.elmc-acc__header:active {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	text-align: left;
	padding: 20px 0;
	margin: 0;
	font: inherit;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
}

.elmc-acc__header:focus-visible {
	outline: 2px solid #6c63ff;
	outline-offset: 2px;
}

.elmc-acc__question {
	flex: 1;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #111827;
	transition: color 0.2s;
}

/* ── Icon ─────────────────────────────────────── */
.elmc-acc__icon {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	color: #6c63ff;
	transition: background 0.25s, color 0.25s, transform 0.3s;
}

/* plus/minus toggle */
.elmc-acc__icon-minus { display: none; }

.elmc-acc__item.is-open .elmc-acc__icon-plus  { display: none; }
.elmc-acc__item.is-open .elmc-acc__icon-minus { display: block; }

/* chevron & arrow rotate on open */
.elmc-acc__icon--chevron svg,
.elmc-acc__icon--arrow svg {
	transition: transform 0.3s ease;
}

.elmc-acc__item.is-open .elmc-acc__icon--chevron svg {
	transform: rotate(90deg);
}

.elmc-acc__item.is-open .elmc-acc__icon--arrow svg {
	transform: rotate(180deg);
}

/* ── Body ─────────────────────────────────────── */
.elmc-acc__body {
	overflow: hidden;
	transition: height var(--elmc-acc-speed) cubic-bezier(0.4,0,0.2,1);
}

.elmc-acc__body[hidden] { display: none; }

.elmc-acc__answer {
	padding-bottom: 20px;
	font-size: 15px;
	line-height: 1.7;
	color: #6b7280;
}

.elmc-acc__answer p { margin: 0 0 10px; }
.elmc-acc__answer p:last-child { margin-bottom: 0; }

/* ════ BORDERED (classic) ════════════════════════ */
.elmc-acc--bordered .elmc-acc__item {
	border-bottom: var(--elmc-divider-width) var(--elmc-divider-style) var(--elmc-divider-color);
}

.elmc-acc--bordered .elmc-acc__item:first-child {
	border-top: var(--elmc-divider-width) var(--elmc-divider-style) var(--elmc-divider-color);
}

/* ════ BOXED (card per item) ═════════════════════ */
.elmc-acc--boxed .elmc-acc__item {
	background: #fff;
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	padding: 0 24px;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.elmc-acc--boxed .elmc-acc__item.is-open {
	border-color: #6c63ff;
	box-shadow: 0 4px 20px rgba(108,99,255,0.1);
}

.elmc-acc--boxed .elmc-acc__header { padding: 20px 0; }
.elmc-acc--boxed .elmc-acc__answer { padding-bottom: 20px; }

/* ════ MINIMAL (line only) ═══════════════════════ */
.elmc-acc--minimal .elmc-acc__item {
	border-bottom: var(--elmc-divider-width) var(--elmc-divider-style) var(--elmc-divider-color);
}

.elmc-acc--minimal .elmc-acc__icon {
	background: none;
}

.elmc-acc--minimal .elmc-acc__item.is-open .elmc-acc__icon {
	background: none;
	color: #6c63ff;
}

/* ── Active state shared ──────────────────────── */
.elmc-acc__item.is-open .elmc-acc__question { color: #6c63ff; }
.elmc-acc__item.is-open .elmc-acc__icon     { background: #6c63ff; color: #fff; }

.elmc-acc--minimal .elmc-acc__item.is-open .elmc-acc__icon {
	background: none;
}

/* ── Icon Left ────────────────────────────────── */
.elmc-acc--icon-left .elmc-acc__header {
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 14px;
}

/* ── Number style ─────────────────────────────── */
.elmc-acc__icon--number {
	font-size: 13px;
	font-weight: 800;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(108,99,255,0.1);
	color: #6c63ff;
	flex-shrink: 0;
}

.elmc-acc__item.is-open .elmc-acc__icon--number {
	background: #6c63ff;
	color: #fff;
}

/* ── Dark Mode ────────────────────────────────── */
.elmc-acc--dark {
	background: #13131f;
	border-radius: 16px;
	padding: 8px 24px;
}

.elmc-acc--dark .elmc-acc__question { color: #f0f0f8; }
.elmc-acc--dark .elmc-acc__answer   { color: #9090b0; }

.elmc-acc--dark .elmc-acc__item {
	border-bottom-color: rgba(255,255,255,0.08);
}

.elmc-acc--dark .elmc-acc__item:first-child {
	border-top-color: rgba(255,255,255,0.08);
}

.elmc-acc--dark.elmc-acc--boxed .elmc-acc__item {
	background: rgba(255,255,255,0.04);
	border-color: rgba(255,255,255,0.08);
}

.elmc-acc--dark.elmc-acc--boxed .elmc-acc__item.is-open {
	border-color: #6c63ff;
	background: rgba(108,99,255,0.07);
}

.elmc-acc--dark .elmc-acc__icon {
	background: rgba(255,255,255,0.08);
	color: #6c63ff;
}

.elmc-acc--dark .elmc-acc__item.is-open .elmc-acc__question { color: #a29bfe; }
