/* VP inventory tables — product page */
.vpg-inventory {
	margin: 20px 0;
	padding: 12px 14px;
	border: 1px solid #e8e8e8;
	border-radius: 4px;
	background: #fff;
	max-width: 100%;
}

.vpg-inventory__title {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 700;
}

.vpg-inventory__match,
.vpg-inventory__width {
	margin: 0 0 10px;
	font-size: 13px;
	color: #555;
}

.vpg-inventory__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.vpg-inventory__table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	font-size: 12px;
	line-height: 1.35;
}

.vpg-inventory__table th,
.vpg-inventory__table td {
	border: 1px solid #e5e5e5;
	padding: 6px 8px;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}

.vpg-inventory__table thead th {
	background: #f7f7f7;
	font-weight: 600;
	font-size: 11px;
}

.vpg-inventory__order-cell {
	min-width: 150px;
	max-width: 170px;
	white-space: normal;
}

.vpg-inventory__add-form {
	display: flex;
	flex-direction: column;
	gap: 5px;
	align-items: stretch;
}

.vpg-inventory__mode {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	font-size: 11px;
}

.vpg-inventory__mode-opt {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	cursor: pointer;
}

.vpg-inventory__qty {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 5px 6px;
	border: 1px solid #ccc;
	border-radius: 3px;
	text-align: center;
	font-size: 12px;
}

.vpg-inventory__line-total {
	font-size: 11px;
	color: #333;
	min-height: 1.1em;
}

.vpg-inventory__submit {
	width: 100%;
	font-size: 11px !important;
	line-height: 1.3 !important;
	padding: 7px 8px !important;
}

/* Hide legacy static slab table when interactive inventory is present */
.vpg-inventory ~ .vp-slab-table-display,
.vpg-inventory + .vp-slab-table-display {
	display: none !important;
}

.product .vp-slab-table-display:not(:only-of-type) {
	display: none;
}

@media (max-width: 768px) {
	.vpg-inventory {
		padding: 10px;
	}

	.vpg-inventory__order-cell {
		min-width: 130px;
	}
}
