/**
 * JOC Blockora Morph admin UI — Stitch design system
 * System fonts + dashicons only (no remote webfont / Material CDN).
 */

/* Full-screen takeover of wp-admin for Blockora Morph */
body.joc-blockora-morph-fullscreen #wpadminbar,
body.joc-blockora-morph-fullscreen #adminmenumain,
body.joc-blockora-morph-fullscreen #wpfooter {
	display: none !important;
}

/* WP still reserves admin-bar space on html even when the bar is hidden. */
html.wp-toolbar.joc-blockora-morph-fullscreen,
html.wp-toolbar:has(body.joc-blockora-morph-fullscreen) {
	padding-top: 0 !important;
	--wp-admin--admin-bar--height: 0px !important;
}

body.joc-blockora-morph-fullscreen.admin-bar,
body.joc-blockora-morph-fullscreen {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

body.joc-blockora-morph-fullscreen #wpcontent,
body.joc-blockora-morph-fullscreen #wpbody,
body.joc-blockora-morph-fullscreen #wpbody-content {
	margin: 0 !important;
	padding: 0 !important;
}

body.joc-blockora-morph-fullscreen #wpbody-content > .wrap {
	margin: 0;
	padding: 0;
	max-width: none;
}

body.joc-blockora-morph-fullscreen .notice,
body.joc-blockora-morph-fullscreen .update-nag {
	display: none !important;
}

:root {
	/* JOC Blockora Morph brand — Indigo / Slate */
	--bm-bg: #faf8ff;
	--bm-surface: #ffffff;
	--bm-surface-bright: #faf8ff;
	--bm-surface-low: #f2f3ff;
	--bm-surface-container: #eaedff;
	--bm-surface-high: #e2e7ff;
	--bm-on-surface: #131b2e;
	--bm-on-surface-variant: #464555;
	--bm-outline: #777587;
	--bm-outline-muted: #c7c4d8;
	--bm-ghost: rgba(199, 196, 216, 0.45);
	--bm-primary: #3525cd;
	--bm-primary-container: #4f46e5;
	--bm-primary-surface: #eaedff;
	--bm-primary-interactive: #4f46e5;
	--bm-on-primary: #ffffff;
	--bm-primary-soft: #eaedff;
	--bm-secondary: #4648d4;
	--bm-secondary-container: #6a6be7;
	--bm-secondary-surface: #eef0ff;
	--bm-success: #16a34a;
	--bm-success-container: #4ade80;
	--bm-success-surface: #dcfce7;
	--bm-warning: #d97706;
	--bm-warning-container: #f59e0b;
	--bm-warning-surface: #fef3c7;
	--bm-error: #ba1a1a;
	--bm-error-container: #dc2626;
	--bm-error-surface: #fee2e2;
	--bm-tertiary: #46494b;
	--bm-shadow-sm: 0 1px 2px rgba(53, 37, 205, 0.04);
	--bm-shadow: 0 10px 25px -5px rgba(53, 37, 205, 0.08);
	--bm-radius-sm: 4px;
	--bm-radius: 8px;
	--bm-radius-lg: 16px;
	--bm-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
	--bm-mono: "SF Mono", "Menlo", "Consolas", monospace;
	--bm-nav-width: 280px;
	--bm-header-height: 64px;
}

.joc-blockora-morph-app,
.bm-shell,
.bm-editor {
	font-family: var(--bm-font);
	color: var(--bm-on-surface);
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

.joc-blockora-morph-app *,
.joc-blockora-morph-app *::before,
.joc-blockora-morph-app *::after {
	box-sizing: border-box;
}

.bm-eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.625rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bm-outline);
	font-weight: 700;
}

.bm-muted {
	color: var(--bm-on-surface-variant);
	font-size: 0.875rem;
}

.bm-btn {
	appearance: none !important;
	border: 1px solid transparent !important;
	border-radius: 8px !important;
	padding: 0.55rem 1.15rem !important;
	min-height: 40px;
	font: inherit;
	font-size: 12px !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	line-height: 1.25;
	transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease,
		border-color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: none !important;
	text-decoration: none !important;
	height: auto !important;
}

.bm-btn:active:not(:disabled) {
	transform: scale(0.95);
}

.bm-btn--primary {
	background-color: #3525cd !important;
	background-image: none !important;
	color: #ffffff !important;
	border-color: #3525cd !important;
	box-shadow: var(--bm-shadow-sm, 0 1px 2px rgba(53, 37, 205, 0.04)) !important;
}

.bm-btn--primary:hover {
	filter: brightness(1.08);
}

.bm-btn--ghost {
	background: #ffffff !important;
	border-color: #c7c4d8 !important;
	color: #464555 !important;
	box-shadow: 0 1px 2px rgba(53, 37, 205, 0.04) !important;
}

.bm-btn--ghost:hover {
	background: #f2f3ff !important;
	border-color: #9ccaff !important;
	color: #3525cd !important;
}

.bm-link {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--bm-primary-interactive);
	cursor: pointer;
	text-decoration: none;
}

.bm-link:hover {
	color: var(--bm-primary);
	text-decoration: underline;
}

.bm-btn--lg {
	padding: 0.75rem 1.5rem;
	font-size: 0.95rem;
}

.bm-btn--block {
	width: 100%;
}

.bm-btn--sm {
	padding: 0.35rem 0.7rem;
	font-size: 0.8rem;
}

.bm-btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

@keyframes bm-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes bm-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ---------- Shell / Library ---------- */
/* Layout + Library chrome are Tailwind (src/admin/styles/tailwind.css). */

.bm-page {
	padding: 2rem 1.5rem 3rem;
	animation: bm-rise 0.4s ease both;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

.bm-page__header {
	margin-bottom: 2rem;
}

.bm-page__header--row {
	display: flex;
	justify-content: space-between;
	gap: 1.25rem;
	align-items: flex-start;
}

.bm-page h1 {
	font-size: 1.5rem;
	margin: 0 0 0.35rem;
	letter-spacing: -0.02em;
	line-height: 1.33;
	font-weight: 600;
	color: var(--bm-on-surface);
}

.bm-page__header p {
	margin: 0;
	color: var(--bm-on-surface-variant);
	line-height: 1.6;
	font-size: 0.9375rem;
	max-width: 32rem;
}

.bm-steps {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.4rem;
	counter-reset: bm-step;
}

.bm-steps li {
	display: grid;
	grid-template-columns: 1.4rem 1fr;
	gap: 0.55rem;
	align-items: start;
	color: var(--bm-on-surface-variant);
	font-size: 0.85rem;
	line-height: 1.4;
	counter-increment: bm-step;
}

.bm-steps li::before {
	content: counter(bm-step);
	width: 1.4rem;
	height: 1.4rem;
	border-radius: var(--bm-radius-sm);
	background: var(--bm-primary);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	display: grid;
	place-items: center;
	margin-top: 0.05rem;
}

/* ---------- Modal ---------- */
.bm-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 1.5rem;
	animation: bm-fade-in 0.2s ease both;
}

.bm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(23, 28, 34, 0.45);
}

.bm-modal__panel {
	position: relative;
	z-index: 1;
	width: min(1120px, 100%);
	height: min(740px, 92vh);
	display: grid;
	grid-template-columns: 1fr 340px;
	background: var(--bm-surface);
	border-radius: var(--bm-radius-lg);
	overflow: hidden;
	box-shadow: var(--bm-shadow);
	border: 1px solid var(--bm-ghost);
	animation: bm-rise 0.3s ease both;
}

.bm-modal__preview {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--bm-surface-low);
}

.bm-modal__preview-head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.35rem;
	border-bottom: 1px solid var(--bm-ghost);
	background: var(--bm-surface);
}

.bm-modal__preview-head h2 {
	margin: 0 0 0.25rem;
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.bm-modal__preview-head p {
	margin: 0;
	color: var(--bm-on-surface-variant);
	font-size: 0.875rem;
}

.bm-modal__canvas {
	flex: 1;
	overflow: auto;
	padding: 1.5rem;
}

.bm-modal__side {
	padding: 1.35rem;
	border-left: 1px solid var(--bm-ghost);
	background: var(--bm-surface);
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.bm-modal__side h3 {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: -0.015em;
}

.bm-modal__meta {
	list-style: none;
	margin: 0.35rem 0 0.85rem;
	padding: 0;
	display: grid;
	gap: 0;
}

.bm-modal__meta li {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--bm-ghost);
	font-size: 0.85rem;
}

.bm-modal__meta span {
	color: var(--bm-on-surface-variant);
}

.bm-modal__side .bm-field {
	margin-bottom: 0.65rem;
}

.bm-modal__side .bm-field input[type="text"] {
	width: 100%;
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
	padding: 0.6rem 0.75rem;
	font: inherit;
	background: var(--bm-surface-low);
}

.bm-modal__side .bm-field input[type="text"]:focus {
	outline: none;
	border-color: var(--bm-primary-container);
	box-shadow: 0 0 0 3px var(--bm-primary-soft);
}

/* ---------- Dashboard / My blocks ---------- */
.bm-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.bm-stat {
	background: var(--bm-surface);
	border: 1px solid rgba(193, 199, 210, 0.35);
	border-radius: var(--bm-radius);
	padding: 1.15rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	box-shadow: var(--bm-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bm-stat:hover {
	transform: translateY(-2px);
	box-shadow: var(--bm-shadow);
}

.bm-stat__label {
	font-size: 0.8rem;
	color: var(--bm-on-surface-variant);
	font-weight: 500;
}

.bm-stat__value {
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--bm-on-surface);
	line-height: 1;
}

.bm-stat__icon {
	width: 36px;
	height: 36px;
	border-radius: var(--bm-radius);
	background: var(--bm-primary-soft);
	color: var(--bm-primary);
	display: grid;
	place-items: center;
	margin-bottom: 0.35rem;
}

.bm-stat__icon .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.bm-myblocks__tabs {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1.15rem;
	padding: 0.25rem;
	background: var(--bm-surface-low);
	border-radius: var(--bm-radius);
	width: fit-content;
	border: 1px solid var(--bm-ghost);
}

.bm-myblocks__tabs button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--bm-on-surface-variant);
	padding: 0.5rem 1rem;
	border-radius: 6px;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.bm-myblocks__tabs button em {
	font-style: normal;
	font-size: 0.75rem;
	opacity: 0.7;
	font-variant-numeric: tabular-nums;
}

.bm-myblocks__tabs button.is-active {
	background: var(--bm-surface);
	color: var(--bm-primary);
	font-weight: 600;
	box-shadow: var(--bm-shadow);
}

.bm-myblocks__panel {
	background: var(--bm-surface);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius-lg);
	padding: 0;
	min-height: 280px;
	overflow: hidden;
}

.bm-myblocks__panel-inner {
	padding: 1.25rem 1.35rem;
}

.bm-empty {
	max-width: 28rem;
	padding: 2rem 1.5rem;
}

.bm-empty--warn {
	border-left: 3px solid var(--bm-primary-container);
	padding-left: 1.15rem;
	margin: 1.25rem;
}

.bm-empty h3 {
	margin: 0 0 0.45rem;
	font-size: 1.15rem;
	font-weight: 600;
}

.bm-empty p {
	color: var(--bm-on-surface-variant);
	line-height: 1.5;
	margin: 0 0 1.1rem;
	font-size: 0.9rem;
}

.bm-table {
	width: 100%;
	border-collapse: collapse;
}

.bm-table__row {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
	gap: 1rem;
	align-items: center;
	padding: 0.9rem 1.25rem;
	border-bottom: 1px solid var(--bm-ghost);
	transition: background 0.12s ease;
}

.bm-table__row:last-child {
	border-bottom: 0;
}

.bm-table__row:hover {
	background: var(--bm-surface-low);
}

.bm-table__cell {
	min-width: 0;
}

.bm-table__title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.bm-table__title .dashicons {
	width: 36px;
	height: 36px;
	font-size: 18px;
	color: var(--bm-primary);
	background: var(--bm-primary-soft);
	border-radius: var(--bm-radius);
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.bm-table__title strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.bm-table__meta {
	font-size: 0.8rem;
	color: var(--bm-on-surface-variant);
	line-height: 1.4;
}

.bm-table__meta code {
	font-family: var(--bm-mono);
	font-size: 0.78em;
	background: var(--bm-surface-low);
	padding: 0.1rem 0.3rem;
	border-radius: var(--bm-radius-sm);
}

/**
 * Badge styles live in components/badge.css (design system).
 */

.bm-table__actions {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.bm-callout {
	background: var(--bm-surface-low);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
	padding: 1rem 1.15rem;
	margin-bottom: 1.15rem;
}

.bm-callout strong {
	display: block;
	margin-bottom: 0.45rem;
	font-size: 0.95rem;
	font-weight: 600;
}

.bm-callout ol {
	margin: 0 0 0.45rem;
	padding-left: 1.15rem;
	line-height: 1.5;
	color: var(--bm-on-surface-variant);
	font-size: 0.85rem;
}

.bm-callout .bm-muted {
	margin: 0;
}

.bm-form-error {
	color: #b91c1c;
	font-size: 0.85rem;
	margin: 0 0 0.65rem;
}

.bm-icon-picker {
	display: grid;
	gap: 0.5rem;
	margin: 0.65rem 0 1rem;
}

.bm-icon-picker__label {
	font-size: 0.85rem;
	color: var(--bm-on-surface-variant);
}

.bm-icon-picker__current {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.bm-icon-picker__current .dashicons,
.bm-icon-picker__current .bm-dashicon,
.bm-icon-picker__current .bm-icon-picker__svg,
.bm-icon-picker__current .bm-icon-picker__emoji,
.bm-icon-picker__current .bm-block-identity-glyph {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px !important;
	height: 32px !important;
	font-size: 32px !important;
	line-height: 1 !important;
	speak: never;
}

.bm-icon-picker__current .bm-icon-picker__svg svg {
	width: 28px;
	height: 28px;
}

.bm-icon-picker__search {
	width: 100%;
	margin: 0;
}

.bm-icon-picker__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.bm-icon-picker__filter {
	appearance: none;
	margin: 0;
	padding: 0.28rem 0.65rem !important;
	border: 1px solid var(--bm-ghost);
	border-radius: 999px;
	background: transparent;
	color: var(--bm-on-surface-variant);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	line-height: 1.2 !important;
}

.bm-icon-picker__filter.is-active,
.bm-icon-picker__filter:hover {
	border-color: var(--bm-primary-container);
	background: var(--bm-primary-soft);
	color: var(--bm-primary);
}

.bm-icon-picker__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 0.4rem;
	max-height: 260px;
	overflow: auto;
	padding: 0.5rem;
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
	background: var(--bm-surface-low);
}

.bm-icon-picker__item {
	appearance: none;
	border: 1px solid transparent;
	background: transparent;
	border-radius: var(--bm-radius-sm);
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: inherit;
	line-height: 1 !important;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.bm-icon-picker__item:hover,
.bm-icon-picker__item.is-active {
	border-color: var(--bm-primary-container);
	background: var(--bm-primary-soft);
	color: var(--bm-primary);
}

.bm-icon-picker__item .dashicons,
.bm-icon-picker__item .bm-dashicon {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 22px !important;
	height: 22px !important;
	font-size: 22px !important;
	line-height: 1 !important;
	speak: never;
}

.bm-icon-picker__emoji {
	font-size: 22px;
	line-height: 1;
}

.bm-icon-picker__svg {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	color: currentColor;
}

.bm-icon-picker__svg svg {
	width: 22px;
	height: 22px;
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2;
	overflow: visible;
}

.bm-icon-picker__hint {
	margin: 0;
	font-size: 11px;
	color: var(--bm-on-surface-variant);
}

.bm-block-identity-glyph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
}

.bm-block-identity-glyph.is-emoji {
	font-size: 1.25em;
}

.bm-block-identity-glyph.is-svg svg {
	width: 1.15em;
	height: 1.15em;
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 2;
	overflow: visible;
}

.bm-block-identity-glyph.bm-dashicon--title {
	width: 1.15em;
	height: 1.15em;
	font-size: 1.15em;
}

.bm-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bm-list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
	padding: 0.95rem 0.25rem;
	border-bottom: 1px solid var(--bm-ghost);
}

.bm-list li:last-child {
	border-bottom: 0;
}

.bm-list strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
}

.bm-list small {
	color: var(--bm-on-surface-variant);
	display: block;
	margin-top: 0.2rem;
	font-size: 0.8rem;
	line-height: 1.4;
}

.bm-list small code {
	font-family: var(--bm-mono);
	font-size: 0.8em;
	background: var(--bm-surface-low);
	padding: 0.1rem 0.3rem;
	border-radius: var(--bm-radius-sm);
}

.bm-list__actions {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.bm-list__title {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.bm-list__title .dashicons {
	margin-top: 0.15rem;
	width: 32px;
	height: 32px;
	font-size: 18px;
	color: var(--bm-primary);
	background: var(--bm-primary-soft);
	border-radius: var(--bm-radius);
	display: grid;
	place-items: center;
}

/* ---------- Theme split ---------- */
.bm-theme {
	display: grid;
	grid-template-columns: 1fr minmax(280px, 360px);
	gap: 1.25rem;
	align-items: start;
}

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

.bm-theme__preview-panel {
	position: sticky;
	top: 1rem;
	background: var(--bm-surface);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius-lg);
	padding: 1.35rem;
	box-shadow: var(--bm-shadow);
}

.bm-theme__preview-panel h2 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	font-weight: 600;
}

.bm-theme__preview-panel > .bm-muted {
	margin: 0 0 1rem;
	font-size: 0.8rem;
}

.bm-theme__live {
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
	padding: 1.25rem;
	background: var(--bm-surface-low);
	min-height: 180px;
}

.bm-theme__live h3 {
	margin: 0 0 0.5rem;
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.bm-theme__live p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--bm-on-surface-variant);
}

.bm-theme__swatch-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.bm-theme__swatch {
	width: 36px;
	height: 36px;
	border-radius: var(--bm-radius);
	border: 1px solid var(--bm-ghost);
}

.bm-theme__card {
	background: var(--bm-surface);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius-lg);
	padding: 1.2rem 1.3rem;
}

.bm-theme__card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--bm-ghost);
}

.bm-theme__card h2 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

.bm-theme__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.bm-theme__row--color {
	grid-template-columns: 44px 1fr auto;
	align-items: center;
}

.bm-field {
	display: grid;
	gap: 0.35rem;
	font-size: 0.875rem;
}

.bm-field > span,
.bm-field .bm-field-label {
	color: var(--bm-on-surface-variant);
	font-size: 0.78rem;
	font-weight: 600;
}

.bm-field input[type="text"],
.bm-field input[type="url"],
.bm-field textarea,
.bm-field select {
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
	padding: 0.55rem 0.7rem;
	font: inherit;
	background: var(--bm-surface-low);
	color: var(--bm-on-surface);
}

.bm-field input:focus,
.bm-field textarea:focus,
.bm-field select:focus {
	outline: none;
	border-color: var(--bm-primary-container);
	box-shadow: 0 0 0 3px var(--bm-primary-soft);
}

.bm-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.35rem 0;
	color: var(--bm-on-surface-variant);
	font-size: 0.875rem;
}

/* ---------- Block editor (light canvas) ---------- */
.bm-editor {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bm-bg);
	color: var(--bm-on-surface);
}

.bm-editor__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid var(--bm-ghost);
	background: var(--bm-surface);
}

.bm-editor__top h1 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.bm-editor__top h1 .dashicons {
	font-size: 1.1rem;
	width: 1.1rem;
	height: 1.1rem;
	color: var(--bm-primary);
}

.bm-editor__pos {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.8rem;
	color: var(--bm-on-surface-variant);
}

.bm-editor__pos button {
	appearance: none;
	border: 1px solid var(--bm-ghost);
	background: transparent;
	color: var(--bm-on-surface-variant);
	border-radius: var(--bm-radius-sm);
	padding: 0.35rem 0.65rem;
	cursor: pointer;
	text-transform: capitalize;
	font: inherit;
	font-size: 0.8rem;
}

.bm-editor__pos button.is-active {
	background: var(--bm-primary-soft);
	border-color: transparent;
	color: var(--bm-primary);
	font-weight: 600;
}

.bm-editor__body {
	flex: 1;
	display: flex;
	min-height: 0;
}

.bm-editor--panel-left .bm-editor__body {
	flex-direction: row-reverse;
}

.bm-editor--panel-bottom .bm-editor__body {
	flex-direction: column;
}

.bm-editor__preview {
	flex: 1;
	min-width: 0;
	min-height: 0;
	overflow: auto;
	padding: 1.5rem;
	background: var(--bm-surface-low);
}

.bm-editor__canvas {
	background: var(--bm-surface);
	color: var(--bm-on-surface);
	border-radius: var(--bm-radius-lg);
	overflow: hidden;
	min-height: 280px;
	border: 1px solid var(--bm-ghost);
	box-shadow: var(--bm-shadow);
}

.bm-editor__resizer {
	flex: 0 0 5px;
	background: var(--bm-ghost);
	cursor: col-resize;
	position: relative;
	transition: background 0.15s ease;
}

.bm-editor--panel-bottom .bm-editor__resizer {
	cursor: row-resize;
	flex-basis: 5px;
}

.bm-editor__resizer:hover {
	background: var(--bm-primary-container);
}

.bm-editor__panel {
	background: var(--bm-surface);
	border-left: 1px solid var(--bm-ghost);
	display: flex;
	flex-direction: column;
	min-width: 280px;
}

.bm-editor--panel-left .bm-editor__panel {
	border-left: 0;
	border-right: 1px solid var(--bm-ghost);
}

.bm-editor--panel-bottom .bm-editor__panel {
	width: 100% !important;
	border-left: 0;
	border-top: 1px solid var(--bm-ghost);
}

.bm-editor__panel-scroll {
	overflow: auto;
	padding: 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bm-editor__section h3 {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bm-on-surface-variant);
	font-weight: 700;
}

.bm-editor__section .bm-muted {
	margin-top: 0;
	font-size: 0.8rem;
}

.bm-editor .bm-field input[type="text"],
.bm-editor .bm-field input[type="url"],
.bm-editor .bm-field input[type="color"],
.bm-editor .bm-field textarea {
	width: 100%;
	border: 1px solid var(--bm-ghost);
	background: var(--bm-surface-low);
	color: var(--bm-on-surface);
	border-radius: var(--bm-radius);
	padding: 0.55rem 0.65rem;
	font: inherit;
}

.bm-editor .bm-field > span,
.bm-editor .bm-field .bm-field-label {
	color: var(--bm-on-surface-variant);
}

.bm-editor__tabs {
	display: flex;
	gap: 0;
	margin: 0.15rem 0 0.35rem;
	border-bottom: 1px solid var(--bm-ghost);
}

.bm-editor__tabs button {
	appearance: none;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	color: var(--bm-on-surface-variant);
	border-radius: 0;
	padding: 0.55rem 0.85rem;
	margin-bottom: -1px;
	cursor: pointer;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
}

.bm-editor__tabs button.is-active {
	color: var(--bm-primary);
	border-bottom-color: var(--bm-primary);
	font-weight: 600;
	background: transparent;
}

.bm-editor__hint {
	margin: 0.75rem 0 0;
	font-size: 0.78rem;
	color: var(--bm-on-surface-variant);
}

.bm-toolbar--wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	margin-bottom: 1rem;
	padding: 1rem;
	background: var(--bm-surface-low);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
}

.bm-field--inline {
	min-width: 200px;
}

.bm-field--inline select {
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius);
	padding: 0.55rem 0.7rem;
	font: inherit;
	background: var(--bm-surface);
}

.bm-content-editor__actions {
	display: flex;
	gap: 0.45rem;
	flex-wrap: wrap;
}

.bm-content-editor__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 1.15rem;
}

.bm-content-editor__preview,
.bm-content-editor__panel {
	background: var(--bm-surface);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius-lg);
	padding: 1.2rem;
}

.bm-shortcode {
	display: inline-block;
	margin-bottom: 0.85rem;
	padding: 0.4rem 0.65rem;
	background: var(--bm-surface-low);
	border: 1px solid var(--bm-ghost);
	border-radius: var(--bm-radius-sm);
	font-size: 0.8rem;
	font-family: var(--bm-mono);
}

.bm-content-editor__panel .bm-editor__tabs button {
	color: var(--bm-on-surface-variant);
}

.bm-content-editor__panel .bm-editor__tabs button.is-active {
	color: var(--bm-primary);
	border-bottom-color: var(--bm-primary);
}

.bm-required {
	color: #b91c1c;
	font-style: normal;
}

@media (max-width: 960px) {
	.bm-stats {
		grid-template-columns: 1fr;
	}

	.bm-theme,
	.bm-content-editor__grid,
	.bm-modal__panel {
		grid-template-columns: 1fr;
	}

	.bm-theme__preview-panel {
		position: static;
	}

	.bm-table__row {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.bm-table__actions {
		justify-content: flex-start;
	}

	.bm-modal__panel {
		height: auto;
		max-height: 92vh;
		overflow: auto;
	}

	.bm-page__header--row {
		flex-direction: column;
		align-items: stretch;
	}

	.bm-theme__row {
		grid-template-columns: 1fr;
	}
}

/* Global Settings → General → Icon libraries */
.bm-icons-panel {
	margin-top: 0;
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

.bm-icons-panel__banner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1.35rem 1.5rem;
	border-radius: 1.1rem;
	border: 1px solid rgba(53, 37, 205, 0.12);
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(79, 70, 229, 0.14), transparent 55%),
		linear-gradient(135deg, #f7f8ff 0%, #eef1ff 48%, #faf8ff 100%);
	box-shadow: var(--bm-shadow-sm);
}

.bm-icons-panel__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bm-outline);
}

.bm-icons-panel__title {
	margin: 0 0 0.4rem;
	font-size: 1.35rem;
	font-weight: 750;
	letter-spacing: -0.02em;
	color: var(--bm-on-surface);
}

.bm-icons-panel__lede {
	margin: 0;
	max-width: 38rem;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--bm-on-surface-variant);
}

.bm-icons-panel__banner-aside {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.85rem;
}

.bm-icons-panel__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 4.25rem;
	padding: 0.55rem 0.75rem;
	border-radius: 0.85rem;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(53, 37, 205, 0.1);
}

.bm-icons-panel__stat-value {
	font-size: 1.35rem;
	font-weight: 750;
	line-height: 1;
	color: var(--bm-primary);
}

.bm-icons-panel__stat-label {
	margin-top: 0.2rem;
	font-size: 0.68rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bm-on-surface-variant);
}

.bm-icons-panel__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.bm-icons-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.bm-icons-lib {
	border-radius: 1rem;
	border: 1px solid var(--bm-outline-muted);
	background: var(--bm-surface);
	box-shadow: var(--bm-shadow-sm);
	overflow: hidden;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.bm-icons-lib.is-enabled {
	border-color: rgba(53, 37, 205, 0.28);
}

.bm-icons-lib.is-open {
	border-color: rgba(53, 37, 205, 0.4);
	box-shadow: 0 12px 28px -18px rgba(53, 37, 205, 0.35);
}

.bm-icons-lib__row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 0.9rem;
	align-items: center;
	padding: 0.95rem 1.1rem;
}

.bm-icons-lib__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 0.85rem;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
	flex-shrink: 0;
}

.bm-icons-lib__mark .dashicons {
	font-size: 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
}

.bm-icons-lib__mark--dash {
	background: linear-gradient(145deg, #1e293b, #334155);
}

.bm-icons-lib__mark--lucide {
	background: linear-gradient(145deg, #b45309, #f59e0b);
}

.bm-icons-lib__mark--fa {
	background: linear-gradient(145deg, #3525cd, #4f46e5);
}

.bm-icons-lib__mark--material {
	background: linear-gradient(145deg, #0f766e, #14b8a6);
}

.bm-icons-lib__mark--custom {
	background: linear-gradient(145deg, #4648d4, #7c3aed);
}

.bm-icons-lib__identity {
	min-width: 0;
}

.bm-icons-lib__name-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.bm-icons-lib__name {
	font-size: 0.98rem;
	font-weight: 700;
	color: var(--bm-on-surface);
}

.bm-icons-lib__chip {
	display: inline-flex;
	align-items: center;
	padding: 0.12rem 0.45rem;
	border-radius: 999px;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--bm-surface-container);
	color: var(--bm-on-surface-variant);
}

.bm-icons-lib__chip--custom {
	background: rgba(124, 58, 237, 0.12);
	color: #5b21b6;
}

.bm-icons-lib__chip--on {
	background: rgba(22, 163, 74, 0.12);
	color: #15803d;
}

.bm-icons-lib__chip--off {
	background: rgba(100, 116, 139, 0.12);
	color: #64748b;
}

.bm-icons-lib__summary {
	margin: 0.28rem 0 0;
	font-size: 0.82rem;
	color: var(--bm-on-surface-variant);
}

.bm-icons-lib__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.65rem;
}

.bm-icons-lib__controls .components-toggle-control {
	margin-bottom: 0 !important;
}

.bm-icons-lib__expand {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0.4rem 0.7rem;
	border-radius: 0.65rem;
	border: 1px solid var(--bm-outline-muted);
	background: var(--bm-surface-bright);
	color: var(--bm-on-surface);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 650;
	cursor: pointer;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}

.bm-icons-lib__expand:hover,
.bm-icons-lib__expand.is-open {
	border-color: rgba(53, 37, 205, 0.35);
	background: var(--bm-primary-soft);
	color: var(--bm-primary);
}

.bm-icons-lib__expand .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.bm-icons-lib__expand.is-open .dashicons {
	transform: rotate(180deg);
}

.bm-icons-lib__locked {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	min-height: 2.25rem;
	color: var(--bm-color-outline, #777587);
}

.bm-icons-lib__locked .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.bm-icons-lib.is-locked .bm-icons-lib__controls .components-toggle-control {
	opacity: 1;
}

.bm-icons-lib__body {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 0 1.1rem 1.15rem;
	border-top: 1px solid var(--bm-ghost);
	background: linear-gradient(
		180deg,
		rgba(242, 243, 255, 0.55),
		transparent 40%
	);
}

.bm-icons-lib__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 1rem;
	padding-top: 1rem;
}

@media (max-width: 720px) {
	.bm-icons-lib__row {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.bm-icons-lib__controls {
		grid-column: 1 / -1;
		justify-content: space-between;
	}

	.bm-icons-lib__fields {
		grid-template-columns: 1fr;
	}
}

.bm-icons-lib__note,
.bm-icons-lib__meta {
	margin: 0;
	font-size: 0.82rem;
	color: var(--bm-on-surface-variant);
}

.bm-icons-lib__catalog-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding: 0.65rem 0.85rem;
	border-radius: 0.75rem;
	background: rgba(53, 37, 205, 0.06);
	font-size: 0.8rem;
	color: var(--bm-on-surface-variant);
}

.bm-icons-lib__catalog-bar span:first-child {
	font-weight: 700;
	color: var(--bm-primary);
}

.bm-icons-lib__error {
	margin: 0;
	color: #b91c1c;
	font-size: 0.875rem;
}

.bm-icons-lib__linkish {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	color: var(--bm-primary);
	cursor: pointer;
	text-decoration: underline;
	font: inherit;
}

.bm-icons-lib__import {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.bm-icons-lib__remove {
	appearance: none;
	align-self: flex-start;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #b91c1c;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 650;
	cursor: pointer;
	text-decoration: underline;
}
