/**
 * Print sheet for the single property page.
 *
 * Enqueued with media="all". The screen block keeps the print-only sheet hidden
 * during normal browsing; the print block isolates the sheet (hiding all site
 * chrome and plugin output) and styles it as a clean property brochure.
 */

/* Hidden while browsing — only the print sheet carries this class. */
@media screen {
	.property-print-sheet {
		display: none !important;
	}
}

@media print {
	/* --- Isolation --- */
	/* The sheet is rendered on wp_footer as a direct child of <body> (this
	   site uses Elementor theme-builder header/footer, no #page wrapper).
	   Hide every top-level body node except the sheet; the sheet stays in
	   normal flow so it paginates cleanly across pages. */
	body > *:not(.property-print-sheet) {
		display: none !important;
	}

	.property-print-sheet {
		display: block !important;
		width: 100%;
		margin: 0;
		padding: 0;
		color: #000;
		background: #fff;
		font-family: var(--sir-font-sans, "Benton Sans", Arial, sans-serif);
		font-size: 10pt;
		line-height: 1.45;
	}

	@page {
		margin: 14mm 14mm 12mm;
	}

	/* Never append the raw href to printed links. */
	.property-print-sheet a[href]::after {
		content: "" !important;
	}

	.property-print-sheet a {
		color: #000;
		text-decoration: none;
	}

	.property-print-sheet img {
		max-width: 100%;
	}

	/* --- Header / branding --- */
	.pps-header {
		display: flex;
		align-items: center;
		gap: 12px;
		padding-bottom: 8px;
		margin-bottom: 14px;
		border-bottom: 2px solid #002349;
	}

	.pps-logo {
		height: 44px;
		width: auto;
	}

	.pps-office {
		font-family: var(--sir-font-serif, Georgia, "Times New Roman", serif);
		font-size: 12pt;
		color: #002349;
	}

	/* --- Intro: title / location / price --- */
	.pps-intro {
		margin-bottom: 14px;
		break-inside: avoid;
	}

	.pps-title {
		font-family: var(--sir-font-serif, Georgia, "Times New Roman", serif);
		font-size: 20pt;
		font-weight: 400;
		line-height: 1.2;
		margin: 0 0 4px;
		color: #002349;
	}

	.pps-location {
		font-size: 9pt;
		letter-spacing: 0.5px;
		text-transform: uppercase;
		color: #555;
		margin: 0 0 8px;
	}

	.pps-price .price-main {
		display: block;
		font-size: 14pt;
		font-weight: 700;
		color: #002349;
	}

	.pps-price .price-secondary {
		display: block;
		font-size: 10pt;
		color: #555;
	}

	/* --- Images --- */
	.pps-images {
		margin-bottom: 16px;
		break-inside: avoid;
	}

	.pps-featured img {
		width: 100%;
		max-height: 95mm;
		object-fit: cover;
	}

	.pps-thumbs {
		display: flex;
		gap: 6px;
		margin-top: 6px;
	}

	.pps-thumbs img {
		width: 25%;
		height: 28mm;
		object-fit: cover;
	}

	/* --- Key facts --- */
	.pps-facts {
		width: 100%;
		border-collapse: collapse;
		margin-bottom: 16px;
		break-inside: avoid;
	}

	.pps-facts th,
	.pps-facts td {
		text-align: left;
		padding: 4px 8px;
		border-bottom: 1px solid #ddd;
		font-size: 9.5pt;
		vertical-align: top;
	}

	.pps-facts th {
		width: 38%;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.4px;
		color: #555;
	}

	/* --- Sections --- */
	.pps-section {
		margin-bottom: 16px;
	}

	.pps-section-title {
		font-size: 10pt;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 1px;
		color: #002349;
		border-bottom: 1px solid #002349;
		padding-bottom: 3px;
		margin: 0 0 8px;
	}

	.pps-description {
		font-size: 10pt;
		text-align: justify;
	}

	.pps-description p {
		margin: 0 0 6px;
	}

	/* --- Amenities --- */
	.pps-amenities-cols {
		column-count: 3;
		column-gap: 18px;
	}

	.pps-amenity-group {
		break-inside: avoid;
		-webkit-column-break-inside: avoid;
		margin-bottom: 8px;
	}

	.pps-amenity-title {
		font-size: 9pt;
		font-weight: 700;
		margin: 0 0 3px;
		color: #002349;
	}

	.pps-amenity-group ul {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.pps-amenity-group li {
		font-size: 8.5pt;
		line-height: 1.35;
		color: #333;
	}

	/* --- Agents --- */
	.pps-agents {
		display: flex;
		flex-wrap: wrap;
		gap: 18px;
		border-top: 1px solid #ddd;
		padding-top: 12px;
	}

	.pps-agent {
		display: flex;
		gap: 10px;
		break-inside: avoid;
		align-items: flex-start;
	}

	.pps-agent-photo {
		width: 22mm;
		height: 22mm;
		object-fit: cover;
	}

	.pps-agent-name {
		font-family: var(--sir-font-serif, Georgia, serif);
		font-size: 11pt;
		color: #002349;
		margin: 0;
	}

	.pps-agent-role {
		font-size: 8pt;
		text-transform: uppercase;
		letter-spacing: 0.5px;
		color: #777;
		margin: 0 0 4px;
	}

	.pps-agent-office,
	.pps-agent-contact {
		font-size: 8.5pt;
		color: #333;
		margin: 0;
	}

	/* --- Footer --- */
	.pps-footer {
		display: flex;
		justify-content: space-between;
		margin-top: 18px;
		padding-top: 8px;
		border-top: 1px solid #ddd;
		font-size: 8pt;
		color: #777;
	}
}
