/* NatVideo List View & Multi Add to Cart */

.natvideo-list-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

table.natvideo-list-view {
	width: 100%;
	border-collapse: collapse;
}

table.natvideo-list-view th,
table.natvideo-list-view td {
	padding: 10px 12px;
	vertical-align: middle;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
}

table.natvideo-list-view thead th {
	font-weight: 600;
	white-space: nowrap;
}

table.natvideo-list-view .natvideo-col-thumb {
	width: 76px;
}

table.natvideo-list-view .natvideo-col-thumb img {
	width: 64px;
	height: auto;
	display: block;
}

table.natvideo-list-view .natvideo-col-name {
	min-width: 180px;
}

table.natvideo-list-view .natvideo-col-sku,
table.natvideo-list-view .natvideo-col-upc,
table.natvideo-list-view .natvideo-col-price,
table.natvideo-list-view .natvideo-col-stock {
	white-space: nowrap;
}

table.natvideo-list-view .natvideo-col-qty {
	width: 90px;
}

.natvideo-qty-input {
	width: 70px;
	text-align: center;
}

.natvideo-list-actions {
	margin: 16px 0;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.natvideo-multi-add-status {
	font-size: 0.95em;
}

.natvideo-not-purchasable {
	color: #999;
}

.natvideo-list-form {
	width: 100%;
	/* WooCommerce floats the result count (left) and the sorting dropdown
	 * (right) above the loop. The scrollable table wrapper would otherwise
	 * squeeze in between them, so start the list below both. */
	clear: both;
}

@media (max-width: 640px) {
	/* The WooCommerce sorting dropdown and result count stack above the
	 * list instead of floating over the table header. */
	.woocommerce .woocommerce-ordering,
	.woocommerce .woocommerce-result-count {
		float: none !important;
		width: 100% !important;
		margin: 0 0 12px !important;
	}

	.woocommerce .woocommerce-ordering select.orderby {
		width: 100%;
	}

	/* Mobile: turn each product row into a card. The 7-column table
	 * cannot fit a phone screen, so the header row is hidden and every
	 * row becomes a stacked block with labelled lines. */
	table.natvideo-list-view,
	table.natvideo-list-view tbody,
	table.natvideo-list-view tr,
	table.natvideo-list-view td {
		display: block;
		width: 100% !important;
	}

	table.natvideo-list-view thead {
		display: none;
	}

	table.natvideo-list-view tr.natvideo-list-row {
		border: 1px solid #e5e5e5;
		border-radius: 6px;
		background: #fff;
		padding: 12px;
		margin-bottom: 12px;
		overflow: hidden;
	}

	table.natvideo-list-view th,
	table.natvideo-list-view td {
		padding: 4px 0;
		border-bottom: 0;
		text-align: left;
	}

	/* Thumbnail floats left; the name sits beside it. */
	table.natvideo-list-view .natvideo-col-thumb {
		float: left;
		width: 72px !important;
		padding: 0 12px 4px 0;
	}

	table.natvideo-list-view .natvideo-col-thumb img {
		width: 64px;
	}

	table.natvideo-list-view .natvideo-col-name {
		overflow: hidden;
		font-size: 1.05em;
		font-weight: 600;
		min-width: 0;
	}

	table.natvideo-list-view .natvideo-col-name a {
		overflow-wrap: anywhere;
	}

	/* Labelled lines for SKU, UPC, price, availability and qty, from the
	 * data-label attributes on the cells. */
	table.natvideo-list-view .natvideo-col-sku,
	table.natvideo-list-view .natvideo-col-upc,
	table.natvideo-list-view .natvideo-col-price,
	table.natvideo-list-view .natvideo-col-stock,
	table.natvideo-list-view .natvideo-col-qty {
		white-space: normal;
		clear: both;
	}

	table.natvideo-list-view .natvideo-col-sku::before,
	table.natvideo-list-view .natvideo-col-upc::before,
	table.natvideo-list-view .natvideo-col-price::before,
	table.natvideo-list-view .natvideo-col-stock::before,
	table.natvideo-list-view .natvideo-col-qty::before {
		content: attr(data-label) ": ";
		font-weight: 600;
	}

	/* Qty input: a proper touch target, and 16px text so iOS does not
	 * zoom the page when the field is tapped. */
	.natvideo-qty-input {
		width: 84px;
		min-height: 44px;
		font-size: 16px;
		padding: 8px;
	}

	/* Full-width add-to-cart button on phones. */
	.natvideo-list-actions .natvideo-multi-add-btn {
		width: 100%;
		min-height: 44px;
	}
}

/* Single product page: details block above the add-to-cart button.
 * Same layout as the live natvideo.com product page: no heading, bold
 * labels in a left column, values in a second column, no borders. */
.natvideo-product-details {
	margin: 0 0 1.5em;
}

.natvideo-details-list {
	margin: 0;
}

.natvideo-details-row {
	display: flex;
	gap: 12px;
	padding: 3px 0;
}

.natvideo-details-row dt {
	flex: 0 0 180px;
	font-weight: 600;
}

.natvideo-details-row dd {
	margin: 0;
}

.natvideo-details-row--low-stock dd {
	color: #d35400;
}

.natvideo-details-row--out-of-stock dd {
	color: #c0392b;
}

.natvideo-details-row--bin-location dt,
.natvideo-details-row--bin-location dd {
	color: #a05a2c;
	font-weight: 700;
}

@media (max-width: 480px) {
	.natvideo-details-row dt {
		flex-basis: 130px;
	}
}
