/**
 * Matsuri Print Styles
 *
 * Print-optimized styles for order confirmation and account pages.
 * Loaded with media="print" so it only applies when printing.
 *
 * @since 1.1.0
 * @package WAM_Matsuri
 */

@media print {
	/* === Hide non-essential UI === */
	header,
	footer,
	nav,
	.site-header,
	.site-footer,
	.woocommerce-breadcrumb,
	.woocommerce-MyAccount-navigation,
	.wam-btn,
	button:not(.print-visible),
	.wam-mobile-map-btn,
	.wam-toast-container,
	.wam-selector-modal,
	.wam-map-modal,
	.sidebar,
	.widget-area,
	.wam-open-selector-btn,
	.wam-confirm-btn,
	.wam-view-map-btn,
	#wpadminbar {
		display: none !important;
	}

	/* === Base print reset === */
	body {
		background: #fff !important;
		color: #000 !important;
		font-size: 12pt;
		line-height: 1.5;
	}

	/* Full-width content */
	.site-content,
	.content-area,
	.woocommerce-MyAccount-content,
	main {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		float: none !important;
	}

	/* === Typography === */
	h1, h2, h3, h4, h5, h6 {
		color: #000 !important;
		page-break-after: avoid;
	}

	h1 { font-size: 18pt; }
	h2 { font-size: 16pt; }
	h3 { font-size: 14pt; }

	p, li {
		orphans: 3;
		widows: 3;
	}

	/* === Links === */
	a {
		color: #000 !important;
		text-decoration: underline;
	}

	a[href]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #666;
	}

	/* Don't show URL for internal/JS links */
	a[href^="#"]::after,
	a[href^="javascript"]::after,
	a[href^="mailto"]::after {
		content: "";
	}

	/* === Tables === */
	table {
		border-collapse: collapse;
		width: 100%;
	}

	th, td {
		border: 1px solid #ccc;
		padding: 6px 10px;
		text-align: left;
	}

	th {
		background-color: #f5f5f5 !important;
		font-weight: bold;
	}

	/* WooCommerce order table */
	.woocommerce-table--order-details,
	.shop_table {
		border: 1px solid #ccc;
	}

	/* === Page breaks === */
	.wam-card,
	.accordion-container,
	tr {
		page-break-inside: avoid;
	}

	/* === Remove backgrounds and shadows === */
	.wam-card,
	.wam-section-header,
	.accordion-title,
	.accordion-content {
		background: #fff !important;
		box-shadow: none !important;
		border-color: #ccc !important;
	}

	/* === Show accordion content for print === */
	.accordion-content {
		display: block !important;
		max-height: none !important;
		overflow: visible !important;
		padding: 10px !important;
	}

	/* === Images === */
	img {
		max-width: 100% !important;
		page-break-inside: avoid;
	}

	/* === Remove patterns and decorative elements === */
	.wam-pattern-seigaiha,
	.wam-pattern-asanoha,
	.wam-pattern-ichimatsu {
		background-image: none !important;
	}

	.wam-divider-gold {
		background: #ccc !important;
		height: 1px;
	}
}
