@page {
	margin: 0
}

* {
	margin: 0;
	padding: 0;
}

body {
	margin: 0;
	font-family: Lucida Grande,Lucida Sans Unicode,Lucida Sans,Geneva,Verdana,sans-serif;
	font-size: 13px;
	line-height: 20px;
}

.sheet {
	margin: 0;
	position: relative;
	box-sizing: border-box;
	page-break-after: always;
	width: 210mm;
	min-height: 296mm;
	padding: 10mm;
	overflow: visible;
	height: auto;
}

@media screen {
	body { background: #e0e0e0 }
	.sheet {
		background: white;
		box-shadow: 0 .5mm 2mm rgba(0,0,0,.3);
		margin: 5mm auto;
	}
}

@media print {
	body { width: 210mm }
}

.footer {
	text-align: center;
	max-width: 500px;
	margin: 0 auto;
	font-size: 13px;
	color: #999;
}

.header {
	display: flex;
	align-items: center;
	line-height: 16px;
	justify-content: space-between;

	.logo {
		width: 70px;
		height: 70px;
		background: #00ADEF;
		line-height: 70px;
		color: #fff;
		text-align: center;
		font-size: 12px;
	}

	.seller {
		width: 30%;
	}

	.seller:last-child {
		width: 35%;
	}
}

h1.title {
	border-bottom: 4px solid #00ADEF;
	text-transform: uppercase;
	text-align: right;
	font-size: 20px;
	font-weight: 900;
	padding-bottom: 10px;
	padding-top: 40px;
}

.subtitle {
	text-align: right;
	padding: 5px 0 0 0;
	margin: 0 0 40px 0;
}

.info {
	display: flex;
	margin: 0 0 40px 0;

	.buyer {
		width: 50%;
		font-weight: bold;

		h2 {
			text-transform: uppercase;
			font-weight: normal;
		}
	}

	.shop-details {
		border-collapse: collapse;
		border-spacing: 0;
		margin-left: auto;
		min-width: 300px;

		td {
			padding: 0 0 2px 0;
		}

		tr td:last-child {
			text-align: right;
			font-weight: bold;
		}

		tr:last-child {
			background: #00ADEF;
			color: #fff;

			td {
				padding: 5px;
			}
		}
	}
}

table.line-items {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;

	thead {
		font-weight: bold;

		th {
			border-bottom: 2px solid #00ADEF;
			text-align: right;
			padding: 5px;

			&:first-child {
				text-align: left;
				padding-left: 0;
			}
		}
	}

	tbody {

		tr:nth-child(2n+1) {
			background: #E6E6E6;
		}

		td {
			text-align: right;
			padding: 5px;

			&:first-child {
				text-align: left;

				span {
					display: block;
				}

				.note {
					font-size: 11px;
				}
			}
		}
	}

	tfoot {
		font-weight: bold;
		text-align: right;

		tr td {
			padding: 10px 5px;
		}

		tr td:first-child {
			text-align: left;
			padding-left: 0;
		}
	}
}

.total {
	text-align: right;
	padding: 40px 0 20px 0;

	h2 {
		font-weight: normal;
		margin: 0 0 10px 0;
	}

	h3 {
		font-weight: bold;
		color: #00ADEF;
		font-size: 20px;
	}
}

.invoice-note {
	p {
		margin: 0 0 10px 0;
	}
}

.debug {
	margin: 0 auto;
	padding: 20px;
	width: 600px;

	textarea {
		width: 100%;
		padding: 20px;
		box-sizing: border-box;
		height: 200px;
		background: rgba(255,255,255,0.5);
		border: 1px solid rgba(0,0,0,0.2);
	}
}

