.order-toggle {
		background-color: #0d6efd;
		color: white;
		font-weight: 700;
		margin-right: 0.35rem;
		min-width: 1.65rem;
		padding: 0.1rem 0;
		text-align: center;
	}

	.amount-mismatch {
		color: #dc3545;
		font-weight: 700;
	}

	.purchase-detail-actions {
		padding-top: 0.5rem;
	}

	.btn-new-detail {
		font-weight: 700;
	}

	.btn-delete-detail {
		background-color: #dc3545;
		color: white;
	}

.purchase-sort-button {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: inherit;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	gap: 0.25rem;
	padding: 0;
}

.purchase-sort-arrow {
	display: inline-block;
	min-width: 1rem;
	text-align: left;
}

#purchase-empty-message {
	font-weight: 700;
}

#purchase-search {
	border: 1px solid #c7d2fe;
	border-radius: 0.25rem;
	flex: 0 1 24rem;
	font-size: 1.1rem;
	margin: 0 auto;
	min-width: 18rem;
	padding: 0.35rem 0.5rem;
}

#purchase-search:focus {
	border-color: #0d6efd;
	box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
	outline: none;
}

#purchase-page {
	border: 1px solid #c7d2fe;
	border-radius: 0.25rem;
	padding: 0.2rem 0.35rem;
}

	#InventoryTagChips {
		display: flex;
		flex-wrap: wrap;
		gap: 0.25rem;
	}

#tbl_purchase > thead th,
#tbl_purchase > tbody > tr > td,
#tbl_purchase > tfoot td {
	width: 10%;
}

#tbl_purchase > thead th:nth-child(5),
#tbl_purchase > tbody > tr > td:nth-child(5),
#tbl_purchase > thead th:nth-child(6),
#tbl_purchase > tbody > tr > td:nth-child(6) {
	text-align: right;
	width: 10%;
}

#tbl_purchase > thead th:nth-child(7),
#tbl_purchase > tbody > tr > td:nth-child(7) {
	width: auto;
}

#tbl_purchase > thead th:nth-child(1),
#tbl_purchase > tbody > tr > td:nth-child(1) {
	width: 5%;
}

#tbl_purchase > tbody > tr:not(.purchase-detail-row):hover {
	background-color: #f5f6f8;
}

#tbl_purchase > tbody > tr.active {
	background-color: #eef1f5;
}

.purchase-detail-row td {
	background: transparent;
	padding: 0.5rem;
	white-space: normal;
	width: 100%;
}

.purchase-detail-row:hover {
	background-color: transparent;
}

.purchase-detail-grid {
	border-collapse: collapse;
	table-layout: fixed;
	width: 100%;
}

.purchase-detail-grid thead,
.purchase-detail-grid tbody,
.purchase-detail-grid tfoot,
.purchase-detail-grid tr {
	display: table;
	width: 100%;
	table-layout: fixed;
}

.purchase-detail-grid th,
.purchase-detail-grid td {
	background: transparent;
	padding: 0.35rem 0.5rem;
	white-space: nowrap;
	width: auto;
}

#tbl_purchase .purchase-detail-grid tfoot td,
#tbl_purchase .purchase-detail-total-row td {
	background: transparent;
	font-weight: 700;
}

.purchase-detail-grid .detail-field-price,
.purchase-detail-grid .detail-field-quantity,
.purchase-detail-grid .detail-field-amount {
	text-align: right;
	vertical-align: middle;
}

.purchase-detail-grid td[contenteditable="true"] {
	background: transparent;
	outline: none;
}

.purchase-detail-grid .detail-field-item-name,
.purchase-detail-grid .detail-field-vendor-product-id,
.purchase-detail-grid .detail-field-unit_purchase {
	background: transparent;
	outline: none;
}

.purchase-detail-grid td[contenteditable="true"]:focus,
.purchase-detail-grid .detail-field-item-name:focus-within,
.purchase-detail-grid .detail-field-vendor-product-id:focus-within,
.purchase-detail-grid .detail-field-unit_purchase:focus-within {
	box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.35);
}

.purchase-detail-grid input[type="search"],
.purchase-detail-grid input[type="text"],
.purchase-detail-grid select {
	border: 1px solid #c7d2fe;
	border-radius: 0.25rem;
	font: inherit;
	padding: 0.35rem 0.5rem;
	width: 100%;
}

.purchase-detail-grid .detail-field-item-name input,
.purchase-detail-grid .detail-field-vendor-product-id input,
.purchase-detail-grid .detail-field-vendor-product-id select,
.purchase-detail-grid .detail-field-unit_purchase input,
.purchase-detail-grid .detail-field-unit_purchase select,
.purchase-detail-grid .detail-field-quantity input {
	background: transparent;
	border: 0;
	border-radius: 0;
	display: block;
	padding: 0;
	text-align: inherit;
}

.purchase-detail-grid input[type="search"]:focus,
.purchase-detail-grid input[type="text"]:focus,
.purchase-detail-grid select:focus {
	border-color: #0d6efd;
	box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.35);
	outline: none;
}

.purchase-detail-grid .detail-field-item-name input:focus,
.purchase-detail-grid .detail-field-vendor-product-id input:focus,
.purchase-detail-grid .detail-field-vendor-product-id select:focus,
.purchase-detail-grid .detail-field-unit_purchase input:focus,
.purchase-detail-grid .detail-field-unit_purchase select:focus,
.purchase-detail-grid .detail-field-quantity input:focus {
	box-shadow: none;
}

.purchase-detail-row button {
	font-weight: 700;
	margin-right: 0.35rem;
}

.purchase-item-modal-control {
	box-sizing: border-box;
	padding: 0;
	width: 70%;
}

.purchase-item-modal-control input,
.purchase-item-modal-control select {
	box-sizing: border-box;
	width: 100%;
}

@media only screen and (max-width: 960px) {

	#mobile-btn-add-purchase,
	.mobile-add-purchase-item {
		align-items: center;
		background-color: #0d6efd;
		box-sizing: border-box;
		color: white;
		display: inline-flex;
		flex: 0 0 auto;
		font-size: 1.35rem;
		font-weight: 700;
		height: 2.15rem;
		justify-content: center;
		line-height: 1;
		padding: 0;
		width: 2.15rem;
	}

	#mobile-purchase-search {
		border: 1px solid #c7d2fe;
		border-radius: 0.25rem;
		box-sizing: border-box;
		flex: 1;
		font-size: 1rem;
		min-width: 0;
		padding: 0.45rem 0.55rem;
	}

	#mobile-purchase-search:focus {
		border-color: #0d6efd;
		box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
		outline: none;
	}

.mobile-list {
		overflow: hidden;
}
.mobile-title {
		overflow-wrap: anywhere;
}
.mobile-meta .amount-mismatch {
		font-weight: 400;
}

.mobile-purchase-action-menu {
		background: white;
		border: 1px solid #c7d2fe;
		border-radius: 0.45rem;
		box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
		display: flex;
		gap: 0.5rem;
		left: var(--purchase-menu-left, 0.75rem);
		padding: 0.5rem;
		position: fixed;
		top: var(--purchase-menu-top, 4rem);
		z-index: 70;
	}

.mobile-purchase-action-menu button {
		align-items: center;
		background-color: #0d6efd;
		box-sizing: border-box;
		color: white;
		display: inline-flex;
		font-size: 1rem;
		font-weight: 700;
		height: 2.15rem;
		justify-content: center;
		line-height: 1;
		padding: 0 0.75rem;
	}

.mobile-purchase-items-backdrop {
		align-items: stretch;
		background: rgba(15, 23, 42, 0.42);
		display: flex;
		inset: 0;
		justify-content: stretch;
		padding: 0;
		position: fixed;
		z-index: 60;
	}

.mobile-purchase-items-modal {
		background: white;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		height: 100%;
		overflow: hidden;
		width: 100%;
	}

.mobile-purchase-items-header {
		justify-content: space-between;
	}

.mobile-purchase-items-header button {
		background: transparent;
		color: #1f2937;
		font-size: 1.45rem;
		line-height: 1;
		padding: 0.1rem 0.45rem;
	}

.mobile-purchase-item-list {
		overflow-y: auto;
		padding: 0.6rem;
}

.mobile-purchase-item-tile {
		background: white;
		border: 1px solid #c7d2fe;
		border-radius: 0.45rem;
		box-sizing: border-box;
		padding: 0.75rem;
	}

.mobile-purchase-item-title {
		overflow-wrap: anywhere;
}

.mobile-purchase-item-meta {
		overflow-wrap: anywhere;
}

.mobile-purchase-item-total {
		background: #f8fafc;
		border-top: 1px solid #dbe4ff;
		font-weight: 700;
		padding: 0.65rem 0.75rem;
		text-align: right;
	}

.mobile-add-purchase-item {
		align-self: flex-end;
		margin: 0.5rem 0.75rem 0.75rem 0;
	}

.mobile-purchase-item-editor {
		background: #f8fafc;
		border: 1px solid #0d6efd;
		border-radius: 0.45rem;
		box-sizing: border-box;
		margin-bottom: 0.6rem;
		padding: 0.65rem;
	}

.mobile-purchase-item-editor-grid,
.mobile-purchase-item-editor-grid tbody,
.mobile-purchase-item-editor-grid tr,
.mobile-purchase-item-editor-grid td {
		display: block;
		width: 100%;
	}

.mobile-purchase-item-editor-grid tr {
		display: grid;
		gap: 0.55rem;
	}

.mobile-purchase-item-editor-grid td {
		background: white;
		box-sizing: border-box;
		min-height: 2.35rem;
		padding: 0.45rem 0.55rem;
		white-space: normal;
	}

.mobile-purchase-item-editor-grid td::before {
		color: #4b5563;
		display: block;
		font-size: 0.75rem;
		font-weight: 700;
		margin-bottom: 0.2rem;
	}

.mobile-purchase-item-editor-grid .detail-field-item-name::before {
		content: "Item";
	}

.mobile-purchase-item-editor-grid .detail-field-vendor-product-id::before {
		content: "Product ID";
	}

.mobile-purchase-item-editor-grid .detail-field-unit_purchase::before {
		content: "Unit";
	}

.mobile-purchase-item-editor-grid .detail-field-price::before {
		content: "Price";
	}

.mobile-purchase-item-editor-grid .detail-field-quantity::before {
		content: "Quantity";
	}

.mobile-purchase-item-editor-grid .detail-field-amount::before {
		content: "Amount";
	}

.mobile-purchase-item-editor-grid input,
.mobile-purchase-item-editor-grid select {
		font-size: 1rem;
		min-height: 2rem;
	}

.mobile-purchase-item-editor-grid .btn-delete-detail {
		margin: 0;
		min-height: 2.35rem;
		width: 100%;
	}

.mobile-purchase-item-editor-actions {
		display: grid;
		gap: 0.5rem;
		grid-template-columns: 1fr 1fr;
		margin-top: 0.65rem;
	}

.mobile-purchase-item-editor-actions button {
		font-weight: 700;
		min-height: 2.45rem;
	}
}
