/* Main Body */
@page {
	margin-top: 1cm;
	margin-bottom: 3cm;
	margin-left: 2cm;
	margin-right: 2cm;
	footer: docFooter;
}

body {
	background: #fff;
	color: #000;
	margin: 0cm;
	font-family: 'Open Sans', sans-serif;
	/* want to use custom fonts? http://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/using-custom-fonts/ */
	font-size: 9pt;
	line-height: 100%; /* fixes inherit dompdf bug */
	overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
	font-weight: bold;
	margin: 0;
}

h1 {
	font-size: 16pt;
	margin: 5mm 0;
}

h2 {
	font-size: 14pt;
}

h3, h4 {
	font-size: 9pt;
}


ol,
ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

li {
	margin-bottom: 0.75em;
}

p {
	margin: 0;
	padding: 0;
}

p + p {
	margin-top: 1.25em;
}

a {
	text-decoration: none;
}

/* Basic Table Styling */
table {
	border-collapse: collapse;
	border-spacing: 0;
	page-break-inside: always;
	border: 0;
	margin: 0;
	padding: 0;
}

th, td {
	vertical-align: top;
	text-align: left;
}

table.container {
	width: 100%;
	border: 0;
}

tr.no-borders,
td.no-borders {
	border: 0 !important;
	border-top: 0 !important;
	border-bottom: 0 !important;
	padding: 0 !important;
	width: auto;
}

td.notes-cell {
	width: 60%;
}

td.totals-cell {
	width: 40%;
}

div.bottom-spacer {
	clear: both;
	height: 8mm;
}

span.label {
	font-weight: bold;
}

/* Header */
table.head {
	margin-bottom: 12mm;
}

td.header img {
	max-height: 3cm; /* may be overridden by the settings */
	max-width: 100%;
	width: auto;
}

/* .mpdf td.header img { */
	/* img width & heights can only be set with inline styles (mpdf 8.0) https://github.com/mpdf/mpdf/issues/366 */
	/* using wpo_wcpdf_header_logo_img_element filter instead in wcpdf-mpdf.php */
/* } */

td.header {
	font-size: 16pt;
	font-weight: 700;
}

td.shop-info {
	width: 40%;
}

.document-type-label {
	text-transform: uppercase;
}

/* Recipient addresses & order data */
table.order-data-addresses {
	width: 100%;
	margin-bottom: 10mm;
}

table.order-data-addresses td.address,
table.order-data-addresses td.order-data {
	overflow-wrap: anywhere;
}

td.order-data {
	width: 40%;
}

td.order-data table {
	width: 100%;
}

td.order-data table th {
	font-weight: normal;
	padding-right: 2mm;
	width: 50%;
	overflow-wrap: break-word;
}

.invoice .shipping-address {
	width: 30%;
}

.packing-slip .billing-address {
	width: 30%;
}

/* Order details */
table.order-details,
table.notes-totals {
	width: 100%;
	margin-bottom: 0;
	page-break-before: avoid;
}

.quantity,
.price {
	width: 20%;
}

.order-details tbody {
	border-bottom: 1px solid #ccc;
}

.order-details tr,
.notes-totals tr {
	page-break-inside: always;
	page-break-after: auto;
}

.order-details td,
.order-details th,
.notes-totals td,
.notes-totals th {
	border-bottom: 1px solid #ccc;
	border-top: 1px solid #ccc;
	padding: 0.375em;
}

.order-details th,
.notes-totals th {
	font-weight: bold;
	text-align: left;
}

.order-details thead th {
	color: white;
	background-color: black;
	border-color: black;
}

/* product bundles compatibility */
.order-details tr.bundled-item td.product {
	padding-left: 5mm;
}

.order-details tr.product-bundle td,
.order-details tr.bundled-item td {
	border: 0;
}

.order-details tr.bundled-item.hidden {
	display: none;
}

/* item meta formatting */
.item-meta {
	margin: 8px 0 0 0;
	font-size: 7pt;
	line-height: 7pt;
	overflow-wrap: anywhere;
}

/* In Dompdf, '.wc-item-meta' is applied to a 'ul' element, whereas with the mPDF extension, it's a 'div' instead. For more details, refer to 'wpo_wcpdf_mpdf_modify_html()'. */
.wc-item-meta {
	margin: 0;
}

.wc-item-meta li {
	margin-top: 4px;
	margin-left: 0;
}

.wc-item-meta li p,
.wc-item-meta li dd {
	display: inline;
}

.wc-item-meta p,
.wc-item-meta dd,
.item-meta p {
	margin-top: 4px;
	margin-left: 0;
}

/* Notes & Totals */
.document-notes,
.customer-notes {
	margin-top: 5mm;
	overflow-wrap: anywhere;
}

table.totals {
	width: 100%;
	margin-top: 0;
	table-layout: fixed;
}

table.totals th,
table.totals td {
	border: 0;
	border-top: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
}

table.totals tr:nth-child(1) th,
table.totals tr:nth-child(1) td {
	border-top: 0;
	border-bottom: 0;
}

table.totals th.description,
table.totals td.price {
	width: 50%;
}

table.totals tr.order_total td,
table.totals tr.order_total th {
	border-top: 2px solid #000;
	border-bottom: 2px solid #000;
	font-weight: bold;
}

table.totals tr.payment_method {
	display: none;
}

/* mPDF */
.rtl {
	direction: rtl;
}

/* Footer Imprint */
/* mPDF footer styles are hooked via wpo_wcpdf_mpdf_premium_style_overrides() */
#footer {
	position: absolute;
	bottom: -2cm;
	left: 0;
	right: 0;
	height: 2cm; /* if you change the footer height, don't forget to change the bottom (=negative height) and the @page margin-bottom as well! */
	text-align: center;
	border-top: 0.1mm solid gray;
	margin-bottom: 0;
	padding-top: 2mm;
}

/* page numbers */
.pagenum:before {
	content: counter(page);
}

.pagenum,.pagecount {
	font-family: sans-serif;
}
