.bm-field {
	--bm-f-primary: #3525cd;
	--bm-f-surface: #faf8ff;
	--bm-f-surface-low: #f2f3ff;
	--bm-f-surface-container: #eaedff;
	--bm-f-surface-high: #e2e7ff;
	--bm-f-on-surface: #131b2e;
	--bm-f-on-surface-variant: #464555;
	--bm-f-outline: #c7c4d8;
	--bm-f-danger: #ba1a1a;
	margin-bottom: 1rem;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.bm-link-field__preview {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--bm-f-outline);
	border-radius: 10px;
	background: var(--bm-f-surface);
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bm-link-field__preview:hover {
	border-color: var(--bm-f-primary);
	box-shadow: 0 2px 10px color-mix(in srgb, var(--bm-f-primary) 10%, transparent);
}

.bm-link-field__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--bm-f-surface-container);
	color: var(--bm-f-primary);
	font-size: 16px;
	width: 32px;
	height: 32px;
}

.bm-link-field__icon.dashicons {
	width: 32px;
	height: 32px;
	line-height: 32px;
	text-align: center;
	font-size: 16px;
}

.bm-link-field__meta {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	flex: 1;
}

.bm-link-field__title {
	font-size: 13px;
	font-weight: 600;
	color: var(--bm-f-on-surface);
	line-height: 1.3;
}

.bm-link-field__url {
	font-size: 12px;
	color: var(--bm-f-on-surface-variant);
	word-break: break-all;
	line-height: 1.35;
}

.bm-link-field__badge {
	display: inline-flex;
	align-self: flex-start;
	margin-top: 2px;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--bm-f-surface-high);
	color: var(--bm-f-primary);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.bm-link-field__actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.bm-link-field__edit {
	border-radius: 8px !important;
}

.bm-link-field__add {
	width: 100%;
	justify-content: center !important;
	min-height: 40px !important;
	border-radius: 10px !important;
	border-style: dashed !important;
	border-color: var(--bm-f-outline) !important;
	color: var(--bm-f-primary) !important;
	background: var(--bm-f-surface-low) !important;
}

.bm-link-field__add:hover {
	border-color: var(--bm-f-primary) !important;
	background: var(--bm-f-surface-container) !important;
}

.bm-link-field__popover {
	min-width: 320px;
	padding: 8px;
}

.bm-link-field__popover-footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.bm-link-field__fallback {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.bm-link-field__check,
.bm-link-editor__check {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 13px;
	color: var(--bm-f-on-surface);
	cursor: pointer;
}

.bm-link-editor {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	min-width: 260px;
}

.bm-link-editor--compact {
	min-width: 240px;
	gap: 0.5rem;
}

.bm-link-editor__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
}

.bm-link-editor__label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant);
}

.bm-link-editor__input {
	width: 100%;
	margin: 0 !important;
}

.bm-link-editor__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.15rem;
}

.bm-link-editor__actions-end {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-left: auto;
}

.bm-format-toolbar__link-panel {
	padding: 0.15rem;
}

.bm-media-field {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 0;
}

.bm-media-field > .bm-field-label {
	margin-bottom: 0;
}

.bm-media-field__type {
	margin: 0;
}

.bm-media-field__empty {
	display: flex;
	align-items: center;
}

.bm-media-field__picker {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 72px;
	min-width: 0;
	max-width: 100%;
	padding: 8px;
	border: 1px solid var(--bm-f-outline, #c7c4d8);
	border-radius: 10px;
	background: var(--bm-f-surface, #faf8ff);
	box-sizing: border-box;
	box-shadow: 0 1px 2px rgba(19, 27, 46, 0.04);
}

.bm-media-field__thumb {
	display: block;
	flex: 0 0 72px;
	width: 72px !important;
	height: 72px !important;
	min-width: 72px !important;
	min-height: 72px !important;
	max-width: 72px !important;
	max-height: 72px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--bm-f-outline, #c7c4d8) !important;
	border-radius: 8px !important;
	overflow: hidden;
	background: var(--bm-f-surface-high, #e2e7ff) !important;
	background-image: none !important;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none !important;
	line-height: 0 !important;
}

.bm-media-field__thumb:hover,
.bm-media-field__thumb:focus-visible {
	border-color: var(--bm-f-primary, #3525cd);
	outline: 2px solid color-mix(in srgb, var(--bm-f-primary, #3525cd) 35%, transparent);
	outline-offset: 1px;
}

.bm-media-field__thumb img,
.bm-media-field__thumb video,
.bm-media-field__thumb iframe {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	pointer-events: none;
}

.bm-media-field__thumb--iframe {
	cursor: default;
	pointer-events: none;
}

.bm-media-field__thumb--oembed {
	overflow: hidden;
	background: #0f1117;
}

.bm-media-field__oembed {
	width: 100%;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
}

.bm-media-field__oembed iframe,
.bm-media-field__oembed embed,
.bm-media-field__oembed object {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	border: 0 !important;
}

.bm-media-field__embed-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 0.75rem;
}

.bm-media-field__embed-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.bm-media-field__embed-status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0.35rem 0 0.75rem;
	font-size: 12px;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-media-field__embed-error {
	margin: 0.25rem 0 0.75rem;
	font-size: 12px;
	line-height: 1.4;
	color: #b32d2e;
}

.bm-media-field__embed-url {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 11px;
	line-height: 1.35;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-media-field__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--bm-f-on-surface-variant, #464555);
	background: var(--bm-f-surface-high, #e2e7ff) !important;
}

.bm-media-field__thumb--empty .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	line-height: 1;
	opacity: 0.55;
}

.bm-media-field__thumb--iframe iframe {
	transform: scale(0.35);
	transform-origin: top left;
	width: 286%;
	height: 286%;
}

.bm-media-field__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
	margin-left: auto;
	text-align: right;
}

.bm-media-field__side-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #464555);
	line-height: 1.2;
}

.bm-media-field__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 4px 8px;
}

.bm-media-field__actions .components-button {
	height: auto !important;
	min-height: 28px !important;
	padding: 4px 10px !important;
}

.bm-media-field__alt,
.bm-media-field .components-base-control {
	margin-bottom: 0 !important;
}

.bm-media-field__preview {
	max-width: 100%;
	border-radius: 10px;
	overflow: hidden;
	background: var(--bm-f-surface-high, #e2e7ff);
	border: 1px solid var(--bm-f-outline, #c7c4d8);
}

.bm-media-field__preview img,
.bm-media-field__preview video,
.bm-media-field__preview iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border: 0;
}

.bm-media-field__preview--iframe {
	aspect-ratio: 16 / 9;
}

.bm-media-field__preview--iframe iframe {
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
}

/* Visibility head + field stack more tightly inside inspector cards. */
.bm-inspector-card .bm-field-wrap--visibility {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 0;
}

.bm-inspector-card .bm-field-visibility-head {
	margin-bottom: 0;
}

.bm-order-field__hint,
.bm-repeater__hint {
	margin: 0 0 0.75rem;
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--bm-f-surface-container, #eaedff);
	color: var(--bm-f-on-surface-variant, #464555);
	font-size: 12px;
	line-height: 1.4;
}

.bm-order-field__notice {
	margin: 0 0 0.75rem !important;
}

.bm-order-field__list {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.bm-order-field__list .bm-drop-slot {
	--bm-ed-primary: var(--bm-f-primary, #3525cd);
}

.bm-order-field__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 42px;
	margin: 3px 0;
	padding: 10px 12px;
	border: 1px solid var(--bm-f-outline, #c7c4d8);
	border-radius: 10px;
	background: var(--bm-f-surface, #faf8ff);
	cursor: grab;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease,
		opacity 0.12s ease,
		background 0.15s ease,
		transform 0.15s ease;
}

.bm-order-field__item:hover {
	border-color: var(--bm-f-primary, #3525cd);
	background: var(--bm-f-surface-low, #f2f3ff);
	box-shadow: 0 2px 10px color-mix(in srgb, var(--bm-f-primary, #3525cd) 12%, transparent);
}

.bm-order-field__item:active {
	cursor: grabbing;
}

.bm-order-field__item.is-dragging {
	opacity: 0.45;
	transform: scale(0.99);
}

.bm-order-field__item.is-drop-target {
	border-color: var(--bm-f-primary, #3525cd);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--bm-f-primary, #3525cd) 18%, transparent);
}

.bm-order-field__index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 7px;
	background: var(--bm-f-primary, #3525cd);
	color: #fff !important;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.bm-order-field__handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--bm-f-on-surface-variant, #777587);
	line-height: 1;
	user-select: none;
	cursor: grab;
}

.bm-order-field__handle .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 1;
	opacity: 0.7;
}

.bm-order-field__item:hover .bm-order-field__handle .dashicons {
	opacity: 1;
	color: var(--bm-f-primary, #3525cd);
}

.bm-order-field__name {
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	color: var(--bm-f-on-surface, #131b2e);
	text-transform: capitalize;
	min-width: 0;
}

.bm-order-field__actions {
	display: flex;
	align-items: center;
	gap: 0.1rem;
	flex-shrink: 0;
}

.bm-field-wrap--visibility {
	margin-bottom: 1rem;
	min-width: 0;
	max-width: 100%;
}

.bm-field-visibility-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	min-width: 0;
	max-width: 100%;
}

.bm-field-visibility-head__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-field-visibility-head__toggle {
	margin: 0 !important;
}

.bm-field-visibility-head__toggle .components-base-control__field {
	margin-bottom: 0 !important;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bm-field-visibility-head__toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-field-visibility-head__toggle-label .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 1;
}

.bm-field-visibility-head__toggle-bp {
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

.bm-field-visibility-head__toggle.is-hidden .bm-field-visibility-head__toggle-label {
	color: var(--bm-f-error, #b3261e);
}

.bm-field-visibility-head__actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

/* Compact HTML tag picker (beside Shown). */
.bm-tag-field--compact {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
}

.bm-tag-field__toggle {
	min-height: 28px !important;
	height: 28px !important;
	padding: 0 8px !important;
	gap: 2px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	line-height: 1 !important;
	border-radius: 7px !important;
	box-shadow: none !important;
}

.bm-tag-field__toggle .dashicons {
	width: 14px;
	height: 14px;
	font-size: 14px;
	line-height: 1;
	opacity: 0.7;
}

.bm-tag-field__value {
	font-variant-numeric: tabular-nums;
}

.bm-tag-field__popover {
	min-width: 140px;
	padding: 8px;
}

.bm-tag-field__head {
	margin: 0 0 6px;
	padding: 0 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-tag-field__head strong {
	font-weight: 600;
}

.bm-tag-field__menu {
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 240px;
	overflow-y: auto;
}

.bm-tag-field__option {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--bm-f-on-surface, #1b1b21);
	font-size: 13px;
	font-weight: 600;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	text-align: left;
	cursor: pointer;
}

.bm-tag-field__option:hover {
	background: var(--bm-f-surface-container, #eaedff);
}

.bm-tag-field__option.is-active {
	background: color-mix(in srgb, var(--bm-f-primary, #3525cd) 14%, transparent);
	color: var(--bm-f-primary, #3525cd);
}

.bm-field-wrap.is-hidden-element {
	opacity: 0.38;
	filter: grayscale(0.12);
}

.bm-order-field__icon-btn {
	min-width: 28px !important;
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	border-radius: 7px !important;
	color: var(--bm-f-on-surface-variant) !important;
}

.bm-order-field__icon-btn:hover:not(:disabled) {
	background: var(--bm-f-surface-container) !important;
	color: var(--bm-f-primary) !important;
}

.bm-order-field__icon-btn:disabled {
	opacity: 0.35 !important;
}

/* —— Repeater / Buttons —— */
.bm-repeater__head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}

.bm-repeater__head .bm-field-label {
	margin-bottom: 0;
}

.bm-repeater__add-inline {
	margin-left: auto !important;
}

.bm-repeater__list--logos {
	gap: 0;
	border: 1px solid var(--bm-f-outline);
	border-radius: 10px;
	overflow: hidden;
	background: var(--bm-f-surface);
}

.bm-repeater__logo-row {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.65rem;
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid color-mix(in srgb, var(--bm-f-outline) 70%, transparent);
	background: var(--bm-f-surface);
}

.bm-repeater__logo-row:last-child {
	border-bottom: none;
}

.bm-repeater__logo-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.15rem;
	flex-shrink: 0;
}

.bm-repeater__logo-actions .bm-repeater__icon-btn {
	min-height: 28px;
}

.bm-repeater__logo-thumb {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 50px;
	padding: 0;
	margin: 0;
	border: 1px dashed color-mix(in srgb, var(--bm-f-primary) 35%, var(--bm-f-outline));
	border-radius: 8px;
	background: var(--bm-f-surface-low);
	cursor: pointer;
	overflow: hidden;
}

.bm-repeater__logo-thumb:hover,
.bm-repeater__logo-thumb:focus {
	border-style: solid;
	border-color: var(--bm-f-primary);
	outline: none;
}

.bm-repeater__logo-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bm-repeater__logo-thumb .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--bm-f-on-surface-variant);
}

.bm-repeater__logo-meta {
	font-size: 12px;
	font-weight: 500;
	color: var(--bm-f-on-surface-variant);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bm-repeater__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--bm-f-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.bm-repeater__list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-bottom: 0.75rem;
	min-width: 0;
	max-width: 100%;
}

.bm-repeater__item {
	border: 1px solid var(--bm-f-outline);
	border-radius: 12px;
	padding: 0;
	margin-bottom: 0;
	background: var(--bm-f-surface);
	overflow: hidden;
	min-width: 0;
	max-width: 100%;
	box-shadow: 0 1px 2px color-mix(in srgb, var(--bm-f-primary) 4%, transparent);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bm-repeater__item:hover {
	border-color: color-mix(in srgb, var(--bm-f-primary) 45%, var(--bm-f-outline));
	box-shadow: 0 4px 14px color-mix(in srgb, var(--bm-f-primary) 10%, transparent);
}

.bm-repeater__item-header {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.7rem 0.75rem;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	background: linear-gradient(
		180deg,
		var(--bm-f-surface-low) 0%,
		var(--bm-f-surface) 100%
	);
	border-bottom: 1px solid color-mix(in srgb, var(--bm-f-outline) 70%, transparent);
}

.bm-repeater__item--slide.is-collapsed .bm-repeater__item-header {
	border-bottom: none;
}

.bm-repeater__item--flat.is-draggable,
.bm-repeater__item--slide.is-draggable {
	cursor: grab;
}

.bm-repeater__item--flat.is-dragging,
.bm-repeater__item--slide.is-dragging {
	opacity: 1;
	cursor: grabbing;
	position: relative;
	background: color-mix(in srgb, var(--bm-f-primary) 6%, var(--bm-f-surface));
	border-style: dashed;
	border-color: color-mix(in srgb, var(--bm-f-primary) 55%, var(--bm-f-outline));
	box-shadow: none;
}

.bm-repeater__item--flat.is-dragging > *:not(.bm-repeater__drag-placeholder),
.bm-repeater__item--slide.is-dragging > *:not(.bm-repeater__drag-placeholder) {
	opacity: 0.28;
	filter: saturate(0.4);
}

.bm-repeater__drag-placeholder {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	pointer-events: none;
	font: 700 12px/1.2 system-ui, sans-serif;
	letter-spacing: 0.02em;
	color: var(--bm-f-primary, #3525cd);
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--bm-f-surface) 78%, transparent),
		color-mix(in srgb, var(--bm-f-surface) 45%, transparent)
	);
}

.bm-repeater__drag-placeholder .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
}

.bm-collection-drag-ghost--fields strong {
	display: block;
	font: 700 13px/1.2 system-ui, sans-serif;
}

.bm-collection-drag-ghost--fields em {
	display: block;
	margin-top: 2px;
	font: 500 11px/1.2 system-ui, sans-serif;
	color: #64748b;
	font-style: normal;
}

.bm-collection-drag-ghost--fields .dashicons {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: var(--bm-f-primary, #3525cd);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
}

.bm-repeater__item--flat.is-drop-target,
.bm-repeater__item--slide.is-drop-target {
	border-color: var(--bm-f-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--bm-f-primary) 35%, transparent);
}

.bm-repeater__drag-handle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin: 0;
	color: var(--bm-f-on-surface-variant);
	cursor: grab;
}

.bm-repeater__drag-handle .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
}

.bm-repeater__item--flat .bm-repeater__item-toggle {
	cursor: pointer;
}

.bm-repeater__item-toggle {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
	border-radius: 8px;
}

.bm-repeater__item-toggle:hover .bm-repeater__item-title {
	color: var(--bm-f-primary);
}

.bm-repeater__item-toggle:focus-visible {
	outline: 2px solid var(--bm-f-primary);
	outline-offset: 2px;
}

.bm-repeater__item-meta {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: var(--bm-f-on-surface-variant);
	line-height: 1.3;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bm-repeater__item-chevron {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	font-size: 16px;
	line-height: 1;
	color: var(--bm-f-on-surface-variant);
}

.bm-repeater__item-toggle:hover .bm-repeater__item-chevron {
	color: var(--bm-f-primary);
}

.bm-repeater__index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: var(--bm-f-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.bm-repeater__item-summary {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
}

.bm-repeater__item-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--bm-f-on-surface);
	line-height: 1.3;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bm-repeater__item-url {
	font-size: 11px;
	color: var(--bm-f-on-surface-variant);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bm-repeater__item-url--muted {
	font-style: italic;
	opacity: 0.75;
}

.bm-repeater__item-header--button {
	border-bottom: none;
	min-width: 0;
	max-width: 100%;
}

.bm-repeater--buttons {
	min-width: 0;
	max-width: 100%;
}

.bm-repeater--buttons .bm-repeater__item,
.bm-repeater--buttons .bm-repeater__list {
	min-width: 0;
	max-width: 100%;
}

.bm-repeater--buttons .bm-repeater__item-summary--link {
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
}

.bm-repeater--buttons .bm-repeater__item-footer {
	align-items: flex-start;
}

.bm-repeater--buttons .bm-repeater__item-footer-edit {
	flex: 1 1 auto;
	max-width: 100%;
}

.bm-repeater--buttons .bm-repeater__item-footer-end {
	flex-shrink: 1;
	margin-left: 0;
}

.bm-repeater__item-summary--link {
	flex-direction: row;
	align-items: center;
	gap: 0.5rem;
}

.bm-repeater__link-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: var(--bm-f-primary);
	opacity: 0.85;
}

.bm-repeater__item-summary-text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	flex: 1;
}

.bm-repeater__item-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	flex-wrap: wrap;
	padding: 0.55rem 0.75rem 0.7rem;
	border-top: 1px solid color-mix(in srgb, var(--bm-f-outline) 70%, transparent);
	background: var(--bm-f-surface-low);
}

.bm-repeater__item-footer-edit {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	flex-wrap: wrap;
}

.bm-repeater__edit-link {
	min-height: 32px !important;
}

.bm-repeater__icon-side {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.bm-repeater__item-footer-end {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
	margin-left: auto;
	flex-shrink: 0;
}

.bm-repeater__btn-visibility.components-toggle-control {
	margin-bottom: 0 !important;
}

.bm-repeater__btn-visibility .components-base-control__field {
	margin-bottom: 0 !important;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.bm-repeater__btn-visibility .components-toggle-control__label {
	font-size: 12px;
	line-height: 1.2;
}

.bm-repeater__item--button.is-button-hidden {
	opacity: 0.62;
}

.bm-repeater__item--button.is-button-hidden .bm-repeater__item-summary {
	opacity: 0.85;
}

.bm-repeater__item-footer-edit .bm-repeater__icon-btn--styles {
	min-height: 32px !important;
}

.bm-repeater__icon-size {
	min-width: 7.5rem;
	max-width: 9rem;
}

.bm-repeater__icon-size.is-disabled,
.bm-repeater__icon-styles.is-disabled {
	opacity: 0.22;
	filter: grayscale(0.25);
	pointer-events: none;
	user-select: none;
}

.bm-repeater__icon-styles {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-bottom: 0.35rem;
}

.bm-repeater__icon-styles .bm-repeater__icon-size-control,
.bm-repeater__icon-styles .bm-flexible-unit {
	max-width: 11rem;
}

.bm-repeater__icon-size .bm-flexible-unit,
.bm-repeater__icon-size .components-base-control {
	margin-bottom: 0 !important;
}

.bm-repeater__icon-size .components-base-control__label,
.bm-repeater__icon-size .bm-flexible-unit__label {
	font-size: 11px !important;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--bm-f-on-surface-variant);
	margin-bottom: 0.2rem !important;
}

.bm-repeater__icon-size-control .components-input-control__container,
.bm-repeater__icon-size-control .components-unit-control {
	min-height: 32px;
}

.bm-repeater__icon-side-label {
	margin-right: 0.2rem;
	font-size: 11px;
	font-weight: 600;
	color: var(--bm-f-on-surface-variant);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.bm-repeater__icon-side-btn {
	appearance: none;
	margin: 0;
	padding: 0.3rem 0.55rem;
	border: 1px solid var(--bm-f-outline);
	border-radius: 6px;
	background: var(--bm-f-surface);
	color: var(--bm-f-on-surface);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.bm-repeater__icon-side-btn:hover:not(:disabled) {
	border-color: var(--bm-f-primary);
	color: var(--bm-f-primary);
}

.bm-repeater__icon-side-btn.is-active {
	border-color: var(--bm-f-primary);
	background: color-mix(in srgb, var(--bm-f-primary) 12%, var(--bm-f-surface));
	color: var(--bm-f-primary);
}

.bm-repeater__icon-side-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.bm-btn-icon-picker {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
	max-width: 100%;
}

.bm-btn-icon-picker__toggle {
	min-width: 32px !important;
	width: 32px !important;
	height: 32px !important;
	max-width: 32px !important;
	padding: 0 !important;
	justify-content: center !important;
	overflow: hidden !important;
}

.bm-btn-icon-picker__toggle .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
}

.bm-btn-icon-picker__popover {
	width: min(280px, 84vw);
	padding: 0.75rem;
}

.bm-btn-icon-picker__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.55rem;
}

.bm-btn-icon-picker__head strong {
	font-size: 12px;
	font-weight: 700;
	color: var(--bm-f-on-surface);
}

.bm-btn-icon-picker__grid {
	display: grid !important;
	grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
	gap: 0.35rem;
	max-height: 220px;
	overflow: auto;
}

.bm-btn-icon-picker__item {
	appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	width: 100% !important;
	min-width: 0 !important;
	aspect-ratio: 1;
	min-height: 36px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid transparent !important;
	border-radius: 8px !important;
	background: var(--bm-f-surface-low, #f0f0f1) !important;
	color: var(--bm-f-on-surface, #1e1e1e) !important;
	cursor: pointer;
	overflow: hidden;
	/* Hide any accidental text nodes; glyphs use :before / ligature spans. */
	font-size: 0 !important;
	line-height: 0 !important;
	text-indent: 0 !important;
	white-space: nowrap;
}

.bm-btn-icon-picker__item:hover {
	border-color: var(--bm-f-primary, #3525cd) !important;
	color: var(--bm-f-primary, #3525cd) !important;
}

.bm-btn-icon-picker__item.is-active {
	border-color: var(--bm-f-primary, #3525cd) !important;
	background: color-mix(
		in srgb,
		var(--bm-f-primary, #3525cd) 14%,
		var(--bm-f-surface, #fff)
	) !important;
	color: var(--bm-f-primary, #3525cd) !important;
}

.bm-btn-icon-picker__item .dashicons,
.bm-btn-icon-picker__item [class*='fa-'],
.bm-btn-icon-picker__item [class^='fa'],
.bm-btn-icon-picker__item .material-icons,
.bm-btn-icon-picker__item .material-icons-outlined,
.bm-btn-icon-picker__item .material-icons-round,
.bm-btn-icon-picker__item .material-icons-sharp,
.bm-btn-icon-picker__item .material-icons-two-tone,
.bm-btn-icon-picker__item .material-symbols-outlined,
.bm-btn-icon-picker__item .material-symbols-rounded,
.bm-btn-icon-picker__item .material-symbols-sharp,
.bm-btn-icon-picker__item .bm-icon,
.bm-btn-icon-picker__item .bm-universal-icon-picker__glyph {
	font-size: 18px !important;
	line-height: 1 !important;
	width: 1.15em;
	height: 1.15em;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-indent: 0;
	speak: never;
	/* Ligature fonts need visible text nodes at normal size */
	font-feature-settings: 'liga';
	-webkit-font-feature-settings: 'liga';
}

.bm-btn-icon-picker__item .bm-icon.bm-icon--svg,
.bm-universal-icon-picker__glyph .bm-icon.bm-icon--svg,
.bm-universal-icon-picker__preview .bm-icon.bm-icon--svg,
.bm-universal-icon-picker__glyph--svg svg,
.bm-btn-icon-picker__toggle .bm-universal-icon-picker__preview svg,
.bm-btn-icon-picker__toggle .bm-icon.bm-icon--svg {
	width: 18px !important;
	height: 18px !important;
	max-width: 18px !important;
	max-height: 18px !important;
	display: block !important;
	flex-shrink: 0;
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2;
	overflow: visible !important;
}

.bm-btn-icon-picker__toggle .bm-universal-icon-picker__preview,
.bm-btn-icon-picker__toggle .bm-universal-icon-picker__glyph {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	color: inherit;
	font-size: 18px !important;
	line-height: 1 !important;
}

.bm-btn-icon-picker__item .bm-universal-icon-picker__glyph--svg {
	font-size: 18px !important;
	line-height: 1 !important;
	width: 18px !important;
	height: 18px !important;
}

.bm-btn-icon-picker__item .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
}

/* Gutenberg popover portal — beat core button resets */
.components-popover .bm-btn-icon-picker__grid,
.components-popover .bm-universal-icon-picker__grid {
	display: grid !important;
	grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.components-popover .bm-btn-icon-picker__item {
	display: inline-flex !important;
}

.bm-universal-icon-picker__popover {
	min-width: 280px;
	max-width: 340px;
}

.bm-universal-icon-picker__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 8px;
}

.bm-universal-icon-picker__tab {
	margin: 0;
	padding: 4px 8px;
	border: 1px solid var(--bm-f-outline, #c7c4d8);
	border-radius: 6px;
	background: transparent;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	color: var(--bm-f-on-surface-variant, #646970);
}

.bm-universal-icon-picker__tab.is-active {
	background: var(--bm-f-primary, #3525cd);
	border-color: var(--bm-f-primary, #3525cd);
	color: #fff;
}

.bm-universal-icon-picker__search {
	margin-bottom: 8px !important;
}

.bm-universal-icon-picker__hint,
.bm-universal-icon-picker__empty {
	margin: 0 0 8px;
	font-size: 11px;
	line-height: 1.35;
	color: var(--bm-f-on-surface-variant, #646970);
}

.bm-universal-icon-picker__grid {
	max-height: 220px;
	overflow: auto;
}

.bm-universal-icon-picker__preview,
.bm-btn-icon-picker__item span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.bm-repeater__item-actions {
	display: flex;
	align-items: center;
	gap: 0.1rem;
	flex-shrink: 0;
}

.bm-repeater__icon-btn {
	min-width: 28px !important;
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	border-radius: 7px !important;
	color: var(--bm-f-on-surface-variant) !important;
}

.bm-repeater__icon-btn:hover:not(:disabled) {
	background: var(--bm-f-surface-container) !important;
	color: var(--bm-f-primary) !important;
}

.bm-repeater__icon-btn--danger:hover:not(:disabled) {
	background: var(--bm-color-error-surface, #fee2e2) !important;
	color: var(--bm-f-danger) !important;
}

.bm-repeater__icon-btn--styles:hover:not(:disabled) {
	background: var(--bm-f-surface-container) !important;
	color: var(--bm-f-primary) !important;
}

.bm-repeater__edit-styles {
	margin-top: 0.5rem;
	width: 100%;
	justify-content: center;
}

.bm-repeater__item-body {
	padding: 0.75rem;
}

.bm-repeater__item-body .bm-field {
	margin-bottom: 0;
}

.bm-repeater__item-body .bm-link-field__preview {
	background: #fff;
}

.bm-repeater__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
	padding: 1.25rem 1rem;
	border: 1px dashed var(--bm-f-outline);
	border-radius: 12px;
	background: var(--bm-f-surface-low);
	text-align: center;
	color: var(--bm-f-on-surface-variant);
}

.bm-repeater__empty .dashicons {
	width: 28px;
	height: 28px;
	font-size: 28px;
	color: var(--bm-f-primary);
	opacity: 0.7;
}

.bm-repeater__empty p {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	max-width: 220px;
}

.bm-repeater__add {
	width: 100% !important;
	justify-content: center !important;
	min-height: 42px !important;
	border-radius: 10px !important;
	border-style: dashed !important;
	border-color: var(--bm-f-outline) !important;
	color: var(--bm-f-primary) !important;
	background: var(--bm-f-surface-low) !important;
	font-weight: 600 !important;
}

.bm-repeater__add-slide-row {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.35rem;
}

.bm-repeater__add:hover {
	border-color: var(--bm-f-primary) !important;
	background: var(--bm-f-surface-container) !important;
	box-shadow: 0 2px 10px color-mix(in srgb, var(--bm-f-primary) 12%, transparent);
}

.bm-repeater__button-styles {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--bm-f-surface-high, #e2e7ff);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.bm-inspector-card .bm-repeater__button-styles {
	margin-top: 0.5rem;
	padding: 0.75rem;
	border: 1px solid var(--bm-f-surface-high, #e2e7ff);
	border-radius: 10px;
	background: var(--bm-f-surface, #faf8ff);
}

.bm-repeater__button-styles.is-focused {
	outline: 2px solid var(--wp-admin-theme-color, #3525cd);
	outline-offset: 2px;
}

.bm-btn-style.is-library-source {
	background: color-mix(
		in srgb,
		var(--bm-f-surface, #faf8ff) 72%,
		transparent
	);
	border-color: color-mix(
		in srgb,
		var(--bm-f-outline, #c3c4c7) 45%,
		transparent
	);
}

.bm-btn-style.is-library-source .bm-btn-style__header {
	opacity: 0.7;
}

.bm-btn-style__source {
	position: relative;
	z-index: 1;
}

.bm-btn-style__locked-note {
	margin: 0.35rem 0 0;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	border: 1px dashed color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 70%, transparent);
	background: color-mix(in srgb, var(--bm-f-surface-low, #f0f0f1) 80%, transparent);
	font-size: 12px;
	line-height: 1.45;
	color: var(--bm-f-on-surface-variant, #646970);
}

.bm-btn-style__styles.is-readonly .bm-repeater__custom,
.bm-btn-style__styles.is-readonly .components-base-control {
	pointer-events: none;
	opacity: 0.72;
}

.bm-repeater__group-title {
	display: block;
	margin-top: 0.35rem;
	font-size: 12px;
}

.bm-repeater__color-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem 0.5rem;
	margin-bottom: 0.35rem;
}

.bm-repeater__color {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.35rem;
	min-width: 0;
}

.bm-repeater__color-label {
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	color: #1e1e1e;
}

.bm-repeater__color .bm-color-dropdown,
.bm-repeater__color .bm-color-dropdown__toggle {
	width: 100%;
}

.bm-style-field--overlay {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

/*
 * BaseControl help under the label (above the control).
 * Toggle/checkbox keep help below the whole control — label sits beside the input.
 */
.bm-style-field.components-base-control:not(.components-toggle-control):not(.components-checkbox-control),
.bm-flexible-unit-wrap.components-base-control,
.bm-inspector-card .components-base-control:not(.components-toggle-control):not(.components-checkbox-control),
.bm-element-toolbar .components-base-control:not(.components-toggle-control):not(.components-checkbox-control),
.bm-field .components-base-control:not(.components-toggle-control):not(.components-checkbox-control),
.bm-media-field__embed-form .components-base-control,
.bm-btn-style .components-base-control:not(.components-toggle-control):not(.components-checkbox-control),
.bm-btn-style-panel .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) {
	display: flex;
	flex-direction: column;
}

.bm-style-field.components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field,
.bm-flexible-unit-wrap.components-base-control > .components-base-control__field,
.bm-inspector-card .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field,
.bm-element-toolbar .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field,
.bm-field .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field,
.bm-media-field__embed-form .components-base-control > .components-base-control__field,
.bm-btn-style .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field,
.bm-btn-style-panel .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field {
	display: contents;
}

.bm-style-field.components-base-control:not(.components-toggle-control):not(.components-checkbox-control) .components-base-control__label,
.bm-flexible-unit-wrap.components-base-control .components-base-control__label,
.bm-inspector-card .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) .components-base-control__label,
.bm-element-toolbar .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) .components-base-control__label,
.bm-field .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) .components-base-control__label,
.bm-media-field__embed-form .components-base-control .components-base-control__label,
.bm-btn-style .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) .components-base-control__label,
.bm-btn-style-panel .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) .components-base-control__label,
.bm-inspector-card .components-input-control__label,
.bm-element-toolbar .components-input-control__label,
.bm-style-field .components-input-control__label,
.bm-flexible-unit-wrap .components-input-control__label {
	order: 0;
	display: inline-block;
	margin-bottom: 0.35rem;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, var(--bm-color-on-surface-variant, #464555));
}

.bm-style-field.components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__help,
.bm-flexible-unit-wrap.components-base-control > .components-base-control__help,
.bm-inspector-card .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__help,
.bm-element-toolbar .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__help,
.bm-field .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__help,
.bm-media-field__embed-form .components-base-control > .components-base-control__help,
.bm-btn-style .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__help,
.bm-btn-style-panel .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__help {
	order: 1;
	margin-top: 4px;
	margin-bottom: 8px;
}

.bm-style-field.components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-flexible-unit-wrap.components-base-control > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-inspector-card .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-element-toolbar .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-field .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-media-field__embed-form .components-base-control > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-btn-style .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field > *:not(.components-base-control__label):not(label),
.bm-btn-style-panel .components-base-control:not(.components-toggle-control):not(.components-checkbox-control) > .components-base-control__field > *:not(.components-base-control__label):not(label) {
	order: 2;
}

.bm-style-field--fill {
	margin-bottom: 0.5rem;
}

.bm-style-field--gradient .bm-gradient-picker {
	padding: 0.35rem 0 0;
}

.bm-style-field--gradient .components-custom-gradient-picker__ui-line,
.bm-style-field--gradient .components-custom-gradient-picker {
	margin-top: 0.35rem;
}

.bm-style-field--gradient .components-circular-option-picker {
	margin-top: 0.25rem;
}

/* WordPress-like per-button style panels */
.bm-btn-style {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.bm-btn-style__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.bm-btn-style__header-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.bm-btn-style__header .bm-repeater__group-title {
	margin: 0;
}

.bm-btn-style__icon-pick {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
}

.bm-btn-style-panel {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.65rem 0 0;
	border-top: 1px solid color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 70%, transparent);
}

.bm-btn-style-panel:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.bm-btn-style-panel__title {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #646970);
}

.bm-btn-style-panel__body {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.bm-btn-style,
.bm-btn-style__styles,
.bm-btn-style-panel,
.bm-btn-style-panel__body,
.bm-repeater__button-styles {
	min-width: 0;
	max-width: 100%;
	overflow: visible;
}

.bm-btn-style-panel__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0.55rem;
	align-items: start;
	min-width: 0;
}

.bm-btn-style-panel__row > * {
	min-width: 0;
	max-width: 100%;
}

@media (max-width: 420px) {
	.bm-btn-style-panel__row {
		grid-template-columns: 1fr;
	}
}

.bm-font-size-field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	min-width: 0;
	max-width: 100%;
}

/* Expanding text + WYSIWYG popup */
.bm-text-wysiwyg {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 0.85rem;
}

.bm-text-wysiwyg__head {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	min-height: 1.4rem;
}

.bm-text-wysiwyg__label,
.bm-text-wysiwyg__label.bm-field-label {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-text-wysiwyg__label-spacer {
	flex: 1;
	min-width: 0;
}


.bm-text-wysiwyg__input {
	display: block;
	width: 100%;
	min-height: 2.5rem;
	overflow: hidden;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem;
	border: 1px solid color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 75%, transparent);
	border-radius: 10px;
	background: #fff;
	color: var(--bm-f-on-surface, #1e1e1e);
	font: inherit;
	font-size: 13px;
	line-height: 1.45;
	box-shadow: none;
	white-space: pre-wrap;
	word-break: break-word;
	cursor: text;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bm-text-wysiwyg__input:focus {
	outline: none;
	border-color: color-mix(in srgb, var(--bm-f-primary, #3525cd) 55%, transparent);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--bm-f-primary, #3525cd) 35%, transparent);
}

.bm-text-wysiwyg__input.is-empty:before {
	content: attr(data-placeholder);
	color: color-mix(in srgb, var(--bm-f-on-surface-variant, #646970) 85%, transparent);
	pointer-events: none;
}

.bm-text-wysiwyg__input p,
.bm-text-wysiwyg__input ul,
.bm-text-wysiwyg__input ol {
	margin: 0 0 0.35em;
}

/*
 * Tailwind / admin resets set list-style: none on ul/ol — restore markers
 * inside the formatted content surface (and nested lists).
 */
.bm-text-wysiwyg__input ul {
	list-style-type: disc !important;
	list-style-position: outside;
	padding-left: 1.35em;
}

.bm-text-wysiwyg__input ol {
	list-style-type: decimal !important;
	list-style-position: outside;
	padding-left: 1.35em;
}

.bm-text-wysiwyg__input ul ul {
	list-style-type: circle !important;
}

.bm-text-wysiwyg__input ul ul ul {
	list-style-type: square !important;
}

.bm-text-wysiwyg__input ol ol {
	list-style-type: lower-alpha !important;
}

.bm-text-wysiwyg__input li {
	list-style: inherit;
	display: list-item;
	margin: 0 0 0.15em;
}

.bm-text-wysiwyg__input li:last-child {
	margin-bottom: 0;
}

.bm-text-wysiwyg__input p:last-child,
.bm-text-wysiwyg__input ul:last-child,
.bm-text-wysiwyg__input ol:last-child {
	margin-bottom: 0;
}

.bm-text-wysiwyg__help {
	margin: 4px 0 8px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--bm-f-on-surface-variant, #646970);
}

.bm-text-wysiwyg__head .bm-text-wysiwyg__help {
	margin: 0;
	flex: 1 1 auto;
}

/* Field-aware format toolbar (FormatToolbar.js) */
.bm-format-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.4rem;
	border: 1px solid color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 55%, transparent);
	border-radius: 10px;
	background: var(--bm-f-surface-low, #f2f3ff);
}

.bm-format-toolbar__group {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border-radius: 8px;
	background: color-mix(in srgb, #fff 80%, transparent);
	border: 1px solid color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 40%, transparent);
}

.bm-format-toolbar__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 2rem !important;
	height: 2rem !important;
	min-height: 2rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: transparent !important;
	color: var(--bm-f-on-surface, #131b2e) !important;
	cursor: pointer;
	box-shadow: none !important;
	line-height: 1 !important;
}

.bm-format-toolbar__btn:hover,
.bm-format-toolbar__btn:focus-visible {
	background: color-mix(in srgb, var(--bm-f-primary, #3525cd) 10%, #fff) !important;
	color: var(--bm-f-primary, #3525cd) !important;
	outline: none;
}

.bm-format-toolbar__btn.is-active,
.bm-format-toolbar__btn.is-open {
	background: color-mix(in srgb, var(--bm-f-primary, #3525cd) 14%, #fff) !important;
	color: var(--bm-f-primary, #3525cd) !important;
}

.bm-format-toolbar__btn .dashicons {
	width: 1.15rem;
	height: 1.15rem;
	font-size: 1.15rem;
	line-height: 1;
}

.bm-format-toolbar__glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	font-family: ui-sans-serif, system-ui, sans-serif;
	user-select: none;
}

.bm-format-toolbar__btn--color {
	width: auto !important;
	min-width: 2rem;
	padding: 0 0.35rem !important;
	gap: 0.25rem;
}

.bm-format-toolbar__swatch {
	width: 0.85rem !important;
	height: 0.85rem !important;
	border-radius: 999px;
}

.bm-format-toolbar__font {
	min-width: 8.5rem;
	max-width: 12rem;
}

.bm-format-toolbar__btn--fonts {
	gap: 0.25rem;
	padding-inline: 0.45rem 0.55rem !important;
	width: auto !important;
	min-width: auto !important;
}

.bm-format-toolbar__btn-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.01em;
}

.bm-format-toolbar__fonts-panel {
	min-width: 240px;
	max-width: 280px;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.bm-format-toolbar__fonts-title {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.7;
}

.bm-format-toolbar__fonts-field .bm-searchable-select,
.bm-format-toolbar__fonts-field .bm-styled-select {
	margin-bottom: 0 !important;
}

.bm-format-toolbar__fonts-field .components-base-control__label,
.bm-format-toolbar__fonts-field .bm-searchable-select .components-base-control__label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 11px;
	font-weight: 600;
}

.bm-format-toolbar__fonts-field .components-text-control__input,
.bm-format-toolbar__fonts-field input[type='text'] {
	min-height: 2rem !important;
	font-size: 12px !important;
}

.bm-format-toolbar__fonts-popover,
.components-dropdown__content.bm-format-toolbar__fonts-popover {
	z-index: 1000600;
	overflow: visible !important;
}

.bm-format-toolbar__fonts-popover .components-popover__content,
.components-dropdown__content.bm-format-toolbar__fonts-popover .components-popover__content {
	overflow: visible !important;
}

/* Nested selects must paint above the Fonts popover shell. */
.bm-format-toolbar__select-menu.bm-select-menu--fixed,
.bm-format-toolbar__select-menu.bm-styled-select__list--portal {
	z-index: 1001800 !important;
}

.bm-format-toolbar__font--heading {
	width: 60px;
	min-width: 60px;
	max-width: 60px;
	flex: 0 0 60px;
}

.bm-format-toolbar__font--heading .bm-styled-select__toggle {
	padding-left: 0.2rem !important;
	padding-right: 0.15rem !important;
	gap: 0 !important;
}

.bm-format-toolbar__font--heading .bm-styled-select__value {
	overflow: hidden;
	text-overflow: clip;
	white-space: nowrap;
	font-size: 11px !important;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.bm-format-toolbar__font--heading .bm-styled-select__toggle .dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
	margin: 0 !important;
}

.bm-format-toolbar__heading-menu {
	min-width: 4.5rem !important;
}

.bm-format-toolbar__font--size {
	min-width: 7.5rem;
	max-width: 10.5rem;
}

.bm-format-toolbar__font--weight {
	min-width: 8.5rem;
	max-width: 11rem;
}

.bm-format-toolbar__font .bm-searchable-select,
.bm-format-toolbar__font .bm-styled-select {
	margin-bottom: 0 !important;
}

.bm-format-toolbar__font .bm-styled-select__toggle,
.bm-format-toolbar__font .components-combobox-control__input,
.bm-format-toolbar__font .components-form-token-field__input {
	min-height: 2rem !important;
	font-size: 12px !important;
}

.bm-format-toolbar__font .bm-styled-select__toggle {
	padding-top: 0.2rem !important;
	padding-bottom: 0.2rem !important;
}

.bm-format-toolbar__color-panel {
	min-width: 240px;
	max-width: 280px;
}

.bm-format-toolbar__color-tabs .components-tab-panel__tabs {
	display: flex;
	gap: 0;
	margin: 0 0 0.65rem;
	border-bottom: 1px solid
		color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 55%, transparent);
}

.bm-format-toolbar__color-tabs .components-tab-panel__tabs-item {
	flex: 1;
	justify-content: center;
	min-height: 2rem;
	padding: 0.35rem 0.5rem;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #464555);
	background: transparent;
}

.bm-format-toolbar__color-tabs .components-tab-panel__tabs-item.is-active {
	color: var(--bm-f-primary, #3525cd);
	box-shadow: inset 0 -2px 0 0 var(--bm-f-primary, #3525cd);
}

.bm-format-toolbar__color-empty {
	margin: 0.35rem 0 0.5rem;
	font-size: 12px;
	line-height: 1.4;
	color: var(--bm-f-on-surface-variant, #646970);
}

.bm-format-toolbar__color-label {
	margin: 0 0 0.5rem;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-f-on-surface-variant, #464555);
}

.bm-format-toolbar__color-label--custom {
	margin-top: 0.85rem;
}

.bm-format-toolbar__color-panel .react-colorful,
.bm-format-toolbar__color-panel .components-color-picker {
	width: 100%;
}

/* Persisted selection mark while the color picker is open */
[data-bm-format-sel='1'] {
	background-color: rgba(53, 116, 240, 0.35);
	border-radius: 2px;
}

/* Preview / canvas host — anchored above the edited text */
.bm-preview-format-bar--anchored {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.4rem;
	border: 1px solid color-mix(in srgb, var(--bm-f-outline, #c3c4c7) 50%, transparent);
	border-radius: 10px;
	background: color-mix(in srgb, #fff 96%, transparent);
	box-shadow: 0 8px 24px rgba(19, 27, 46, 0.16);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	pointer-events: auto;
	max-width: min(920px, calc(100vw - 1rem));
}

.bm-preview-format-bar--anchored .bm-format-toolbar {
	border: 0;
	background: transparent;
	padding: 0;
}

/* Color popover above the anchored toolbar */
.bm-format-toolbar__color-popover,
.components-dropdown__content.bm-format-toolbar__color-popover {
	z-index: 100170 !important;
}

.bm-text-wysiwyg--plain .bm-text-wysiwyg__head {
	margin-bottom: 0;
}
