details > summary {
	list-style: none;
}

details > summary::-webkit-details-marker {
	display: none;
}

.details > .content-wrapper {
	overflow: hidden;
	display: grid;
	/* intentionally independent from .animation as Safari 16
    would otherwise ignore the expansion animation. */
	animation-duration: 0.2s;
}

.details > .animation {
	animation-name: grid-expand;
	animation-timing-function: ease-out;
}

.details > .collapsing {
	animation-direction: reverse;
	animation-timing-function: ease-in;
}

.details > .content-wrapper > div {
	min-height: 0;
}

@keyframes grid-expand {
	0% {
		grid-template-rows: 0fr;
	}
	100% {
		grid-template-rows: 1fr;
	}
}

.block--accordion .details {
	padding: 20px 0;
	border-bottom: 1px solid var(--wp--preset--color--ink);
}

.block--accordion .details summary {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 32px;
	cursor: pointer;
}

.details-summary-content {
	display: flex;
	align-items: center;
	gap: 12px;
}

.block--accordion .details summary svg {
	transform: rotate(0deg);
	transition: transform 0.3s ease;
	height: 48px;
	width: 48px;
}

.block--accordion .details[open] summary svg {
	transform: rotate(90deg);
}

.block--accordion .details[open] {
	border-bottom: 1px solid var(--wp--preset--color--mid-green);
	position: relative;
}

.block--accordion .details[open]::after {
	border-bottom: 1px solid var(--wp--preset--color--mid-green);
	content: '';
	display: block;
	width: 100%;
	height: 1px;
	bottom: 0px;
	left: 0;
	position: absolute;
	background-color: var(--wp--preset--color--mid-green);
}

.block--accordion .details .inner {
	padding-top: 16px;
}

.block--accordion .details h4 {
	margin-bottom: 0;
}

:where(.editor-styles-wrapper) .block--accordion .details h3 {
	margin: 0;
}
