/**
 * Plant care: screen hides QR appendix; print is a full offline-friendly sheet + optional QR section.
 */

@media screen {
	.plant-care-print-only {
		display: none !important;
	}

	.plant-care-print-qr-appendix {
		display: none !important;
	}
}

@media print {
	body.single-plant-care {
		background: #fff;
		color: #000;
	}

	body.single-plant-care .site-header,
	body.single-plant-care #colophon,
	body.single-plant-care .plant-care-print-actions {
		display: none !important;
	}

	/* Hero / decorative header: hide on paper; plain title comes from .plant-care-print-only */
	body.single-plant-care .plant-care-screen-only {
		display: none !important;
	}

	/* Option ACF pattern below the article — keep on screen, omit from print */
	body.single-plant-care .plant-care-bottom-pattern {
		display: none !important;
	}

	body.single-plant-care .plant-care-print-only {
		display: block !important;
		margin-bottom: 0.35rem;
	}

	body.single-plant-care .plant-care-print-branding {
		margin-bottom: 0.75rem;
		padding-bottom: 0.65rem;
		border-bottom: 1px solid #ddd;
	}

	body.single-plant-care .plant-care-print-logo {
		display: block;
		width: auto;
		max-width: 200px;
		height: auto;
	}

	body.single-plant-care .plant-care-print-only .plant-care-print-title {
		font-size: 1.75rem;
		font-weight: 700;
		line-height: 1.2;
		margin: 0;
		color: #046633;
	}

	/* Main article body — smaller headings on paper */
	body.single-plant-care .entry-content {
		max-width: none !important;
	}

	body.single-plant-care .plant-care-main-content h1,
	body.single-plant-care .plant-care-main-content h1.wp-block-heading {
		font-size: 1.35rem !important;
		line-height: 1.25;
	}

	body.single-plant-care .plant-care-main-content h2,
	body.single-plant-care .plant-care-main-content h2.wp-block-heading {
		font-size: 1.2rem !important;
		line-height: 1.25;
	}

	body.single-plant-care .plant-care-main-content h3,
	body.single-plant-care .plant-care-main-content h3.wp-block-heading {
		font-size: 1.05rem !important;
		line-height: 1.25;
	}

	body.single-plant-care .plant-care-main-content h4,
	body.single-plant-care .plant-care-main-content h4.wp-block-heading {
		font-size: 0.95rem !important;
		line-height: 1.25;
	}

	body.single-plant-care .plant-care-main-content h5,
	body.single-plant-care .plant-care-main-content h5.wp-block-heading,
	body.single-plant-care .plant-care-main-content h6,
	body.single-plant-care .plant-care-main-content h6.wp-block-heading {
		font-size: 0.9rem !important;
		line-height: 1.25;
	}

	/* Tighten gap between print title and first block (Gutenberg often adds margin-top on first block) */
	body.single-plant-care .plant-care-main-content {
		margin-top: 0 !important;
		padding-top: 0 !important;
		font-size: 10pt;
		line-height: 1.45;
	}

	body.single-plant-care .plant-care-main-content > :first-child {
		margin-block-start: 0 !important;
	}

	/*
	 * Hide carousel / related blocks in the article — same links appear in the QR appendix at the bottom.
	 * Scoped to .plant-care-main-content so the optional global pattern below the loop is unaffected.
	 */
	body.single-plant-care .plant-care-main-content .wp-block-wpny-videos-carousel,
	body.single-plant-care .plant-care-main-content .wp-block-wpny-posts-carousel,
	body.single-plant-care .plant-care-main-content .wp-block-wpny-related-products,
	body.single-plant-care .plant-care-main-content .videos-carousel,
	body.single-plant-care .plant-care-main-content .posts-carousel,
	body.single-plant-care .plant-care-main-content .related-products {
		display: none !important;
	}

	body.single-plant-care .entry-content a {
		color: #000;
		text-decoration: underline;
	}

	body.single-plant-care .entry-content img,
	body.single-plant-care .entry-content figure {
		max-width: 100% !important;
		height: auto !important;
	}

	/* Carousels / sliders: keep slides, drop chrome */
	body.single-plant-care .swiper-button-prev,
	body.single-plant-care .swiper-button-next,
	body.single-plant-care .video-slider-navigation,
	body.single-plant-care .articles-slider-navigation {
		display: none !important;
	}

	body.single-plant-care .swiper,
	body.single-plant-care .swiper-wrapper {
		display: block !important;
		height: auto !important;
		transform: none !important;
	}

	body.single-plant-care .swiper-slide {
		display: block !important;
		width: 100% !important;
		margin-bottom: 1rem;
		page-break-inside: avoid;
	}

	/* QR appendix */
	body.single-plant-care .plant-care-print-qr-appendix {
		display: block !important;
		margin-top: 2rem;
		padding-top: 1.5rem;
		border-top: 1px solid #ccc;
		page-break-before: auto;
	}

	body.single-plant-care .plant-care-print-item {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	/* Title + URL stack beside each QR — URLs wrap inside the box */
	body.single-plant-care .plant-care-print-item-text {
		min-width: 0;
	}

	body.single-plant-care .plant-care-print-item-title {
		line-height: 1.15 !important;
		font-size: 0.75rem !important;
		margin: 0 !important;
	}

	body.single-plant-care .plant-care-print-link-url {
		font-size: 8pt;
		line-height: 1.3;
		overflow-wrap: anywhere;
		word-break: break-all;
		max-width: 100%;
		hyphens: none;
	}

	body.single-plant-care .plant-care-print-qr-appendix h3.text-lg {
		line-height: 1.2 !important;
		font-size: 0.95rem !important;
	}

	body.single-plant-care .plant-care-qr-holder {
		width: 120px;
		min-width: 120px;
		flex-shrink: 0;
	}

	body.single-plant-care .plant-care-qr-holder svg {
		display: block;
		width: 120px !important;
		height: auto !important;
		max-width: 120px;
	}
}
