/**
 * Theme-agnostic layout helpers for JOC Blockora Morph blocks.
 * Scoped to Blockora Morph wrappers only — does not restyle the active theme.
 *
 * Parent block width follows WordPress alignment (same as Columns):
 *   .has-global-padding > .alignfull {
 *     margin-inline: calc(var(--wp--style--root--padding-*) * -1);
 *   }
 *   + max-width: none (layout). Width stays auto so negative margins expand
 *   the box into the root padding — do NOT force width/max-width: 100%.
 *
 * Nested (Columns / Group / Cover): fill the parent only.
 * --bm-content-max-width is never touched (inner content / style config).
 */

/*
 * Clip horizontal overflow only on the frontend when a BM alignfull exists.
 * Do not clip the editor block list (hides the between-block “+” inserter).
 */
html:has( .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull ),
html:has( [class*='wp-block-joc-blockora-morph-'].alignfull ),
html:has( .joc-blockora-morph-content.alignfull ) {
	overflow-x: clip;
}

@supports ( scrollbar-gutter: stable ) {
	html:has( .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull ),
	html:has( [class*='wp-block-joc-blockora-morph-'].alignfull ),
	html:has( .joc-blockora-morph-content.alignfull ) {
		scrollbar-gutter: stable;
	}
}

.wp-block[class*='wp-block-joc-blockora-morph-'],
.joc-blockora-morph-content,
[class*='wp-block-joc-blockora-morph-'] {
	box-sizing: border-box;
	max-width: 100%;
}

/*
 * Morph heading scale — scoped to our layouts only (not global page titles).
 * font-size / font-family use !important so themes cannot blow out the layout.
 * line-height is not !important so Fonts-panel inline styles still win.
 */
[class*='wp-block-joc-blockora-morph-'],
.joc-blockora-morph-content,
.bm-preview-root,
.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] {
	--bm-font-h1-size: clamp(2.8125rem, 2.25rem + 2.8125vw, 4.5rem); /* 45→72 */
	--bm-font-h2-size: clamp(2.25rem, 1.833rem + 2.083vw, 3.5rem); /* 36→56 */
	--bm-font-h3-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem); /* 28→40 */
	--bm-font-h4-size: clamp(1.375rem, 1.25rem + 0.625vw, 1.75rem); /* 22→28 */
	--bm-font-h5-size: clamp(1.125rem, 1.042rem + 0.417vw, 1.375rem); /* 18→22 */
	--bm-font-h6-size: clamp(1rem, 0.958rem + 0.208vw, 1.125rem); /* 16→18 */
	--bm-font-h1-lh: 1.1;
	--bm-font-h2-lh: 1.15;
	--bm-font-h3-lh: 1.2;
	--bm-font-h4-lh: 1.25;
	--bm-font-h5-lh: 1.3;
	--bm-font-h6-lh: 1.4;
}

/*
 * Exclude [data-bm-el] headings (card titles, hero header tags, etc.) so
 * element Typography controls / inline vars are not blocked by !important.
 */
.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] :is(h1, h2, h3, h4, h5, h6):not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] :is(h1, h2, h3, h4, h5, h6):not([data-bm-el]),
.joc-blockora-morph-content :is(h1, h2, h3, h4, h5, h6):not([data-bm-el]),
.bm-preview-root :is(h1, h2, h3, h4, h5, h6):not([data-bm-el]) {
	font-family: inherit !important;
	margin-block: 0.35em;
	margin-inline: 0;
	max-width: 100%;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] :is(h1, h2, h3, h4, h5, h6)[data-bm-el],
[class*='wp-block-joc-blockora-morph-'] :is(h1, h2, h3, h4, h5, h6)[data-bm-el],
.joc-blockora-morph-content :is(h1, h2, h3, h4, h5, h6)[data-bm-el],
.bm-preview-root :is(h1, h2, h3, h4, h5, h6)[data-bm-el] {
	margin-block: 0.35em;
	margin-inline: 0;
	max-width: 100%;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] h1:not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] h1:not([data-bm-el]),
.joc-blockora-morph-content h1:not([data-bm-el]),
.bm-preview-root h1:not([data-bm-el]) {
	font-size: var(--bm-font-h1-size) !important;
	line-height: var(--bm-font-h1-lh);
	font-weight: 700;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] h2:not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] h2:not([data-bm-el]),
.joc-blockora-morph-content h2:not([data-bm-el]),
.bm-preview-root h2:not([data-bm-el]) {
	font-size: var(--bm-font-h2-size) !important;
	line-height: var(--bm-font-h2-lh);
	font-weight: 700;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] h3:not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] h3:not([data-bm-el]),
.joc-blockora-morph-content h3:not([data-bm-el]),
.bm-preview-root h3:not([data-bm-el]) {
	font-size: var(--bm-font-h3-size) !important;
	line-height: var(--bm-font-h3-lh);
	font-weight: 700;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] h4:not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] h4:not([data-bm-el]),
.joc-blockora-morph-content h4:not([data-bm-el]),
.bm-preview-root h4:not([data-bm-el]) {
	font-size: var(--bm-font-h4-size) !important;
	line-height: var(--bm-font-h4-lh);
	font-weight: 700;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] h5:not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] h5:not([data-bm-el]),
.joc-blockora-morph-content h5:not([data-bm-el]),
.bm-preview-root h5:not([data-bm-el]) {
	font-size: var(--bm-font-h5-size) !important;
	line-height: var(--bm-font-h5-lh);
	font-weight: 600;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] h6:not([data-bm-el]),
[class*='wp-block-joc-blockora-morph-'] h6:not([data-bm-el]),
.joc-blockora-morph-content h6:not([data-bm-el]),
.bm-preview-root h6:not([data-bm-el]) {
	font-size: var(--bm-font-h6-size) !important;
	line-height: var(--bm-font-h6-lh);
	font-weight: 600;
}

.editor-styles-wrapper [class*='wp-block-joc-blockora-morph-'] [data-bm-el],
[class*='wp-block-joc-blockora-morph-'] [data-bm-el],
.joc-blockora-morph-content [data-bm-el],
.bm-preview-root [data-bm-el] {
	font-family: inherit;
}

/*
 * ── alignfull: match core (uncap + root-padding breakout) ─────────────
 * Core sets max-width: none on .alignfull and:
 *   .has-global-padding > .alignfull { margin-inline: -root-padding }
 * Our earlier max-width:100% / width:100% prevented that expansion.
 */
.wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
[class*='wp-block-joc-blockora-morph-'].alignfull,
.joc-blockora-morph-content.alignfull {
	max-width: none;
}

.has-global-padding > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.has-global-padding > [class*='wp-block-joc-blockora-morph-'].alignfull,
.has-global-padding > .joc-blockora-morph-content.alignfull {
	margin-right: calc( var( --wp--style--root--padding-right ) * -1 );
	margin-left: calc( var( --wp--style--root--padding-left ) * -1 );
}

/*
 * Classic themes / padded content without root-padding vars: 100vw fallback.
 * Skipped when already under .has-global-padding (core path above).
 */
.wp-site-blocks:not( .has-global-padding ) > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.wp-site-blocks:not( .has-global-padding ) > [class*='wp-block-joc-blockora-morph-'].alignfull,
.entry-content:not( .has-global-padding ) > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.entry-content:not( .has-global-padding ) > [class*='wp-block-joc-blockora-morph-'].alignfull,
.wp-block-post-content:not( .has-global-padding ) > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.wp-block-post-content:not( .has-global-padding ) > [class*='wp-block-joc-blockora-morph-'].alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );
	box-sizing: border-box;
}

.wp-site-blocks > .wp-block[class*='wp-block-joc-blockora-morph-'].alignwide,
.wp-site-blocks > [class*='wp-block-joc-blockora-morph-'].alignwide,
.entry-content > .wp-block[class*='wp-block-joc-blockora-morph-'].alignwide,
.entry-content > [class*='wp-block-joc-blockora-morph-'].alignwide,
.is-root-container > .wp-block[class*='wp-block-joc-blockora-morph-'].alignwide,
.is-root-container > [class*='wp-block-joc-blockora-morph-'].alignwide,
.wp-block-post-content > .wp-block[class*='wp-block-joc-blockora-morph-'].alignwide,
.wp-block-post-content > [class*='wp-block-joc-blockora-morph-'].alignwide,
.joc-blockora-morph-content.alignwide {
	width: 100%;
	max-width: var( --wp--style--global--wide-size, min( 100%, 72rem ) );
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

/*
 * ── Nested (direct child of a container only) ─────────────────────────
 * Use `>` — descendant `.wp-block-group …` matches template Groups above
 * post content and zeros the has-global-padding alignfull margins.
 */
.wp-block-column > .wp-block[class*='wp-block-joc-blockora-morph-'],
.wp-block-column > [class*='wp-block-joc-blockora-morph-'],
.wp-block-group > .wp-block[class*='wp-block-joc-blockora-morph-'],
.wp-block-group > [class*='wp-block-joc-blockora-morph-'],
.wp-block-cover__inner-container > .wp-block[class*='wp-block-joc-blockora-morph-'],
.wp-block-cover__inner-container > [class*='wp-block-joc-blockora-morph-'],
.wp-block-media-text__content > .wp-block[class*='wp-block-joc-blockora-morph-'],
.wp-block-media-text__content > [class*='wp-block-joc-blockora-morph-'] {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/*
 * Editor canvas — nested fill parent; top-level alignfull uncapped
 * (Gutenberg data-align=full / .alignfull + same root-padding breakout).
 */
.editor-styles-wrapper .wp-block-column > .wp-block[class*='wp-block-joc-blockora-morph-'],
.editor-styles-wrapper .wp-block-group > .wp-block[class*='wp-block-joc-blockora-morph-'],
.editor-styles-wrapper .wp-block-cover__inner-container > .wp-block[class*='wp-block-joc-blockora-morph-'],
.block-editor-block-list__layout .wp-block-column > .wp-block[class*='wp-block-joc-blockora-morph-'],
.block-editor-block-list__layout .wp-block-group > .wp-block[class*='wp-block-joc-blockora-morph-'] {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.editor-styles-wrapper .is-root-container > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.editor-styles-wrapper .is-root-container > [class*='wp-block-joc-blockora-morph-'].alignfull,
.editor-styles-wrapper .is-root-container > .wp-block[data-align='full'] > [class*='wp-block-joc-blockora-morph-'],
.block-editor-block-list__layout.is-root-container > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.block-editor-block-list__layout.is-root-container > [class*='wp-block-joc-blockora-morph-'].alignfull,
.block-editor-block-list__layout.is-root-container > .wp-block[data-align='full'] > [class*='wp-block-joc-blockora-morph-'] {
	max-width: none;
	width: auto;
}

.editor-styles-wrapper.has-global-padding > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.editor-styles-wrapper.has-global-padding > [class*='wp-block-joc-blockora-morph-'].alignfull,
.editor-styles-wrapper .has-global-padding > .wp-block[class*='wp-block-joc-blockora-morph-'].alignfull,
.editor-styles-wrapper .has-global-padding > [class*='wp-block-joc-blockora-morph-'].alignfull,
.editor-styles-wrapper .has-global-padding > .wp-block[data-align='full'],
.editor-styles-wrapper .is-root-container.has-global-padding > .wp-block[data-align='full'] {
	margin-right: calc( var( --wp--style--root--padding-right ) * -1 );
	margin-left: calc( var( --wp--style--root--padding-left ) * -1 );
}

/*
 * Block themes add flow spacing on constrained children — neutralize for
 * top-level BM blocks (not the editor block list).
 */
.is-layout-constrained > .wp-block[class*='wp-block-joc-blockora-morph-'],
.is-layout-constrained > [class*='wp-block-joc-blockora-morph-'],
.is-layout-constrained > .joc-blockora-morph-content,
.is-layout-flow > .wp-block[class*='wp-block-joc-blockora-morph-'],
.is-layout-flow > [class*='wp-block-joc-blockora-morph-'],
.is-layout-flow > .joc-blockora-morph-content,
.wp-site-blocks > .wp-block[class*='wp-block-joc-blockora-morph-'],
.wp-site-blocks > [class*='wp-block-joc-blockora-morph-'],
.wp-site-blocks > .joc-blockora-morph-content {
	margin-block-start: 0;
	margin-block-end: 0;
}

.editor-styles-wrapper .block-editor-block-list__insertion-point,
.block-editor-block-list__insertion-point,
.block-editor-block-list__insertion-point-inserter,
.block-editor-block-list__block .block-list-appender {
	z-index: 60 !important;
}

.editor-styles-wrapper .block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle,
.block-editor-block-list__insertion-point-inserter .block-editor-inserter__toggle {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

/*
 * Hero overlay / video — keep layout in CSS.
 * Frontend output runs through wp_kses, which strips `inset` (not in
 * safe_style_css). Without top/right/bottom/left the overlay collapses to 0×0.
 *
 * Root .bm-hero uses overflow:visible so button box-shadows are not clipped
 * (inline overflow:hidden on older saved markup is overridden here).
 * Video/overlay keep matching border-radius so fullscreen media still rounds.
 */
.bm-hero {
	overflow: visible !important;
}

.bm-hero__video {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	border-top-left-radius: var(--bm-border-top-left-radius, var(--bm-border-radius, 0px));
	border-top-right-radius: var(--bm-border-top-right-radius, var(--bm-border-radius, 0px));
	border-bottom-right-radius: var(--bm-border-bottom-right-radius, var(--bm-border-radius, 0px));
	border-bottom-left-radius: var(--bm-border-bottom-left-radius, var(--bm-border-radius, 0px));
}

.bm-hero__overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	background: var(--bm-overlay, transparent);
	pointer-events: none;
	border-top-left-radius: var(--bm-border-top-left-radius, var(--bm-border-radius, 0px));
	border-top-right-radius: var(--bm-border-top-right-radius, var(--bm-border-radius, 0px));
	border-bottom-right-radius: var(--bm-border-bottom-right-radius, var(--bm-border-radius, 0px));
	border-bottom-left-radius: var(--bm-border-bottom-left-radius, var(--bm-border-radius, 0px));
}

.bm-hero__inner,
.bm-hero__grid {
	position: relative;
	z-index: 2;
}

/* Hero / block CTA buttons with optional dashicons. */
.bm-hero__btn,
.bm-hero__btn .bm-hero__btn-label {
	box-sizing: border-box;
}

.bm-hero__btn .bm-hero__btn-icon.dashicons {
	/* Size via font-size; keep a 1em box so the :before glyph paints. */
	width: 1em !important;
	height: 1em !important;
	font-size: 20px;
	line-height: 1;
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
	speak: never;
}

/* SVG sprite / Lucide inline icons. */
.bm-icon.bm-icon--svg,
.bm-hero__btn .bm-hero__btn-icon.bm-icon--svg,
.bm-button__icon.bm-icon--svg {
	display: inline-block;
	vertical-align: -0.125em;
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	fill: none !important;
	stroke: currentColor;
	overflow: visible;
}

.bm-icon.bm-icon--svg *,
.bm-hero__btn .bm-hero__btn-icon.bm-icon--svg *,
.bm-button__icon.bm-icon--svg * {
	fill: none !important;
}

.bm-icon.bm-icon--svg use {
	pointer-events: none;
}

/* Placeholder while editor fetches Lucide SVG via REST. */
.bm-icon.bm-icon--pending {
	width: 1em;
	height: 1em;
	display: inline-block;
	vertical-align: -0.125em;
	flex-shrink: 0;
	opacity: 0;
}

.bm-hero__btn .bm-hero__btn-label {
	display: inline-block;
	line-height: 1.2;
}

/* Hero logo / button rows follow Content alignment. */
.bm-hero__logos,
.bm-hero__buttons {
	box-sizing: border-box;
	justify-content: var(--bm-justify-content, var(--bm-align-items, flex-start));
}

.bm-hero__logo {
	box-sizing: border-box;
	flex: 0 0 auto;
}

/* WordPress oEmbed media (YouTube, Vimeo, etc.) inside the media frame */
.bm-media-frame {
	display: block;
	width: var(--bm-mf-img-width, var(--bm-image-width, 100%));
	max-width: 100%;
	margin-left: var(--bm-mf-media-margin-start, var(--bm-media-margin-inline-start, 0));
	margin-right: var(--bm-mf-media-margin-end, var(--bm-media-margin-inline-end, 0));
	box-sizing: border-box;
	line-height: 0;
}

.bm-media-frame > img,
.bm-media-frame > video,
.bm-media-frame > .bm-hero__embed {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.bm-hero__embed,
.bm-hero__embed.wp-block-embed {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	line-height: 0;
	overflow: hidden;
	aspect-ratio: auto;
	height: auto;
}

/* Pass-through — classic padding-bottom ratio shell owns the box. */
.bm-hero__embed .wp-block-embed__wrapper {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	line-height: 0;
	overflow: hidden;
	box-sizing: border-box;
	aspect-ratio: auto;
}

.bm-hero__embed .bm-embed-ratio,
.bm-hero__embed .wp-block-embed__wrapper > div[style*="padding-bottom"] {
	display: block;
	box-sizing: border-box;
	max-width: 100%;
}

.bm-hero__embed .bm-embed-ratio iframe,
.bm-hero__embed .wp-block-embed__wrapper > div[style*="padding-bottom"] iframe,
.bm-media-frame .bm-hero__embed iframe,
.bm-media-frame .bm-hero__embed embed,
.bm-media-frame .bm-hero__embed object {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	min-height: 0 !important;
	aspect-ratio: auto !important;
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: unset !important;
}

/* Tabs — burger icon (visible when Responsive menu is on at tablet/below) */
.bm-tabs__menu-toggle {
	width: var(--bm-tab-burger-toggle, 2.5rem);
	height: var(--bm-tab-burger-toggle, 2.5rem);
}

.bm-tabs__burger {
	position: relative;
	display: block;
	width: var(--bm-tab-burger-width, 1.25rem);
	height: var(--bm-tab-burger-bar, 2px);
	background: var(--bm-tab-burger-color, #4b5563);
	border-radius: 1px;
	transition: background 0.2s ease;
}

.bm-tabs__burger::before,
.bm-tabs__burger::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: var(--bm-tab-burger-bar, 2px);
	background: var(--bm-tab-burger-color, #4b5563);
	border-radius: 1px;
	transition: transform 0.25s ease;
}

.bm-tabs__burger::before {
	top: calc(-1 * var(--bm-tab-burger-gap, 6px));
}

.bm-tabs__burger::after {
	top: var(--bm-tab-burger-gap, 6px);
}

.bm-tabs__menu-toggle:hover {
	background: rgba(0, 0, 0, 0.04);
}

.bm-tabs__menu-toggle:focus-visible {
	outline: 2px solid var(--bm-tab-active-color, #3525cd);
	outline-offset: 2px;
}

/* Tab / accordion title icons (display baked via {{titleIconDisplay}} inline) */
.bm-tabs__label {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
}

.bm-tabs__icon,
.bm-accordion__icon {
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	line-height: 0;
	color: inherit;
}

.bm-tabs__icon:empty,
.bm-accordion__icon:empty {
	display: none !important;
}

.bm-tabs__icon .bm-card__icon,
.bm-accordion__icon .bm-card__icon,
.bm-tabs__icon .dashicons,
.bm-accordion__icon .dashicons {
	width: 1em;
	height: 1em;
	font-size: inherit;
	line-height: 1;
}

.bm-tabs__label-text,
.bm-accordion__title-text {
	min-width: 0;
}

.bm-accordion__title-text {
	flex: 1 1 auto;
}

/* Accordion — restore a caret after list-style:none on <summary> */
.bm-accordion__title {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	position: relative;
	box-sizing: border-box;
	outline: none;
}

.bm-accordion__title:focus,
.bm-accordion__title:focus-visible,
.bm-accordion__title:active {
	outline: none;
	box-shadow: none;
}

.bm-accordion__title::-webkit-details-marker {
	display: none;
}

/* Expand/collapse indicator — selectable host (not title::after). */
.bm-accordion__arrow {
	display: var(--bm-accordion-arrow-display, inline-flex);
	flex: 0 0 auto;
	align-self: center;
	align-items: center;
	justify-content: center;
	order: var(--bm-accordion-arrow-order, 0);
	margin-left: var(--bm-accordion-arrow-ml, auto);
	margin-right: var(--bm-accordion-arrow-mr, 0);
	position: relative;
	box-sizing: border-box;
	color: var(--bm-accordionArrow-color, currentColor);
	background: var(--bm-accordionArrow-bg, transparent);
	padding: 0 !important;
	width: var(--bm-accordion-arrow-box-size, 2rem);
	height: var(--bm-accordion-arrow-box-size, 2rem);
	aspect-ratio: 1 / 1;
	font-size: var(--bm-accordion-arrow-font-size, 1rem);
	line-height: 0;
}

.bm-accordion__arrow::after {
	content: "";
	display: block;
	flex: 0 0 auto;
	width: var(--bm-accordion-arrow-width, 0.45rem);
	height: var(--bm-accordion-arrow-height, 0.45rem);
	border-right: var(--bm-accordion-arrow-border, 2px) solid currentColor;
	border-bottom: var(--bm-accordion-arrow-border, 2px) solid currentColor;
	/*
	 * The right/bottom-border caret is not optically symmetrical after rotation.
	 * Tune each direction independently against the fixed square host.
	 */
	transform: translateY(var(--bm-accordion-arrow-closed-offset, -15%))
		rotate(45deg);
	transform-origin: center;
	transition: transform 0.2s ease;
	opacity: 0.7;
}

.bm-accordion__item[open] > .bm-accordion__title .bm-accordion__arrow::after {
	transform: translateY(var(--bm-accordion-arrow-open-offset, 45%))
		rotate(225deg);
}

/*
 * Glyphs are clamped to the square host: ligature icon fonts default to 24px
 * and would otherwise grow the row when the open icon swaps in.
 */
.bm-accordion__arrow-icon {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	line-height: 1;
}

.bm-accordion__arrow-icon > * {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	font-size: 1em;
	line-height: 1;
}

/* Icon fonts pin their own glyph size on ::before; keep it on the em grid. */
.bm-accordion__arrow .bm-accordion__arrow-icon > *::before,
.bm-accordion__arrow .bm-accordion__arrow-icon > *::after {
	font-size: inherit;
	line-height: 1;
	width: auto;
	height: auto;
}

/* Custom open/closed icons — hide caret and disable rotate. */
.bm-accordion--arrow-custom .bm-accordion__arrow::after,
.bm-accordion--arrow-style-custom .bm-accordion__arrow::after {
	content: none;
	display: none !important;
	transform: none !important;
}

.bm-accordion--arrow-custom .bm-accordion__arrow-icon--closed,
.bm-accordion--arrow-style-custom .bm-accordion__arrow-icon--closed {
	display: inline-flex;
}

.bm-accordion--arrow-custom
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow-icon--closed,
.bm-accordion--arrow-style-custom
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow-icon--closed {
	display: none;
}

.bm-accordion--arrow-custom
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow-icon--open,
.bm-accordion--arrow-style-custom
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow-icon--open {
	display: inline-flex;
}

/* Shared whole-pixel geometry for the plus-based built-in indicators. */
.bm-accordion--arrow-style-plus-minus .bm-accordion__arrow::before,
.bm-accordion--arrow-style-plus-minus .bm-accordion__arrow::after,
.bm-accordion--arrow-style-plus-close .bm-accordion__arrow::before,
.bm-accordion--arrow-style-plus-close .bm-accordion__arrow::after {
	content: "";
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	/*
	 * !important defeats the per-block caret sizing that older generated
	 * stylesheets still emit for non-default arrow sizes.
	 */
	border: none !important;
	border-radius: 1px;
	background: currentColor;
	opacity: 0.85;
	transform-origin: center;
	transition: transform 0.28s ease, opacity 0.2s ease;
}

/*
 * Whole-pixel bar lengths and stroke keep the centered geometry off
 * half-pixels, which is what made the smaller sizes look blurry.
 */
.bm-accordion--arrow-style-plus-minus .bm-accordion__arrow::before,
.bm-accordion--arrow-style-plus-close .bm-accordion__arrow::before {
	/* Horizontal bar. */
	width: var(--bm-accordion-plus-minus-size, 10px) !important;
	height: var(--bm-accordion-plus-minus-stroke, 2px) !important;
	transform: translate(-50%, -50%);
}

.bm-accordion--arrow-style-plus-minus .bm-accordion__arrow::after,
.bm-accordion--arrow-style-plus-close .bm-accordion__arrow::after {
	/* Vertical bar. */
	width: var(--bm-accordion-plus-minus-stroke, 2px) !important;
	height: var(--bm-accordion-plus-minus-size, 10px) !important;
	transform: translate(-50%, -50%) rotate(0deg);
}

/* Plus → Minus: fold the vertical bar onto the horizontal bar. */
.bm-accordion--arrow-style-plus-minus
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow::after {
	transform: translate(-50%, -50%) rotate(90deg);
	margin-top: 0;
}

/* Plus → Close (X): rotate both perpendicular bars together by 45 degrees. */
.bm-accordion--arrow-style-plus-close
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow::before,
.bm-accordion--arrow-style-plus-close
	.bm-accordion__item[open]
	> .bm-accordion__title
	.bm-accordion__arrow::after {
	transform: translate(-50%, -50%) rotate(45deg);
	margin-top: 0;
}

.bm-accordion--arrow-style-plus-minus .bm-accordion__arrow-icon,
.bm-accordion--arrow-style-plus-close .bm-accordion__arrow-icon {
	display: none !important;
}

/* Square-cornered title/content backgrounds must not bleed past the item radius. */
.bm-accordion__item {
	overflow: hidden;
}

/*
 * General → Surface shapes only the outside corners of the accordion stack.
 * Empty / unset values fall through to Card Surface (--bm-item-border-*).
 * Explicit 0 stays sharp.
 */
.bm-accordion__list > .bm-accordion__item:first-child {
	border-top-left-radius: var(
		--bm-border-top-left-radius,
		var(--bm-item-border-top-left-radius, var(--bm-item-border-radius, 8px))
	) !important;
	border-top-right-radius: var(
		--bm-border-top-right-radius,
		var(--bm-item-border-top-right-radius, var(--bm-item-border-radius, 8px))
	) !important;
}

.bm-accordion__list > .bm-accordion__item:last-child {
	border-bottom-right-radius: var(
		--bm-border-bottom-right-radius,
		var(
			--bm-item-border-bottom-right-radius,
			var(--bm-item-border-radius, 8px)
		)
	) !important;
	border-bottom-left-radius: var(
		--bm-border-bottom-left-radius,
		var(
			--bm-item-border-bottom-left-radius,
			var(--bm-item-border-radius, 8px)
		)
	) !important;
}

/* Title separator — only when the item is expanded */
.bm-accordion__item > .bm-accordion__title {
	border-bottom-width: 0;
	border-bottom-style: solid;
	border-bottom-color: transparent;
}

.bm-accordion__item[open] > .bm-accordion__title {
	border-bottom-style: var(--bm-accordionTitle-border-style, solid);
	border-bottom-color: var(--bm-accordionTitle-border-color, transparent);
	border-bottom-width: var(
		--bm-accordionTitle-border-bottom-width,
		var(--bm-accordionTitle-border-width, 0)
	);
}

/*
 * Inline rich content disallows <p>/<div> (unwraps to <br>). Theme editor styles
 * still add default paragraph margins when legacy defaults include <p>, which
 * stacks with panel padding and looks like extra spacing on inactive tabs.
 */
.bm-tabs__panel > p,
.bm-tabs__content > p,
.bm-accordion__content > p,
.bm-card__description > p {
	margin-top: 0;
	margin-bottom: 0;
}

.bm-tabs__panel > p + p,
.bm-tabs__content > p + p,
.bm-accordion__content > p + p,
.bm-card__description > p + p {
	margin-top: 0.75em;
}

/* Hide empty button rows so accordion/tabs keep normal content padding. */
.bm-accordion__buttons:not(:has([data-bm-btn-index])),
.bm-tabs__buttons:not(:has([data-bm-btn-index])) {
	display: none !important;
}

.bm-accordion__item:has(.bm-accordion__buttons [data-bm-btn-index]) .bm-accordion__content {
	padding-bottom: 0 !important;
}

/*
 * Pricing features checklist — ✓ via ::before so Enter/new <li> always shows a check.
 */
.bm-pricing__features {
	list-style: none;
}

.bm-pricing__features > li {
	position: relative;
	box-sizing: border-box;
	width: fit-content;
	max-width: 100%;
	padding-left: 1.25em;
}

.bm-pricing__features > li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--bm-features-check-color, var(--bm-tag-color, #3525cd));
	font-weight: 600;
	line-height: inherit;
}
