/* Mailpuff Email Editor — Gutenberg shell, dashboard-integrated.
   No bundled webfonts (wp.org rule) — inherits wp-admin's system stack. */

/* Colours, borders, corners and type sizes come from tokens.css
   (var(--pp-*), var(--saddle-brand)), Mailpuff's palette for this page. */

/* Iconoir icons are stroke-based (fill="none" as an SVG attribute, and no
   class to hook), but the WordPress components CSS force-fills button svgs with
   `fill: currentColor`, and stylesheets beat presentation attributes. Honour
   the attribute everywhere this stylesheet loads (the editor screen and its
   portals). */
svg[fill="none"] {
	fill: none !important;
}

#mailpuff-editor {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	color: var(--pp-text);
}

.myp-editor {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 32px);
	background: var(--pp-canvas);
	-webkit-font-smoothing: antialiased;
}
@media screen and (max-width: 782px) {
	.myp-editor {
		height: calc(100vh - 46px);
	}
}

/* Top bar: logo · breadcrumb · editable name · steps */
.myp-editor__topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 52px;
	padding: 0 16px;
	background: var(--pp-surface);
	border-bottom: 1px solid var(--pp-border);
	flex-shrink: 0;
	z-index: 31;
}
.myp-editor__topbar-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1;
}
.myp-editor__logo {
	width: 30px;
	height: 30px;
	border-radius: var(--pp-r-tile);
	background: var(--pp-text);
	color: var(--pp-surface);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: var(--pp-text-md);
	text-decoration: none;
	flex-shrink: 0;
}
.myp-editor__logo:hover {
	background: var(--pp-text);
	color: var(--pp-surface);
}
.myp-editor__crumb {
	font-size: var(--pp-text-sm);
	font-weight: 600;
	color: var(--pp-text-secondary);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}
.myp-editor__crumb:hover {
	color: var(--pp-text);
}
.myp-editor__crumb-sep {
	color: var(--pp-text-secondary);
	flex-shrink: 0;
}
.myp-editor__crumb-sep svg {
	width: 18px;
	height: 18px;
}
/* Inline-editable campaign title with a pencil affordance. */
.myp-editor__name {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-width: 0;
	max-width: 460px;
	flex: 0 1 auto;
}
.myp-editor__name-input {
	width: 100%;
	min-width: 120px;
	height: 34px;
	border: 1px solid transparent;
	border-radius: var(--pp-r-control);
	background: transparent;
	padding: 0 30px 0 10px;
	font-size: var(--pp-text-md);
	font-weight: 600;
	color: var(--pp-text);
	text-overflow: ellipsis;
	transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.myp-editor__name-input::placeholder {
	color: var(--pp-text-secondary);
	font-weight: 500;
}
.myp-editor__name-input:hover {
	background: var(--pp-canvas);
}
.myp-editor__name-input:focus {
	outline: none;
	background: var(--pp-surface);
	border-color: var(--wp-admin-theme-color);
	box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
}
.myp-editor__name-pencil {
	position: absolute;
	right: 8px;
	color: var(--pp-text-secondary);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.12s;
}
.myp-editor__name:hover .myp-editor__name-pencil,
.myp-editor__name-input:focus + .myp-editor__name-pencil {
	opacity: 1;
}
.myp-editor__name-pencil svg {
	width: 16px;
	height: 16px;
}
.myp-editor__steps {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}
.myp-editor__step {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 32px;
	padding: 0 12px 0 8px;
	border: 0;
	background: transparent;
	border-radius: var(--pp-r-control);
	font-size: var(--pp-text-sm);
	font-weight: 600;
	color: var(--pp-text-secondary);
	cursor: pointer;
	white-space: nowrap;
}
.myp-editor__step:not(:last-child)::after {
	content: '';
	width: 18px;
	height: 1px;
	background: var(--pp-border);
	margin-left: 6px;
	margin-right: -6px;
}
.myp-editor__step:not(:disabled):hover {
	background: var(--pp-canvas);
	color: var(--pp-text);
}
.myp-editor__step-num {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--pp-canvas);
	color: var(--pp-text-secondary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--pp-text-2xs);
	font-weight: 700;
	flex-shrink: 0;
}
.myp-editor__step.is-active {
	color: var(--pp-text);
}
.myp-editor__step.is-active .myp-editor__step-num {
	background: var(--pp-text);
	color: var(--pp-surface);
}

/* Header: tools · document bar · actions */
.myp-editor__header {
	display: grid;
	grid-template-columns: 1fr minmax(0, 520px) 1fr;
	align-items: center;
	gap: 16px;
	height: 56px;
	padding: 0 12px;
	background: var(--pp-surface);
	border-bottom: 1px solid var(--pp-border);
	flex-shrink: 0;
	z-index: 30;
}
.myp-editor__tools {
	display: flex;
	align-items: center;
	gap: 2px;
	justify-self: start;
}
.myp-editor__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-self: end;
}

/* Thin divider between the inserter and the panel toggles */
.myp-editor__tool-sep {
	width: 1px;
	height: 20px;
	background: var(--pp-border);
	margin: 0 6px;
}

/* Consistent 34px icon buttons in the toolbar */
.myp-editor__tools .components-button.has-icon,
.myp-editor__actions .components-button.has-icon {
	width: 34px;
	height: 34px;
	min-width: 34px;
	border-radius: var(--pp-r-control);
	color: var(--pp-text-secondary);
	padding: 0;
}
.myp-editor__tools .components-button.has-icon svg,
.myp-editor__actions .components-button.has-icon svg {
	width: 22px;
	height: 22px;
}
.myp-editor__tools .components-button.has-icon:hover {
	background: var(--pp-canvas);
	color: var(--pp-text);
}
.myp-editor__tools .components-button.is-pressed,
.myp-editor__segmented .components-button.is-pressed {
	background: var(--pp-text);
	color: var(--pp-surface);
}
/* The "+" inserter — dark filled (neutral), like the native editor */
.myp-editor__add.components-button {
	background: var(--pp-text);
	color: var(--pp-surface);
}
.myp-editor__add.components-button:hover {
	background: var(--pp-text);
	color: var(--pp-surface);
}

/* Centered document bar */
.myp-editor__docbar {
	justify-self: stretch;
	min-width: 0;
}
.myp-editor__docbar-inner {
	height: 34px;
	border-radius: var(--pp-r-control);
	background: var(--pp-canvas);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0 16px;
	max-width: 100%;
}
.myp-editor__doc-title {
	font-size: var(--pp-text-sm);
	font-weight: 600;
	color: var(--pp-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.myp-editor__doc-type {
	font-size: var(--pp-text-sm);
	color: var(--pp-text-secondary);
	white-space: nowrap;
}

/* Segmented device / source control */
.myp-editor__segmented {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	background: var(--pp-track);
	border-radius: var(--pp-r-tile);
}
.myp-editor__segmented .components-button.has-icon {
	width: 32px;
	height: 32px;
	min-width: 32px;
	border-radius: var(--pp-r-control);
	color: var(--pp-text-secondary);
	padding: 0;
}

/* Saved indicator + primary action */
.myp-editor__saved {
	font-size: var(--pp-text-2xs);
	font-weight: 600;
	color: var(--pp-text-secondary);
	cursor: pointer;
	padding: 0 6px;
	white-space: nowrap;
}
.myp-editor__saved.is-dirty {
	color: var(--pp-text);
}
.myp-editor__saved:hover {
	color: var(--pp-text);
}
.myp-editor__next.components-button.is-primary {
	background: var(--wp-admin-theme-color);
	border-radius: var(--pp-r-control);
	height: 34px;
	padding: 0 16px;
	font-weight: 600;
	box-shadow: none;
}
.myp-editor__next.components-button.is-primary:hover {
	background: var(--wp-admin-theme-color-darker-10);
}

/* Cross-engine notices (v3 lock in Gutenberg mode, migration note in TipTap). */
.myp-editor__engine-banner {
	padding: 10px 20px;
	font-size: var(--pp-text-2xs);
	line-height: 1.5;
	color: var(--pp-warning);
	background: var(--pp-warning-bg);
	border-bottom: 1px solid var(--pp-border);
	display: flex;
	align-items: center;
	gap: 12px;
}
.myp-editor__engine-banner .components-button {
	margin-left: auto;
	flex-shrink: 0;
}

/* Body */
.myp-editor__body {
	flex: 1;
	display: flex;
	min-height: 0;
}
.myp-editor__canvas {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 36px 24px 80px;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: background 0.15s;
}

/* The email "sheet" = the content container (bg + radius are user-controlled).
   No border and no shadow: its own background sets it off. */
.myp-editor__sheet {
	max-width: 100%;
	min-height: 60vh;
	padding: 8px 0;
}
/* Footer sits BELOW the content, on the email background (like a real email). */
.myp-editor__footer-zone {
	max-width: 100%;
}


/* Secondary (left) sidebar: Blocks / List View */
.myp-editor__secondary {
	width: 350px;
	min-width: 350px;
	background: var(--pp-surface);
	border-right: 1px solid var(--pp-border);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	flex-shrink: 0;
}
.myp-editor__secondary-head {
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px 0 16px;
	font-size: var(--pp-text-sm);
	font-weight: 600;
	color: var(--pp-text);
	border-bottom: 1px solid var(--pp-border);
	flex-shrink: 0;
}
.myp-editor__secondary-body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.myp-editor__secondary-body > * {
	flex: 1;
	min-height: 0;
}
/* List view gets its own scroll wrapper. */
.myp-editor__listview {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 8px;
}

/* Inspector sidebar */
.myp-editor__sidebar {
	width: 300px;
	min-width: 300px;
	background: var(--pp-surface);
	border-left: 1px solid var(--pp-border);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.myp-editor__sidebar .block-editor-block-inspector__no-blocks {
	padding: 32px 20px;
	color: var(--pp-text-secondary);
	font-size: var(--pp-text-sm);
	text-align: center;
}
/* Email-Body | Block tabs */
.myp-editor__tabs {
	display: flex;
	border-bottom: 1px solid var(--pp-border);
	flex-shrink: 0;
}
.myp-editor__tabs button {
	flex: 1;
	height: 44px;
	border: 0;
	background: transparent;
	font-size: var(--pp-text-sm);
	font-weight: 600;
	color: var(--pp-text-secondary);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.myp-editor__tabs button.is-active {
	color: var(--pp-text);
	border-bottom-color: var(--pp-text);
}
.myp-editor__panel {
	flex: 1;
	overflow-y: auto;
}
.myp-editor__source-wrap {
	width: 100%;
	max-width: 820px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.myp-editor__source-tabs {
	display: flex;
	align-items: center;
	gap: 4px;
}
.myp-editor__source-tabs button {
	height: 30px;
	padding: 0 12px;
	border: 1px solid var(--pp-border);
	background: var(--pp-surface);
	border-radius: var(--pp-r-control);
	font-size: var(--pp-text-2xs);
	font-weight: 600;
	color: var(--pp-text-secondary);
	cursor: pointer;
}
.myp-editor__source-tabs button.is-active {
	background: var(--pp-text);
	color: var(--pp-surface);
	border-color: var(--pp-text);
}
.myp-editor__source-spacer {
	flex: 1;
}
.myp-editor__source {
	width: 100%;
	height: 100%;
	min-height: 64vh;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-r-tile);
	padding: 16px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: var(--pp-text-2xs);
	line-height: 1.6;
	color: var(--pp-text);
	background: var(--pp-surface);
	resize: none;
}
.myp-editor__source:focus {
	outline: none;
	border-color: var(--pp-text);
	box-shadow: 0 0 0 1px var(--pp-text);
}
.myp-editor__source-hint {
	margin: 0;
	font-size: var(--pp-text-2xs);
	color: var(--pp-text-secondary);
	line-height: 1.5;
}
.myp-editor__live-body {
	flex: 1;
	overflow: auto;
	display: flex;
	justify-content: center;
	padding: 24px 16px;
}
.myp-editor__preview-frame {
	height: 100%;
	min-height: 70vh;
	background: var(--pp-surface);
	border: 1px solid color-mix(in srgb, var(--pp-border) 60%, transparent);
	border-radius: var(--pp-r-panel);
}

/* Footer */
.myp-editor__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 34px;
	padding: 0 14px;
	background: var(--pp-surface);
	border-top: 1px solid var(--pp-border);
	flex-shrink: 0;
	z-index: 20;
}
.myp-editor__hint {
	font-size: var(--pp-text-2xs);
	color: var(--pp-text-secondary);
}

/* Block-editor tuning inside the sheet */
.myp-editor__sheet .block-editor-block-list__layout {
	font-family: 'Inter', -apple-system, sans-serif;
	font-size: var(--pp-text-md);
	color: var(--pp-text);
	line-height: 1.6;
	padding: 0 28px;
}
.myp-editor__sheet .block-editor-block-list__block {
	margin-top: 14px;
	margin-bottom: 14px;
}
.myp-editor__sheet h1.wp-block,
.myp-editor__sheet h2.wp-block,
.myp-editor__sheet h3.wp-block {
	color: var(--pp-text);
	font-weight: 700;
	letter-spacing: -0.01em;
}
/* Default appender prompt */
.myp-editor__sheet .block-editor-default-block-appender__content {
	color: var(--pp-text-secondary);
	font-size: var(--pp-text-md);
}

/* Native breadcrumb tidy-up */
.myp-editor__footer .block-editor-block-breadcrumb {
	background: transparent;
	border: 0;
	padding: 0;
}
.myp-editor__footer .block-editor-block-breadcrumb__button,
.myp-editor__footer .block-editor-block-breadcrumb__current {
	font-size: var(--pp-text-2xs);
	color: var(--pp-text-secondary);
}

/* Custom field controls (ColorField / SliderField / SegmentedField) */
.myp-field {
	margin-bottom: 0;
}
.myp-field__label {
	font-size: var(--pp-text-sm);
	font-weight: 500;
	color: var(--pp-text);
}
.myp-field--color {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.myp-field--slider .myp-field__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 9px;
}
.myp-field--seg .myp-field__label {
	display: block;
	margin-bottom: 8px;
}

/* Heading-sizes triple input (H1 / H2 / H3). */
.myp-field--hsizes .myp-field__label {
	display: block;
	margin-bottom: 8px;
}
.myp-hsizes {
	display: flex;
	gap: 8px;
}
.myp-hsizes__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.myp-hsizes__tag {
	font-size: var(--pp-text-2xs);
	font-weight: 600;
	color: var(--pp-text-secondary);
	text-align: center;
	letter-spacing: 0.02em;
}
.myp-hsizes__item .myp-num {
	width: 100%;
}

/* ColorField — swatch "well" trigger: current colour + hex in a quiet pill. */
.myp-colorwell {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 30px;
	padding: 0 10px 0 6px;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-r-control);
	background: var(--pp-surface);
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.myp-colorwell:hover {
	border-color: var(--pp-border-strong);
}
.myp-colorwell[aria-expanded='true'] {
	border-color: var(--pp-text-secondary);
}
.myp-colorwell__swatch {
	width: 17px;
	height: 17px;
	border-radius: 50%;
	/* A hairline inside, so a white swatch still shows its edge. */
	box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
	flex-shrink: 0;
}
.myp-colorwell__swatch.is-empty {
	background: repeating-linear-gradient(
		45deg,
		var(--pp-surface),
		var(--pp-surface) 3px,
		var(--pp-border) 3px,
		var(--pp-border) 5px
	);
}
.myp-colorwell__hex {
	font-size: var(--pp-text-2xs);
	font-weight: 500;
	color: var(--pp-text-secondary);
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
}

/* ColorPanel — theme swatch grid + the full custom picker underneath. */
.myp-colorpanel {
	width: 240px;
	padding: 12px;
}
.myp-colorpanel__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}
.myp-colorpanel__tile {
	width: 26px;
	height: 26px;
	padding: 0;
	border-radius: var(--pp-r-control);
	border: 1px solid var( --pp-border );
	cursor: pointer;
	transition: transform 0.1s ease;
}
.myp-colorpanel__tile:hover {
	transform: scale( 1.07 );
}
.myp-colorpanel__tile.is-active {
	box-shadow: 0 0 0 2px var(--pp-surface), 0 0 0 4px var(--wp-admin-theme-color);
}
.myp-colorpanel__picker {
	border-top: 1px solid var(--pp-border);
	padding-top: 10px;
}
.myp-colorpanel__picker .components-color-picker {
	width: 100%;
}
.myp-colorpanel-pop {
	padding: 0;
}

/* SegmentedField — gray track, white active pill. */
.myp-seg {
	display: flex;
	gap: 2px;
	padding: 2px;
	background: var(--pp-track);
	border-radius: var(--pp-r-tile);
}
.myp-seg__btn {
	flex: 1;
	height: 26px;
	border: 0;
	border-radius: var(--pp-r-control);
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: var(--pp-text-2xs);
	font-weight: 600;
	color: var(--pp-text-secondary);
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease,
		box-shadow 0.12s ease;
}
.myp-seg__btn:hover:not( .is-active ) {
	color: var(--pp-text);
}
.myp-seg__btn.is-active {
	background: var(--pp-surface);
	color: var(--pp-text);
	box-shadow: 0 0 0 1px var(--pp-border);
}

/* SliderField — number input + custom-styled native range */
.myp-num {
	width: 56px;
	height: 28px;
	border: 1px solid var(--pp-border-strong);
	border-radius: var(--pp-r-control);
	padding: 0 8px;
	font-size: var(--pp-text-2xs);
	font-weight: 500;
	color: var(--pp-text);
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
.myp-num::-webkit-outer-spin-button,
.myp-num::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.myp-num:focus {
	outline: none;
	border-color: var(--wp-admin-theme-color);
	box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
}
.myp-range {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 5px;
	border-radius: 999px;
	background: linear-gradient(
		to right,
		var(--pp-text) var(--pct, 0%),
		var(--pp-border) var(--pct, 0%)
	);
	cursor: pointer;
}
.myp-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--pp-surface);
	border: 1.5px solid var(--pp-text);
	cursor: pointer;
}
.myp-range::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--pp-surface);
	border: 1.5px solid var(--pp-text);
	cursor: pointer;
}
.myp-range:focus {
	outline: none;
}
.myp-range:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp-admin-theme-color) 35%, transparent);
}
.myp-range:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp-admin-theme-color) 35%, transparent);
}

/* Custom block panel (simple flat grid, our icons) */
.myp-bp {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}
.myp-bp__search {
	padding: 12px 12px 8px;
	flex-shrink: 0;
}
.myp-bp__search .components-search-control__input {
	height: 38px;
	border-radius: var(--pp-r-control);
	border: 1px solid var(--pp-border);
	background: var(--pp-canvas);
}
.myp-bp__grid {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 6px 12px 16px;
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 8px;
	align-content: start;
}
.myp-bp__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 14px 6px;
	border: 1px solid var(--pp-border);
	border-radius: var(--pp-r-tile);
	background: var(--pp-surface);
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s;
}
.myp-bp__item:hover {
	background: var(--pp-canvas);
	border-color: var(--pp-border-strong);
}
.myp-bp__icon {
	display: inline-flex;
	color: var(--pp-text);
}
.myp-bp__icon svg {
	width: 24px;
	height: 24px;
}
.myp-bp__label {
	font-size: var(--pp-text-2xs);
	font-weight: 500;
	color: var(--pp-text-secondary);
	text-align: center;
	line-height: 1.2;
}
.myp-bp__empty {
	grid-column: 1 / -1;
	padding: 20px;
	text-align: center;
	color: var(--pp-text-secondary);
	font-size: var(--pp-text-2xs);
}

/* Merge tags (smartcodes) picker */
.myp-smartcodes {
	width: 280px;
	max-height: 360px;
	display: flex;
	flex-direction: column;
}
.myp-smartcodes__search {
	padding: 10px 10px 6px;
	flex-shrink: 0;
}
.myp-smartcodes__list {
	overflow-y: auto;
	padding: 4px 6px 8px;
}
.myp-smartcodes__group-title {
	margin: 6px 8px 2px;
	font-size: var(--pp-text-2xs);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--pp-text-secondary);
}
.myp-smartcodes__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	padding: 7px 8px;
	border: 0;
	border-radius: var(--pp-r-control);
	background: transparent;
	cursor: pointer;
	text-align: left;
}
.myp-smartcodes__item:hover {
	background: var(--pp-canvas);
}
.myp-smartcodes__label {
	font-size: var(--pp-text-sm);
	font-weight: 500;
	color: var(--pp-text);
}
.myp-smartcodes__code {
	font-size: var(--pp-text-2xs);
	color: var(--pp-text-secondary);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	white-space: nowrap;
}
.myp-smartcodes__empty {
	padding: 16px;
	text-align: center;
	color: var(--pp-text-secondary);
	font-size: var(--pp-text-2xs);
}

/* Disabled toolbar buttons (undo/redo at history ends) */
.myp-editor__tools .components-button:disabled,
.myp-editor__tools .components-button[aria-disabled='true'] {
	opacity: 0.3;
	cursor: default;
}

/* Live footer preview (bottom of the editing canvas) */
.myp-footer-preview {
	padding: 24px 24px 28px;
	text-align: center;
	user-select: none;
}
/* Letter's footer starts where the canvas text does (.ProseMirror's 36px). */
.myp-footer-preview.is-left {
	padding-left: 36px;
	padding-right: 36px;
	text-align: left;
}
.myp-footer-preview__divider {
	height: 1px;
	background: var(--pp-border);
	margin: 0 0 16px;
}
.myp-footer-preview__company {
	font-size: var(--pp-text-sm);
	font-weight: 600;
	color: var(--pp-text-secondary);
	margin-bottom: 4px;
}
.myp-footer-preview__addr,
.myp-footer-preview__note,
.myp-footer-preview__text {
	font-size: var(--pp-text-2xs);
	color: var(--pp-text-secondary);
	margin-bottom: 8px;
	line-height: 1.6;
}
.myp-footer-preview__link {
	font-size: var(--pp-text-2xs);
	color: var(--pp-text-secondary);
	text-decoration: underline;
}
/* On a dark email background (a dark theme): the sent footer's light greys. */
.myp-footer-preview.is-dark .myp-footer-preview__divider {
	background: #2e333b;
}
.myp-footer-preview.is-dark .myp-footer-preview__company {
	color: #d4d7dd;
}
.myp-footer-preview.is-dark .myp-footer-preview__addr,
.myp-footer-preview.is-dark .myp-footer-preview__note,
.myp-footer-preview.is-dark .myp-footer-preview__text,
.myp-footer-preview.is-dark .myp-footer-preview__link {
	color: #a1a7b0;
}

/* Saddle's notices do not belong on a full-screen editor. */
body.mailpuff-editor-screen .notice,
body.mailpuff-editor-screen .update-nag,
body.mailpuff-editor-screen .updated,
body.mailpuff-editor-screen .error {
	display: none !important;
}

/* Primary buttons are the brand, as everywhere in Saddle; the MJML dialog
 * renders outside #mailpuff-editor, so it is named too. */
#mailpuff-editor .components-button.is-primary,
.myp-mjml-dialog .components-button.is-primary {
	background: var(--saddle-brand);
	color: var(--pp-on-action);
}
#mailpuff-editor .components-button.is-primary:hover:not(:disabled),
#mailpuff-editor .components-button.is-primary:active:not(:disabled),
.myp-mjml-dialog .components-button.is-primary:hover:not(:disabled),
.myp-mjml-dialog .components-button.is-primary:active:not(:disabled) {
	background: var(--saddle-brand-hover);
	color: var(--pp-on-action);
}
