.crispycohd-accordion {
    --crispycohd-duration: 300ms;
}

.crispycohd-accordion .crispycohd-accordion-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Remove click/focus outline on the header */
.crispycohd-accordion .crispycohd-accordion-header:focus,
.crispycohd-accordion .crispycohd-accordion-header:focus-visible {
    outline: none;
    box-shadow: none;
}

.crispycohd-accordion .crispycohd-accordion-content {
    overflow: hidden;
    height: 0;
}

/* The open/close height is controlled by JS. */

/* Fade mode handled via JS opacity */

.crispycohd-accordion-divider {
    margin: 0;
    border: none;
    border-top: 1px solid var(--wp--preset--color--contrast-3, #ddd);
}

/* Hide the separator when the toggle is off */
.wp-block-crispycohd-advanced-accordion[data-show-divider="false"] .crispycohd-accordion-divider {
    display: none;
}

/* 1) Hide the plugin's default caret/icon (svg or img) */
.wp-block-crispycohd-advanced-accordion .crispycohd-accordion-icon > * {
	display: none !important;
}

/* 2) Base icon element */
.wp-block-crispycohd-advanced-accordion .crispycohd-accordion-icon {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	width: .9em;
	height: .9em;
	display: inline-block;
	text-align: center;
	line-height: 1;
	font-weight: 400;
	font-size: 1.25em;
}

/* Make room for the absolutely-positioned icon */
.wp-block-crispycohd-advanced-accordion .crispycohd-accordion-header {
	position: relative;
	padding-right: 2.25em;
}

/* Caret on the left */
.wp-block-crispycohd-advanced-accordion.crispycohd-accordion--caret-left .crispycohd-accordion-header {
	padding-right: 0;
	padding-left: 2.25em;
}

.wp-block-crispycohd-advanced-accordion.crispycohd-accordion--caret-left .crispycohd-accordion-icon {
	right: auto;
	left: 0;
}

/* Shared pseudo-element surface */
.wp-block-crispycohd-advanced-accordion .crispycohd-accordion-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* 3) Collapsed state = plus (inline SVG, stroke=currentColor) */
.wp-block-crispycohd-advanced-accordion:not(.is-open) .crispycohd-accordion-icon::before {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'><path d='M8 2v12M2 8h12'/></svg>");
}

/* 4) Open state = minus (inline SVG, stroke=currentColor) */
.wp-block-crispycohd-advanced-accordion.is-open .crispycohd-accordion-icon::before {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'><path d='M2 8h12'/></svg>");
}
