.bm-element-toolbar--panel {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bm-element-toolbar__header {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.bm-element-toolbar__back {
	justify-content: flex-start !important;
	width: 100%;
	height: auto !important;
	min-height: 36px;
	padding: 6px 10px !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	box-shadow: none !important;
}

.bm-element-toolbar__context {
	position: relative;
	z-index: 0;
	margin: 0;
	padding: 12px 12px 12px 14px;
	border: 1px solid #e2d4a8;
	border-left: 4px solid #dba617;
	border-radius: 2px;
	background: #fcf9e8;
	isolation: isolate;
}

.bm-element-toolbar__context::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	pointer-events: none;
	box-shadow: 0 0 0 0 rgba(219, 166, 23, 0.45);
	animation: bm-currently-editing-pulse 2s ease-out infinite;
}

@keyframes bm-currently-editing-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(219, 166, 23, 0.45);
		opacity: 1;
	}
	70% {
		box-shadow: 0 0 0 14px rgba(219, 166, 23, 0);
		opacity: 0;
	}
	100% {
		box-shadow: 0 0 0 0 rgba(219, 166, 23, 0);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bm-element-toolbar__context::after {
		animation: none;
		opacity: 0;
	}
}

.bm-element-toolbar__context-eyebrow {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #996800;
	line-height: 1.3;
}

.bm-element-toolbar__context-title {
	display: block;
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: #1d2327;
}

.bm-element-toolbar__context-note {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #3c434a;
}

.bm-element-toolbar__hint {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: #757575;
}

.bm-element-toolbar__hint--hidden {
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px dashed #c7c4d8;
	background: color-mix(in srgb, #f0f0f1 85%, transparent);
	color: #646970;
}

.bm-element-toolbar__styles.is-element-hidden {
	opacity: 0.28;
	filter: grayscale(0.2);
	pointer-events: none;
	user-select: none;
}

/* Toolbar uses shared .bm-inspector-card / __title — only field density overrides here. */
.bm-element-toolbar .bm-inspector-card > .components-base-control,
.bm-element-toolbar .bm-inspector-card > .bm-style-field,
.bm-element-toolbar .bm-inspector-card > .bm-searchable-select,
.bm-element-toolbar .bm-inspector-card > .bm-element-toolbar__field {
	margin-bottom: 0 !important;
}

.bm-element-toolbar .bm-inspector-card .bm-element-toolbar__field .bm-flexible-unit,
.bm-element-toolbar .bm-inspector-card .bm-element-toolbar__field.bm-flexible-unit-wrap {
	margin-bottom: 0 !important;
}

.bm-element-toolbar__color-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0.65rem 0.5rem;
	min-width: 0;
}

.bm-element-toolbar__color-grid .bm-element-toolbar__field {
	margin-bottom: 0;
	min-width: 0;
}

.bm-element-toolbar__color-grid .bm-color-dropdown,
.bm-element-toolbar__color-grid .bm-color-dropdown__toggle {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.bm-element-toolbar__field {
	margin-bottom: 0;
	min-width: 0;
	max-width: 100%;
}

.bm-element-toolbar__styles,
.bm-element-toolbar .bm-inspector-card {
	min-width: 0;
	max-width: 100%;
	overflow: visible;
}

.bm-element-toolbar .bm-font-size-field {
	margin-bottom: 0;
}

.bm-color-dropdown {
	display: block;
	width: 100%;
}

.bm-color-dropdown__toggle {
	display: flex !important;
	align-items: center;
	gap: 8px;
	width: 100%;
	justify-content: flex-start;
}

.bm-color-dropdown__panel {
	min-width: 260px;
}

.bm-element-toolbar__state-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	margin: 0;
	padding: 4px;
	border-radius: 10px;
	background: var(--bm-color-surface-container, #eaedff);
	border: 1px solid color-mix(in srgb, var(--bm-color-outline-variant, #c7c4d8) 70%, transparent);
}

.bm-element-toolbar__state-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	margin: 0;
	padding: 6px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--bm-color-on-surface-variant, #464555);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.bm-element-toolbar__state-tab:hover {
	color: var(--bm-color-on-surface, #131b2e);
	background: color-mix(in srgb, #fff 55%, transparent);
}

.bm-element-toolbar__state-tab.is-active {
	background: var(--bm-color-primary, #3525cd);
	color: var(--bm-color-on-primary, #fff);
}


