/* LMS Selling Invoice Clean Print & Preview Stylesheet */
@media print {
	body {
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
		font-size: 10pt;
		line-height: 1.4;
		margin: 0;
		padding: 0;
		color: #111827;
		background: #ffffff !important;
	}

	.lmss-invoice-no-print,
	.lmss-invoice-toolbar,
	.lmss-invoice-modal-overlay,
	header,
	footer,
	nav,
	.sidebar,
	#wpadminbar {
		display: none !important;
	}

	.lmss-print-invoice-container {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		box-shadow: none !important;
		border: none !important;
		background: #ffffff !important;
	}

	@page {
		size: A4 portrait;
		margin: 15mm 15mm 15mm 15mm;
	}

	div.page-break {
		page-break-after: always;
	}
}

/* Invoice Document Container */
.lmss-print-invoice-container {
	background: #ffffff;
	max-width: 780px;
	margin: 0 auto;
	padding: 40px 44px;
	color: #1f2937;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 13px;
	line-height: 1.5;
	box-sizing: border-box;
}

/* Top Action Toolbar (Modal Preview) */
.lmss-invoice-preview-wrapper {
	display: flex;
	flex-direction: column;
	background: #f3f4f6;
}

.lmss-invoice-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 20px;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 10;
}

.lmss-btn-print-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 22px;
	background: #111827;
	color: #ffffff;
	border: 1px solid #111827;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.lmss-btn-print-action:hover {
	background: #374151;
	border-color: #374151;
	color: #ffffff;
}

/* Header Section */
.lmss-inv-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
	margin-bottom: 24px;
}

.lmss-inv-company {
	flex: 1;
	max-width: 55%;
}

.lmss-inv-company-name {
	font-size: 22px;
	font-weight: 800;
	color: #111827;
	letter-spacing: -0.3px;
	margin: 0 0 4px 0;
	line-height: 1.2;
}

.lmss-inv-company-desc {
	font-size: 12px;
	color: #6b7280;
	margin: 0 0 8px 0;
	line-height: 1.4;
}

.lmss-inv-company-contact {
	font-size: 12px;
	color: #4b5563;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lmss-inv-meta {
	text-align: right;
	min-width: 220px;
}

.lmss-inv-heading {
	font-size: 24px;
	font-weight: 800;
	color: #111827;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin: 0 0 10px 0;
	line-height: 1.1;
}

.lmss-inv-meta-table {
	margin-left: auto;
	border-collapse: collapse;
}

.lmss-inv-meta-table th {
	text-align: left;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
	padding: 2px 10px 2px 0;
	white-space: nowrap;
}

.lmss-inv-meta-table td {
	text-align: right;
	font-size: 12.5px;
	color: #111827;
	padding: 2px 0;
	white-space: nowrap;
}

/* Status Tags */
.lmss-inv-status-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 4px;
	line-height: 1.3;
}

.lmss-inv-status-completed {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.lmss-inv-status-pending {
	background: #fffbeb;
	color: #b45309;
	border: 1px solid #fde68a;
}

.lmss-inv-status-refunded {
	background: #f3f4f6;
	color: #4b5563;
	border: 1px solid #e5e7eb;
}

/* Divider */
.lmss-inv-divider {
	height: 1px;
	background: #e5e7eb;
	margin-bottom: 24px;
}

/* Parties Grid (Billed To / Payment Details) */
.lmss-inv-parties {
	display: flex;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 28px;
}

.lmss-inv-party-col {
	flex: 1;
}

.lmss-inv-section-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #6b7280;
	margin-bottom: 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid #f3f4f6;
}

.lmss-inv-party-name {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	margin-bottom: 4px;
}

.lmss-inv-party-info {
	font-size: 12.5px;
	color: #4b5563;
	margin-bottom: 2px;
	line-height: 1.4;
}

.lmss-inv-party-id {
	font-size: 11.5px;
	color: #6b7280;
}

.lmss-inv-info-table {
	width: 100%;
	border-collapse: collapse;
}

.lmss-inv-info-table th {
	text-align: left;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
	padding: 3px 8px 3px 0;
	width: 40%;
}

.lmss-inv-info-table td {
	text-align: left;
	font-size: 12.5px;
	font-weight: 600;
	color: #111827;
	padding: 3px 0;
}

/* Line Items Table */
.lmss-inv-table-wrapper {
	margin-bottom: 24px;
}

.lmss-inv-table {
	width: 100%;
	border-collapse: collapse;
}

.lmss-inv-table thead th {
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #4b5563;
	padding: 9px 12px;
	text-align: left;
}

.lmss-inv-table tbody td {
	padding: 12px 12px;
	border-bottom: 1px solid #f3f4f6;
	color: #374151;
	font-size: 12.5px;
	vertical-align: top;
}

.lmss-col-num {
	width: 36px;
	color: #9ca3af;
}

.lmss-col-desc {
	width: auto;
}

.lmss-col-cat {
	width: 140px;
	color: #6b7280;
	font-size: 12px;
}

.lmss-col-qty {
	width: 60px;
}

.lmss-col-price {
	width: 110px;
	font-weight: 600;
	color: #111827;
}

.lmss-inv-table .text-center {
	text-align: center;
}

.lmss-inv-table .text-right {
	text-align: right;
}

.lmss-inv-item-name {
	font-weight: 600;
	color: #111827;
	margin-bottom: 2px;
}

.lmss-inv-item-sub {
	font-size: 11.5px;
	color: #6b7280;
}

/* Summary & Calculations */
.lmss-inv-summary-section {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
	margin-top: 8px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
}

.lmss-inv-summary-notes {
	flex: 1;
	max-width: 50%;
}

.lmss-inv-legal-note {
	font-size: 11.5px;
	color: #9ca3af;
	margin: 0;
	line-height: 1.5;
}

.lmss-inv-summary-calc {
	min-width: 260px;
}

.lmss-inv-calc-table {
	width: 100%;
	border-collapse: collapse;
}

.lmss-inv-calc-table th {
	text-align: left;
	font-size: 12.5px;
	font-weight: 500;
	color: #4b5563;
	padding: 5px 12px 5px 0;
}

.lmss-inv-calc-table td {
	text-align: right;
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	padding: 5px 0;
}

.lmss-inv-discount-row th,
.lmss-inv-discount-row td {
	color: #047857;
}

.lmss-inv-coupon-code {
	font-size: 11px;
	font-weight: 600;
	color: #059669;
}

.lmss-inv-total-row {
	border-top: 1.5px solid #111827;
}

.lmss-inv-total-row th {
	font-size: 14px;
	font-weight: 800;
	color: #111827;
	padding-top: 8px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.lmss-inv-total-row td {
	font-size: 16px;
	font-weight: 800;
	color: #111827;
	padding-top: 8px;
}