/* resets */
.purchase-order__container table,
.purchase-order__container table p {
	margin: 0;
}

/* resets background colors */
.purchase-order__container
	table
	tbody
	> tr:nth-child(odd)
	> td:not(.order-body__total-bu),
.purchase-order__container table tbody > tr:nth-child(odd) > th,
.purchase-order__container table tbody tr:hover > td:not(.order-body__total-bu),
.purchase-order__container table tbody tr:hover > th {
	background: #fff;
}

/* resets border and background colors */
.purchase-order__container table th,
.purchase-order__container table td {
	border: none;
	background: #fff;
}

/* removes top border of orders table */
.purchase-order__container
	.purchase-order__orders
	thead:first-child
	tr:first-child
	th {
	border-block-start: none;
}

/* # nav */
.past-po__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.past-po__nav .back_from_past_po_btn,
.past-po__nav .back_from_past_po_btn:hover {
	width: 27px;
	height: 27px;
	padding: 0;
	border-radius: 50%;
	border-color: #000;
	color: #000;
	background-color: #fff;
}

.past-po__nav .back_from_past_po_btn:after {
	content: '\2190';
}

.past-po__nav #purchase-order-print {
	background: rgba(222, 90, 97, 1);
	border-color: rgba(222, 90, 97, 1);
	color: #fff;
}

.past-po__nav #purchase-order-print:hover {
	background: rgba(154, 63, 68, 1);
	border-color: rgba(154, 63, 68, 1);
}

/* # container */
.purchase-order__container {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

/* # header */
.purchase-order__header {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: 1fr auto;
}

/* ## header image */

.purchase-order__header-img {
	grid-column-start: 2;
	justify-self: end;
	max-width: 125px;
}

/* ## header order number */

.purchase-order__number {
	grid-column-start: 2;
	justify-self: end;
	text-align: end;
	font-weight: 700;
	font-size: 2rem;
}

/* ## header info box */

.purchase-order__header .purchase-order__info-table {
	grid-column-start: 1;
	grid-row: 1 / -1;
}

.purchase-order__info-table {
	border: 1px solid #000;
}

.purchase-order__info-table th,
.purchase-order__info-table td {
	padding: 5px 15px;
	vertical-align: middle;
}

.purchase-order__info-table tbody tr th {
	border-right: 1px solid #000;
	text-align: end;
}

.purchase-order__info-table .table-row:nth-of-type(2) th,
.purchase-order__info-table .table-row:nth-of-type(2) td {
	border-top: 1px solid black;
}

.purchase-order__info-table p {
	margin: 0;
	font-size: 0.7rem;
}

/* # orders table */

.purchase-order__orders {
	border: none;
}

.purchase-order__orders thead th {
	font-weight: 500;
	font-size: 1.1rem;
	text-transform: uppercase;
	vertical-align: bottom;
}

.purchase-order__orders thead .order-header__total-bu {
	font-weight: 700;
}

.order-header__product {
	text-align: left;
}

.purchase-order__orders
	tbody
	td:not(.order-body__name):not(.order-body__subtotal) {
	text-align: center;
}

.purchase-order__orders .order-header__subtotal,
.purchase-order__orders tbody .order-body__subtotal,
.purchase-order__orders .order-footer__amount {
	text-align: right;
}

.purchase-order__orders tbody .order-body__total-bu,
.purchase-order__orders tbody .order-body__total-bu:hover {
	background: rgba(239, 233, 232, 0.5);
	font-weight: 700;
}

.purchase-order__orders tbody tr:nth-child(1) td {
	border-top: 2px solid #000;
}

.purchase-order__orders tbody tr td {
	border-bottom: 2px solid #000;
}

.order-body__pao,
.order-body__lfi,
.order-body__total-bu {
	width: 10ch;
}

.purchase-order__orders tfoot td {
	padding: 5px 15px;
}

.purchase-order__orders tfoot td:not(.order-footer__amount) {
	text-align: right;
}

/* # notes section */
.purchase-order__notes {
	border: 1px solid #000;
	padding: 1.2rem;
}

.purchase-order__notes-block {
	width: 100%;
	height: 100%;
	min-height: 50px;
}

@media only print {
	.page-header .entry-title,
	.past_po__page-header {
		display: none;
	}

	.purchase-order__header-img {
		max-width: 75px;
	}

	.purchase-order__number {
		font-size: 1.3rem;
		display: flex;
		gap: 7px;
	}

	.purchase-order__number + p:after {
		content: ' ';
	}

	.back_from_past_po_btn,
	#purchase-order-print {
		display: none;
	}

	.purchase-order__orders tbody tr td {
		padding: 5px 15px;
	}

	.purchase-order__orders tfoot tr td {
		padding: 3px 15px;
	}
}
