/* CLAUDE #908: the live preview beside a listing's form (forms/live-preview.js), in T-Pane or Columns as wide as T-Pane's: the form and the
   listing's page side by side, half each, the page under the bar as the form scrolls; the question index opens from its button, as there's
   no room for it beside the form */
iframe.app-live-preview {
	display: none;
}

@media (min-width: 1080px) {
	html.app-live-preview-on body { /* the form templates' body is a column, as tall as the window (its u-flex-direction-column, an !important
	                                    utility, and its own style="height: 100vh"): a row here, as tall as the form, so the page stays beside it */
		display: flex;
		flex-direction: row !important;
		align-items: flex-start;
		height: auto !important;
	}

	html.app-live-preview-on main {
		flex: 1 1 0;
		min-width: 0;
		margin: 0 !important;
	}

	html.app-live-preview-on iframe.app-live-preview {
		display: block;
		position: sticky;
		top: var(--app-bar-h, 0px);
		flex: 1 1 0;
		min-width: 0;
		height: calc(100vh - var(--app-bar-h, 0px));
		border: 0;
		border-left: 2px solid var(--accent-color, #f5c400);
	}

	html.app-live-preview-on nav.question_index:not(.open) {
		display: none !important;
	}

	html.app-live-preview-on button.question_index_toggle {
		display: block !important;
	}

	/* the Questions list opens over the form's left edge, as on a narrow window (question-index.css), where the form starts: the window's left,
	   or after the sidebar while it shows (not centered, nor beside the form, as without the preview) */
	html.app-live-preview-on nav.question_index {
		right: auto !important;
		left: 0 !important;
		width: min(20rem, 85%) !important;
		max-width: none !important;
		padding-bottom: 4.5rem !important;
		border-right: 1px solid var(--horizontalRuleColor, #888) !important;
		background-color: var(--backgroundColor, #111) !important;
		box-shadow: 0 0 1rem rgba(0, 0, 0, 0.6) !important;
	}

	html.app-live-preview-on button.question_index_toggle {
		left: 1rem !important;
	}

	html.app-live-preview-on.app-apple.app-sidebar-open nav.question_index {
		left: var(--app-sidebar-w, 0px) !important;
	}

	html.app-live-preview-on.app-apple.app-sidebar-open button.question_index_toggle {
		left: calc(var(--app-sidebar-w, 0px) + 1rem) !important;
	}
}
