.editor-preview {
	min-width: 0;
	min-height: 0;
	display: grid;
	grid-template-rows: 3.15rem minmax(0, 1fr);
	background: var(--editor-canvas);
}

.editor-preview:focus {
	outline: none;
}

.editor-preview__header {
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-inline: 1.5rem;
	border-bottom: 1px solid #dce3de;
	background: rgba(248, 250, 249, 0.92);
}

.editor-preview__title {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.editor-preview__title > span:last-child {
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 0.55rem;
}

.editor-preview__title h2 {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	white-space: nowrap;
}

.editor-preview__title small {
	overflow: hidden;
	color: #626d66;
	font-size: 0.62rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.editor-preview__indicator {
	width: 0.45rem;
	height: 0.45rem;
	flex: 0 0 auto;
	border-radius: 50%;
	background: #8ca695;
	box-shadow: 0 0 0 0.25rem rgba(111, 143, 121, 0.12);
}

.editor-zoom {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	padding: 0.18rem;
	border: 1px solid #dce3de;
	border-radius: 0.55rem;
	background: #fff;
}

.editor-zoom button {
	width: 1.8rem;
	height: 1.65rem;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 0.35rem;
	background: transparent;
	color: #637068;
}

.editor-zoom button:hover:not(:disabled) {
	background: #eef2ef;
}

.editor-zoom button:focus-visible {
	outline: 0.15rem solid rgba(36, 54, 42, 0.55);
	outline-offset: 0.05rem;
}

.editor-zoom button:disabled {
	color: #b7beb9;
}

.editor-zoom button svg {
	width: 0.9rem;
	height: 0.9rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.editor-zoom__value {
	min-width: 2.6rem;
	color: #36423b;
	font-size: 0.62rem;
	text-align: center;
}

.editor-zoom .editor-zoom__fit {
	margin-left: 0.15rem;
	border-left: 1px solid #e3e7e4;
	border-radius: 0 0.35rem 0.35rem 0;
}

.editor-canvas {
	min-width: 0;
	min-height: 0;
	display: block;
	overflow: auto;
	overscroll-behavior: contain;
	padding: 0;
	background-color: var(--editor-canvas);
	background-image: radial-gradient(#cdd6d0 0.6px, transparent 0.6px);
	background-size: 0.9rem 0.9rem;
	scrollbar-color: #bec8c1 transparent;
	scrollbar-width: thin;
}

.editor-preview__actions {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.editor-canvas__viewport {
	width: max-content;
	min-width: 100%;
	min-height: 100%;
	display: grid;
	place-items: start center;
	padding: clamp(1.5rem, 4vw, 3.5rem);
}

.editor-page-frame {
	width: 38.13rem;
	height: 49.35rem;
	position: relative;
	flex: 0 0 auto;
}

.editor-page {
	width: 46.5rem;
	min-height: 60.1875rem;
	position: absolute;
	top: 0;
	left: 0;
	display: grid;
	place-items: center;
	overflow: hidden;
	transform: scale(0.82);
	transform-origin: top left;
	background: #fff;
	box-shadow: 0 1.5rem 3.5rem rgba(44, 60, 50, 0.18), 0 0.15rem 0.45rem rgba(44, 60, 50, 0.08);
	transition: transform 180ms ease;
}

.editor-page[data-state="loaded"] {
	display: block;
	padding: 2.85rem 3.1rem 2rem;
	background: var(--invoice-page, #fff);
}

.editor-page[data-layout="compact"][data-state="loaded"] {
	padding: 2.15rem 2.65rem 1.65rem;
}

.editor-page::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: var(--invoice-soft, #edf3ef);
	-webkit-mask: url("../images/invoice-decoration/proposal-serena.svg") center / 100% 100% no-repeat;
	mask: url("../images/invoice-decoration/proposal-serena.svg") center / 100% 100% no-repeat;
}

.editor-page::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	display: none;
}

.editor-page[data-background="none"]::after {
	display: none;
}

.editor-page[data-background="editorial-detail"]::after {
	display: block;
	background: var(--invoice-soft);
	-webkit-mask: url("../images/invoice-decoration/background-editorial-detail.svg") center / 100% 100% no-repeat;
	mask: url("../images/invoice-decoration/background-editorial-detail.svg") center / 100% 100% no-repeat;
}

.editor-page[data-template="executive"]::before {
	background: var(--invoice-accent);
	-webkit-mask-image: url("../images/invoice-decoration/proposal-executive.svg");
	mask-image: url("../images/invoice-decoration/proposal-executive.svg");
}

.editor-page[data-template="editorial"]::before {
	background: var(--invoice-accent);
	-webkit-mask-image: url("../images/invoice-decoration/proposal-editorial.svg");
	mask-image: url("../images/invoice-decoration/proposal-editorial.svg");
}

.editor-empty-state {
	max-width: 25rem;
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	padding: 3rem;
	color: #6f7972;
	text-align: center;
}

.editor-empty-state__icon {
	width: 4.75rem;
	height: 4.75rem;
	display: grid;
	place-items: center;
	margin-bottom: 1.25rem;
	border-radius: 1.35rem;
	background: #eef4f0;
	color: var(--editor-brand-dark);
}

.editor-empty-state__icon svg {
	width: 2.35rem;
	height: 2.35rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.4;
}

.editor-empty-state__eyebrow {
	color: var(--editor-brand);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.editor-empty-state h3 {
	margin: 0.5rem 0 0;
	color: var(--editor-brand-dark);
	font-size: 1.55rem;
	font-weight: 750;
	letter-spacing: -0.035em;
	line-height: 1.2;
}

.editor-empty-state p {
	margin: 0.85rem 0 0;
	font-size: 0.9rem;
	line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
	.editor-page {
		transition: none;
	}
}
