/* =========================================================
 * Custom WooCommerce Bulk Catalog Order
 * ========================================================= */

.custom-wc-bulk-catalog {
	width: 100%;
}

.custom-wc-bulk-catalog-categories {
	width: 100%;
}


/* ---------------------------------------------------------
 * Category
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-category {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.custom-wc-bulk-catalog-category > summary {
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 18px 4px;
	font-weight: 700;
	list-style: none;
}

.custom-wc-bulk-catalog-category > summary::-webkit-details-marker {
	display: none;
}

.custom-wc-bulk-catalog-category > summary::before {
	content: '+';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	margin-right: 4px;
	font-size: 20px;
	line-height: 1;
}

.custom-wc-bulk-catalog-category[open] > summary::before {
	content: '-';
}

.custom-wc-bulk-catalog-category > summary:hover {
	text-decoration: underline;
}


/* ---------------------------------------------------------
 * Table Wrapper
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-table-wrapper {
	width: 100%;
	max-width: 100%;

	padding-left: 24px;
	padding-right: 24px;

	box-sizing: border-box;

	overflow-x: auto;
	overflow-y: hidden;

	-webkit-overflow-scrolling: touch;
}


/* ---------------------------------------------------------
 * Table
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-table {
	width: 100%;
	min-width: 0;
	max-width: none;

	margin: 0;
	padding: 0;

	border: 0;
	border-collapse: collapse;
	border-spacing: 0;

	table-layout: fixed;
}


/* ---------------------------------------------------------
 * Table Cells
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-table th,
.custom-wc-bulk-catalog-table td {
	padding: 10px 4px;

	/*
	 * No vertical or outer borders.
	 */
	border: 0;

	text-align: left;
	vertical-align: middle;

	/*
	 * Keep content inside its own column.
	 */
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.custom-wc-bulk-catalog-table thead th {
	font-weight: 700;
	white-space: normal;
	border: 0;
}


/* ---------------------------------------------------------
 * Row Separators
 *
 * Only horizontal borders between rows.
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-table tbody tr {
	border-top: 1px solid #ddd;
}

.custom-wc-bulk-catalog-table tbody tr:first-child {
	border-top: 1px solid #ddd;
}


/* ---------------------------------------------------------
 * Column Widths
 *
 * Product = 40%
 *
 * Remaining columns automatically share 60%.
 *
 * Unit       = auto
 * Price      = auto
 * Minimum    = auto
 * Quantity   = auto
 * Resale     = auto
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-table th:first-child,
.custom-wc-bulk-catalog-table td:first-child {
	width: 40%;
}


/* ---------------------------------------------------------
 * Product
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-product {
	min-width: 0;
}

.custom-wc-bulk-catalog-product a {
	text-decoration: none;
}

.custom-wc-bulk-catalog-product a:hover {
	text-decoration: underline;
}

.custom-wc-bulk-catalog-variation {
	font-size: 0.95em;
}

.custom-wc-bulk-catalog-variation-attributes {
	margin-top: 3px;
	font-size: 0.9em;
}


/* ---------------------------------------------------------
 * Unit
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-unit {
	white-space: nowrap;
}


/* ---------------------------------------------------------
 * Price
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-price {
	white-space: nowrap;
	color: var(--dark-green-color, #017a3e);
	font-weight: 600;
}


/* ---------------------------------------------------------
 * Minimum
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-minimum {
	white-space: nowrap;
}


/* ---------------------------------------------------------
 * Quantity
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-quantity {
	width: 70px !important;
	max-width: 100%;
	margin: 0 !important;
}


/* ---------------------------------------------------------
 * Resale
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-resale {
	text-align: center !important;
}

.custom-wc-bulk-catalog-resale input[type='checkbox'] {
	margin: 0;
}


/* ---------------------------------------------------------
 * Not for Direct Purchase
 *
 * PHP should use:
 *
 * colspan="2"
 *
 * so the message spans:
 *
 * Quantity + Resale
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-not-for-direct-purchase {
	text-align: center;
	font-weight: 600;
}

.custom-wc-bulk-catalog-not-for-direct-purchase-message {
	display: block;
}


/* ---------------------------------------------------------
 * Add to Cart
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-submit-wrapper {
	margin-top: 30px;
}

.custom-wc-bulk-catalog-submit {
	margin: 0;
}


/* ---------------------------------------------------------
 * Empty Category
 * --------------------------------------------------------- */

.custom-wc-bulk-catalog-empty {
	padding: 16px;
	border-top: 1px solid #ddd;
}

th:is(.custom-wc-bulk-catalog-product-unit, .custom-wc-bulk-catalog-product-minimum, .custom-wc-bulk-catalog-product-quantity, .custom-wc-bulk-catalog-product-resale),
td:is(.custom-wc-bulk-catalog-product-unit, .custom-wc-bulk-catalog-product-minimum, .custom-wc-bulk-catalog-product-quantity, .custom-wc-bulk-catalog-product-resale)
{
	text-align: center;
}

th.custom-wc-bulk-catalog-product-price, td.custom-wc-bulk-catalog-product-price {
	text-align: right;
}

.custom-wc-bulk-catalog-table thead th.custom-wc-bulk-catalog-product-resale, td.custom-wc-bulk-catalog-product-resale {
	width: 65px;
    min-width: 65px;
    max-width: 65px;
    white-space: nowrap;
}

.custom-wc-bulk-catalog-submit { text-align: right; }


/* =========================================================
 * Desktop
 *
 * 922px and above
 *
 * Table fills the available content width and aligns
 * with the category/content area.
 * ========================================================= */

@media (min-width: 922px) {

	.custom-wc-bulk-catalog-table-wrapper {
		width: 100%;
		max-width: 100%;
		overflow-x: visible;
	}

	.custom-wc-bulk-catalog-table {
		width: 100%;
		min-width: 720px;
		max-width: none;
	}

}


/* =========================================================
 * Tablet
 *
 * 921px and below
 *
 * Table minimum width = 750px.
 *
 * If available width is less than 750px, the wrapper
 * becomes horizontally scrollable.
 * ========================================================= */

@media (max-width: 921px) {

	.custom-wc-bulk-catalog-table-wrapper {
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
	}

	.custom-wc-bulk-catalog-table {
		width: 750px;
		min-width: 750px;
		max-width: none;
		table-layout: fixed;
	}

	.custom-wc-bulk-catalog-table th,
	.custom-wc-bulk-catalog-table td {
		padding: 9px 8px;
	}

}


/* =========================================================
 * Mobile
 *
 * 544px and below
 *
 * Keep the 750px table so all columns remain usable.
 * The wrapper provides horizontal scrolling.
 * ========================================================= */

@media (max-width: 544px) {

	.custom-wc-bulk-catalog-table-wrapper {
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
	}

	.custom-wc-bulk-catalog-table {
		width: 750px;
		min-width: 750px;
		max-width: none;
	}

	.custom-wc-bulk-catalog-table th,
	.custom-wc-bulk-catalog-table td {
		padding: 8px 7px;
		font-size: 14px;
	}

	.custom-wc-bulk-catalog-submit-wrapper {
		margin-top: 24px;
	}

}