/**
 * WA Print Form Button — print styles. v1.3
 * Drop-in replacement for assets/print.css. Pair with print-v1.2.js (unchanged).
 * Everything is scoped to @media print; never affects on-screen layout.
 *
 * v1.3: the isolated section now prints FULL WIDTH. On screen the form sits in a
 * content column (sharing the row with the sidebar), so it inherited that narrow
 * width on the sheet. We force the kept path + target to 100% width in print.
 */

.wa-print-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	line-height: 1.2;
}
.wa-print-btn__icon { font-size: 1.1em; }

@media print {

	/* Always hide the button, the admin bar, and anything marked wa-no-print. */
	.wa-print-btn-wrap,
	.wa-print-btn,
	#wpadminbar,
	.wa-no-print {
		display: none !important;
	}

	/* ---- Whole-page mode (no selector / selector not found): hide site chrome ---- */
	body.wa-print-page header.site-header,
	body.wa-print-page footer.site-footer,
	body.wa-print-page .elementor-location-header,
	body.wa-print-page .elementor-location-footer {
		display: none !important;
	}

	/* ---- Section mode: collapse everything OFF the path to the target ----
	   display:none (not visibility) so hidden content takes ZERO space — no blank
	   trailing pages, target prints in its normal position. */
	body.wa-print-isolate > *:not(.wa-print-ancestor):not(.wa-print-only),
	body.wa-print-isolate .wa-print-ancestor > *:not(.wa-print-ancestor):not(.wa-print-only) {
		display: none !important;
	}

	/* ---- Full width: stretch the kept path + the form to the full sheet ----
	   Overrides the on-screen content-column / Elementor container widths so the
	   form fills the page instead of printing at its narrow on-screen width. */
	body.wa-print-isolate .wa-print-ancestor,
	body.wa-print-isolate .wa-print-only {
		width: 100% !important;
		max-width: 100% !important;
		flex: 1 1 100% !important;   /* in case an ancestor is a flex column */
		float: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	body.wa-print-isolate .wa-print-only {
		margin-top: 0 !important;
	}
}
