/**
 * VM Accordion Block
 */

/* ─── Block wrapper ─────────────────────────────────────────────── */
.vm-cb-main.vm-accordion-block {
	container-type: inline-size;
	margin-inline: auto;
	width: 100%;

	max-width: unset !important;
	width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-inline: auto;
}

/* ─── List reset ────────────────────────────────────────────────── */
.vm-accordion {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--contrast, #e2e2e2);
}

/* ─── Individual item ───────────────────────────────────────────── */
.vm-accordion__item {
	border-bottom: 1px solid var(--wp--preset--color--teal-ink); 
}

.vm-accordion__item .vm-accordion__title {
	font-size: 20px;
	font-weight: 900;
	flex: 1;
} 

/* ─── Trigger button ────────────────────────────────────────────── */
.vm-accordion__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	padding: 1.25rem 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

.vm-accordion__trigger:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, currentColor);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ─── Title text ────────────────────────────────────────────────── */
.vm-accordion-title {
	font-family: var(--wp--preset--font-family--zilla-slab, Georgia, serif);
	text-align: center;
	font-weight: 600;
	flex: 1;
}

/* ─── Chevron icon ──────────────────────────────────────────────── */
.vm-accordion__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	color: var(--wp--preset--color--primary, currentColor);
	transition: transform 0.3s ease;
}

/* Rotate chevron to point up when open */
.vm-accordion__item.is-open .vm-accordion__icon {
	transform: rotate( 180deg );
}

/* ─── Panel (the collapsible container) ─────────────────────────── */
.vm-accordion__panel {
	overflow: hidden;
	height: 0;
	transition: height 0.35s ease;
	/* margin reset for <dd> */
	margin: 0;
	padding: 0;
}

/* ─── Inner content wrapper ─────────────────────────────────────── */
.vm-accordion__content {
	padding: 0 0 1.25rem;
}

.vm-accordion__content > *:first-child {
	margin-top: 0;
}

.vm-accordion__content > *:last-child {
	margin-bottom: 0;
}

/* ─── Editor placeholder ─────────────────────────────────────────── */
.vm-accordion__placeholder {
	padding: 1rem;
	background: #f9f9f9;
	border: 1px dashed #ccc;
	color: #888;
	font-style: italic;
	border-radius: 4px;
}

/* ─── Reduced motion ─────────────────────────────────────────────── */
@media ( prefers-reduced-motion: reduce ) {
	.vm-accordion__panel {
		transition: none;
	}

	.vm-accordion__icon {
		transition: none;
	}
}
