/* Core Accordion: custom toggle icon
----------------------------------------
 * Block: core/accordion (WordPress 6.9+)
 *
 * Swaps core's "+" text glyph for a masked SVG. Appearance only — this file
 * deliberately styles nothing else.
 *
 * Everything behavioural belongs to core and must not be overridden here:
 *
 *   State      The block is driven by the Interactivity API. Core binds
 *              aria-expanded on the toggle, hidden="until-found" on the
 *              panel, and an is-open class on the accordion item, and
 *              implements the autoclose attribute. Directives are processed
 *              server-side, so the initial state is correct before any
 *              JavaScript runs. The theme ships no accordion JavaScript.
 *
 *   Collapse   Core collapses panels with the hidden attribute. Do not
 *              override the panel's display property. Forcing panels to
 *              render keeps collapsed content in the accessibility tree and
 *              the tab order, and defeats hidden="until-found", which is
 *              what lets browser find-in-page open a closed panel.
 *
 *   Rotation   Core rotates this icon 45deg via
 *              .wp-block-accordion-item.is-open > .wp-block-accordion-heading
 *              .wp-block-accordion-heading__toggle-icon
 *              in wp-includes/blocks/accordion-item/style.css, along with a
 *              transform transition wrapped in prefers-reduced-motion. That
 *              selector outweighs anything we could reasonably write here, so
 *              the "+" becomes an "x" on open with no rule of our own.
 */

.wp-block-accordion-heading__toggle-icon {

	/* 1. Layout & Size */
	display: inline-block;
	width: 1.5rem;
	height: 1.5rem;
	vertical-align: middle;

	/* 2. Hide core's "+" text glyph, leaving only the mask */
	font-size: 0 !important;

	/* 3. Color logic — inherit text color */
	background-color: currentColor;

	/* 4. SVG Mask */
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20stroke-width%3D%221.5%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M6%2012H12M18%2012H12M12%2012V6M12%2012V18%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20stroke-width%3D%221.5%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M6%2012H12M18%2012H12M12%2012V6M12%2012V18%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E");

	-webkit-mask-size: contain;
	mask-size: contain;

	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;

	-webkit-mask-position: center;
	mask-position: center;
}

.wp-block-accordion-panel[hidden] {
	display: none;
}