/**
 * VM Accordion Block
 */

/* ─── Block wrapper ─────────────────────────────────────────────── */
.vm-accordion-block {
	container-type: inline-size;
	width: 100vw;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	display: flex;
	justify-content: center;
	align-items: center;

	padding: clamp(40px, 9vw, 100px) 30px;
}


/* When a background colour is set via the block editor, add breathing
   room and round the corners automatically */
.vm-accordion-block.has-background {
	border-radius: var(--vm-radius-lg, 0.5rem);
}

.vm-accordion-container{
	max-width: 800px;
	width: 100%;
	margin: 0 auto;
}
/* ─── Block heading ─────────────────────────────────────────────── */

.vm-accordion__heading {
	font-family: var(--font-serif);
	font-weight: 500;
	line-height: 1.2;
	margin: 0 0 var(--wp--preset--spacing--large);
	text-align: center;
	color: var(--wp--preset--color--accent);
}

/* ─── List reset ────────────────────────────────────────────────── */
.vm-accordion {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ─── Individual item ───────────────────────────────────────────── */
.vm-accordion__item {
	border-bottom: 1px solid var(--wp--preset--color--contrast, #e2e2e2);
	background: var(--wp--preset--color--white);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(28, 26, 23, 0.06);
}

.vm-accordion__header{
	width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.3s;
}



/* ─── Trigger button ────────────────────────────────────────────── */
.vm-accordion__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 20px 24px;
	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-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	flex: 1;
}

@media (max-width: 599px) {
	.vm-accordion__title{
		font-size: 16px;
	}
}

/* ─── 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;

	width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp--preset--color--accent);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

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

/* ─── 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;
    padding: 0 24px 20px;
}

.vm-accordion__content ul li{
	margin-left: 30px;
}

.vm-accordion__content ul{
	margin-bottom: 20px;
}_

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

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

.vm-accordion__content a{
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

@media (max-width: 599px) {
	.vm-accordion__content{
		font-size: 14px;
	}
}

/* ─── 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;
	}
}
