/* Fontxsis Preview fork — no iframe titlebar (Export is in the right dock). */
html[data-xfp-embed] {
	--ls-header-h: 0px;
}

html[data-xfp-embed] .ls-header,
html[data-xfp-embed] [data-xfp-titlebar] {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

html[data-xfp-embed] .xfp-header-export,
html[data-xfp-embed] [data-xfp-header-export] {
	display: none !important;
}

/* Empty preview toolbar (only held Export / Save As Project). */
html[data-xfp-embed] .fi-preview-toolbar,
html[data-xfp-embed] [data-fi-controls] {
	display: none !important;
}

html[data-xfp-embed] .xfp-canvas-modal,
html[data-xfp-embed] .fi-new-doc {
	top: 0 !important;
}

/* Export lives at top of right properties dock. */
html[data-xfp-embed] .fi-props-panel__export,
html[data-xfp-embed] [data-fx-preview-export] {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0 0 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-xfp-embed] .fi-export__trigger--dock {
	width: 100%;
	justify-content: center;
	border-radius: 10px;
}

/* Fontxsis Preview: no document tab strip (Untitled-1, etc.). */
html[data-xfp-embed] .fi-doc-tabs,
html[data-xfp-embed] [data-fi-doc-tabs] {
	display: none !important;
}

/* Sticky / floating artboard dock */
html[data-xfp-embed] .fi-artboard-dock,
html[data-xfp-embed] [data-fi-artboard-dock] {
	display: none !important;
}

html[data-xfp-embed] [data-fi-modal-font-col],
html[data-xfp-embed] .xfp-canvas-modal__col--font {
	display: none !important;
}

html[data-xfp-embed] [data-fi-modal-custom-col],
html[data-xfp-embed] .xfp-canvas-modal__col--custom {
	display: flex !important;
	flex-direction: column;
	gap: 12px;
}

html[data-xfp-embed] .xfp-canvas-modal__custom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	padding: 16px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.03);
	cursor: pointer;
}

html[data-xfp-embed] .xfp-canvas-modal__custom.is-active {
	border-color: rgba(47, 111, 237, 0.85);
	box-shadow: 0 0 0 1px rgba(47, 111, 237, 0.35);
}

html[data-xfp-embed] .xfp-canvas-modal__custom-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

html[data-xfp-embed] .xfp-canvas-modal__custom-label {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

html[data-xfp-embed] .xfp-canvas-modal__custom-input {
	width: 7.5rem;
	max-width: 100%;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(0, 0, 0, 0.25);
	color: #f4f6fb;
	font: inherit;
	font-size: 0.9rem;
}

html[data-xfp-embed] .xfp-canvas-modal__custom-input:focus {
	outline: none;
	border-color: rgba(47, 111, 237, 0.9);
}

html[data-xfp-embed] .xfp-canvas-modal__custom-sep,
html[data-xfp-embed] .xfp-canvas-modal__custom-unit {
	padding-bottom: 10px;
	color: rgba(255, 255, 255, 0.45);
	font-size: 0.9rem;
}

html[data-xfp-embed] .xfp-canvas-modal__custom-hint {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.45);
}

/* Light theme: readable custom-canvas chrome on white modal */
html[data-xfp-embed][data-ls-theme='light'] .fi-props-panel__export,
html[data-xfp-embed][data-ls-theme='light'] [data-fx-preview-export] {
	border-bottom-color: rgba(11, 13, 15, 0.1);
}

html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom {
	border-color: rgba(11, 13, 15, 0.12);
	background: rgba(11, 13, 15, 0.03);
}

html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom.is-active {
	border-color: rgba(51, 102, 255, 0.85);
	box-shadow: 0 0 0 1px rgba(51, 102, 255, 0.3);
}

html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom-label,
html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom-sep,
html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom-unit,
html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom-hint {
	color: rgba(11, 13, 15, 0.55);
}

html[data-xfp-embed][data-ls-theme='light'] .xfp-canvas-modal__custom-input {
	border-color: rgba(11, 13, 15, 0.14);
	background: #ffffff;
	color: #0b0d0f;
}

/* Artboard chrome: hide title bar + close */
html[data-xfp-embed] .fi-artboard-frame__header,
html[data-xfp-embed] [data-fi-artboard-header] {
	display: none !important;
}

/* Assets → Logo: no Pro badge in Fontxsis Preview embed */
html[data-xfp-embed] .fi-watermark__pro-badge,
html[data-xfp-embed] [data-fi-watermark-pro-badge] {
	display: none !important;
}

html[data-xfp-embed] .fi-watermark.is-pro-locked .fi-watermark__upload-btn,
html[data-xfp-embed] .fi-watermark.is-pro-locked .fi-watermark__delete {
	opacity: 1;
	pointer-events: auto;
}
