/* ==========================================================================
   PF print styles
   Enqueued from functions.php with media="print" (handle: pf-print), after
   Hello Elementor's reset.css. reset.css already strips backgrounds/shadows
   and forces black text in print; these rules build on that and undo its
   "link (url)" behavior. The @media wrapper is kept so the rules stay
   print-only even if the enqueue's media argument is ever changed.
   ========================================================================== */
@media print {

	@page { size: letter portrait; margin: 0.5in 0.6in; }

	/* ---------- Base ---------- */
	html, body {
		font-family: "neue-haas-grotesk-text", Helvetica, Arial, sans-serif !important;
		font-size: 10.5pt !important;
		line-height: 1.4 !important;
	}
	.woocommerce-MyAccount-content,
	.woocommerce-MyAccount-content :is(p, h1, h2, h3, h4, th, td, address, li, mark, a, span:not([class*="icon"])) {
		font-family: "neue-haas-grotesk-text", Helvetica, Arial, sans-serif !important;
	}
	h1, h2, h3, h4 { break-after: avoid; }
	img { max-width: 100% !important; height: auto !important; }

	/* Kill reset.css "(https://...)" after links. Keep it only for outbound
	   links inside article body copy, where the URL is actually useful. */
	a[href]::after { content: none !important; }
	.elementor-widget-theme-post-content a[href^="http"]:not([href*="professionalformulas.com"])::after,
	.elementor-widget-text-editor a[href^="http"]:not([href*="professionalformulas.com"])::after {
		content: " (" attr(href) ")" !important;
		font-size: 85%;
	}
	a, a:visited { color: inherit !important; text-decoration: none !important; }

	/* ---------- Things that never belong on paper ---------- */
	#wpadminbar,
	.skip-link,
	.elementor-location-footer,
	.grecaptcha-badge,
	iframe,
	.elementor-popup-modal,
	.dialog-widget,
	.pf-dynamic-popup-share,
	[class^="wsc_"],
	[id*="chat" i], [class*="chat-widget" i], [class*="chat-bubble" i],
	.woocommerce-notices-wrapper,
	.woocommerce-pagination,
	.elementor-widget-button,
	button,
	.button,
	form.cart { display: none !important; }

	/* ---------- Header: logo only ---------- */
	.elementor-location-header .elementor-widget:not(.elementor-widget-image) { display: none !important; }
	.elementor-location-header .e-con,
	.elementor-location-header .e-con-inner {
		display: block !important;
		min-height: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		border: 0 !important; /* container borders print as black lines */
	}
	.elementor-location-header {
		border-bottom: 1px solid #999;
		padding-bottom: 0.12in;
		margin-bottom: 0.25in;
	}
	.elementor-location-header .elementor-widget-image,
	.elementor-location-header .elementor-widget-image .elementor-widget-container { text-align: left !important; }
	/* The live logo is white-on-dark; swap in the dark 2026 version. */
	.elementor-location-header .elementor-widget-image img {
		content: url("/wp-content/uploads/2026/02/pf-logo-2026.png");
		width: 1.9in !important;
		height: auto !important;
		max-width: none !important;
	}

	/* Admin bar adds a top margin on html when logged in as admin */
	html { margin-top: 0 !important; }

	/* Let page content use the full sheet width */
	.e-con { --content-width: 100% !important; --padding-left: 0px !important; --padding-right: 0px !important; }
	.e-con-boxed > .e-con-inner { max-width: 100% !important; }
	.elementor-location-header ~ .elementor .e-con { --padding-top: 0px !important; }

	/* ---------- My Account shell ---------- */
	.woocommerce-MyAccount-navigation,
	.account-menu-wrapper { display: none !important; }
	.e-my-account-tab,
	.e-my-account-tab .woocommerce { display: block !important; padding: 0 !important; margin: 0 !important; }
	/* WooCommerce clearfix renders as an empty line above the content */
	.e-my-account-tab .woocommerce::before,
	.e-my-account-tab .woocommerce::after { display: none !important; }
	.woocommerce-MyAccount-content {
		width: 100% !important;
		float: none !important;
		padding: 0 !important;
		margin: 0 !important;
		border: 0 !important;
	}

	/* ---------- Single order (view-order) ---------- */
	/* "Order #123 was placed on ... and is currently Processing." */
	.woocommerce-view-order .woocommerce-MyAccount-content > p:first-of-type {
		font-size: 12pt !important;
		margin: 0 0 0.2in !important;
	}
	.woocommerce-MyAccount-content mark {
		background: none !important;
		font-weight: 700;
	}

	.woocommerce-MyAccount-content h2,
	.woocommerce-MyAccount-content h3 {
		font-size: 12pt !important;
		font-weight: 700 !important;
		text-transform: uppercase !important;
		letter-spacing: 0.04em;
		margin: 0.25in 0 0.08in !important;
		line-height: 1.2 !important;
	}

	.woocommerce-MyAccount-content table.shop_table {
		width: 100% !important;
		border-collapse: collapse !important;
		border: 0 !important;
		margin: 0 0 0.15in !important;
		font-size: 10pt !important;
	}
	.woocommerce-MyAccount-content table.shop_table th,
	.woocommerce-MyAccount-content table.shop_table td {
		padding: 5pt 6pt !important;
		border: 0 !important;
		border-bottom: 0.5pt solid #bbb !important;
		text-align: left;
		vertical-align: top;
		font-size: 10pt !important;
	}
	.woocommerce-MyAccount-content table.shop_table thead th {
		font-size: 8.5pt !important;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		border-bottom: 1pt solid #000 !important;
	}
	.woocommerce-MyAccount-content .shipped_via { display: block; font-size: 8.5pt; }
	.woocommerce-MyAccount-content table.shop_table .product-total,
	.woocommerce-MyAccount-content table.shop_table tfoot td { text-align: right !important; }
	.woocommerce-MyAccount-content .product-quantity { font-weight: 700; }
	.woocommerce-MyAccount-content .wc-item-meta {
		margin: 2pt 0 0 !important;
		padding: 0 !important;
		list-style: none;
		font-size: 8.5pt;
	}
	.woocommerce-MyAccount-content .wc-item-meta li,
	.woocommerce-MyAccount-content .wc-item-meta p { display: inline; margin: 0 6pt 0 0; }

	.woocommerce-MyAccount-content table.shop_table tfoot th {
		font-weight: 400 !important;
		text-transform: none !important;
	}
	/* Total row. On PF the Actions/Reorder row comes after Total, so target
	   the row before it, or the last row when there is no Actions row. */
	.woocommerce-MyAccount-content table.shop_table tfoot tr:has(+ tr > .order-actions--heading) th,
	.woocommerce-MyAccount-content table.shop_table tfoot tr:has(+ tr > .order-actions--heading) td,
	.woocommerce-MyAccount-content table.shop_table tfoot tr:last-child:not(:has(.order-actions--heading)) th,
	.woocommerce-MyAccount-content table.shop_table tfoot tr:last-child:not(:has(.order-actions--heading)) td {
		font-weight: 700 !important;
		font-size: 11pt !important;
		border-top: 1pt solid #000 !important;
		border-bottom: 0 !important;
	}
	/* The Actions / Reorder row */
	.woocommerce-MyAccount-content tr:has(.order-actions-button),
	.woocommerce-MyAccount-content tr:has(.order-actions--heading),
	.order-actions--heading,
	.order-actions-button,
	.order-again { display: none !important; }

	/* Order updates / notes */
	.woocommerce-OrderUpdates { list-style: none; padding: 0 !important; margin: 0 !important; }
	.woocommerce-OrderUpdate { break-inside: avoid; margin-bottom: 6pt; }
	.woocommerce-OrderUpdate-meta { font-size: 8.5pt; }

	/* Billing / shipping side by side */
	.woocommerce-customer-details { break-inside: avoid; margin-top: 0.2in; }
	.woocommerce-customer-details .woocommerce-columns--addresses {
		display: flex !important;
		gap: 0.4in;
	}
	.woocommerce-customer-details .woocommerce-column {
		flex: 1 1 0 !important;
		width: auto !important;
		float: none !important;
		max-width: none !important;
	}
	.woocommerce-customer-details address {
		font-style: normal !important;
		border: 0 !important;
		padding: 0 !important;
		font-size: 10pt;
		line-height: 1.45;
	}

	/* ---------- Orders list ---------- */
	.woocommerce-orders-table__header-order-actions,
	.woocommerce-orders-table__cell-order-actions { display: none !important; }
}
