/**
 * Bulk Variation Table Styles
*/

/* Wrapper */
.bulk-variation-table-wrapper {
	width: 100%;
	margin-top: 24px;
}

/* Hide the default WooCommerce variation dropdowns & single add to cart */
.single-product .variations_form .variations,
.single-product .variations_form .single_variation_wrap,
.single-product .woocommerce-variation-add-to-cart {
	display: none !important;
}

/* Table */
.bulk-variation-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	color: #1a1a1a;
	margin-bottom: 12px;
	border: none;
}

.bulk-variation-table thead tr {
	border-bottom: 1px solid #1a1a1a;
}

.bulk-variation-table thead th {
	padding: 4px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
	color: #1a1a1a;
	white-space: nowrap;
	border: none;
}

.bulk-variation-table thead th.col-qty {
	text-align: center;
}

/* Rows */
.bulk-variation-row {
	border-bottom: 1px solid #e8e8e8;
	transition: background 0.15s ease;
}

.bulk-variation-row:hover {
	background: #f9f9f9;
}

.bulk-variation-row.has-qty {
	background: #f5faf3;
}

.bulk-variation-row.out-of-stock {
	opacity: 0.5;
	pointer-events: none;
}

.bulk-variation-row td {
	padding: 4px;
	vertical-align: middle;
	border: none;
}

/* Price column */
.col-price .woocommerce-Price-amount,
.col-price .price {
	font-weight: 600;
	color: #1a1a1a;
}

.col-price del {
	color: #999;
	font-size: 12px;
}

/* Units column */
.col-units {
	color: #555;
}

/* Qty control */
.col-qty {
	text-align: center;
	white-space: nowrap;
}

.qty-control {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.qty-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	color: #0f3a27;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
	flex-shrink: 0;
}

.qty-btn:hover {
	border-color: #0f3a27;
	background: #0f3a27;
	color: #b2d851;
}

.bulk-qty-input {
	width: 44px;
	text-align: center;
	border: 1px solid #e0e0e0;
	font-size: 14px;
	font-weight: 600;
	-moz-appearance: textfield;
	appearance: textfield;
	background: #fff;
}

.bulk-qty-input::-webkit-outer-spin-button,
.bulk-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.bulk-qty-input:focus {
	outline: none;
	border-color: #1a1a1a;
}

/* Sticky footer bar */
.bulk-variation-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
	background: #0F3A27;
	color: #fff;
	padding: 14px 16px;
	margin-top: 0;
}

.bulk-footer-summary {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: 14px;
}

.bulk-units-label {
	color: rgba(255,255,255,0.75);
}

.bulk-total-units {
	font-weight: 700;
	color: #fff;
}

.bulk-total-price {
	font-weight: 700;
	font-size: 16px;
	color: #fff;
}

/* Add to cart button */
.bulk-add-to-cart-btn {
	padding: 10px 24px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	transition: background 0.15s, color 0.15s !important;
}

.bulk-add-to-cart-btn:disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
}

.bulk-add-to-cart-btn.loading {
	position: relative;
	color: transparent !important;
}

.bulk-add-to-cart-btn.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid #1a1a1a;
	border-top-color: transparent;
	border-radius: 50%;
	animation: bulk-spin 0.6s linear infinite;
}

@keyframes bulk-spin {
	to { transform: rotate(360deg); }
}

/* Message */
.bulk-cart-message {
	padding: 12px 16px;
	font-size: 14px;
	margin-top: 12px;
	border-radius: 4px;
}

.bulk-cart-message.success {
	background: #f0faf0;
	color: #2d7a2d;
	border: 1px solid #b8e0b8;
}

.bulk-cart-message.error {
	background: #fff5f5;
	color: #c0392b;
	border: 1px solid #f5c6c6;
}

/* Out of stock label */
.out-of-stock-label {
	color: #999;
	font-size: 13px;
}

/* Responsive */
@media ( max-width: 600px ) {
	.bulk-variation-table {
		font-size: 10px;
	}

	.bulk-variation-table thead th,
	.bulk-variation-row td {
		padding: 8px 6px;
	}

	.bulk-qty-input {
		width: 38px;
	}

	.bulk-variation-footer {
		flex-wrap: wrap;
		gap: 12px;
		justify-content: center;
	}

	.bulk-add-to-cart-btn {
		width: 100% !important;
		text-align: center !important;
	}
}
