/**
 * Styles for WooCommerce Variation Table & Bulk Add to Cart
 */

.wvt-table-wrapper {
	margin: 1.5em 0;
	width: 100%;
	overflow-x: auto;
}

.wvt-case-message {
	background: #f0f7f4;
	border: 1px solid #cfe7de;
	border-radius: 4px;
	padding: 10px 14px;
	margin: 0 0 1em;
	font-weight: 600;
	color: #2d5d4a;
}

.wvt-variation-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #e0e0e0;
	font-size: 0.95em;
}

.wvt-variation-table th,
.wvt-variation-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e0e0e0;
	text-align: left;
	vertical-align: middle;
}

.wvt-variation-table thead th {
	background: #f7f7f7;
	font-weight: 600;
	white-space: nowrap;
}

.wvt-variation-table tbody tr:hover {
	background-color: #fafafa;
}

.wvt-variation-table tbody tr.wvt-out-of-stock {
	opacity: 0.6;
}

.wvt-variation-table tbody tr.wvt-has-rollover-image {
	cursor: pointer;
}

.wvt-variation-table tbody tr.wvt-has-rollover-image:hover {
	background-color: #f0f7f4;
}

.wvt-variation-table tbody tr.wvt-has-rollover-image:hover .wvt-col-image img {
	outline: 2px solid #7cb9a7;
	outline-offset: -2px;
}

.woocommerce-product-gallery.wvt-rollover-active .woocommerce-product-gallery__image img {
	transition: opacity 0.15s ease-in-out;
}

.wvt-col-image img {
	width: 50px;
	height: 50px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.wvt-col-price .price {
	font-weight: 600;
	white-space: nowrap;
}

.wvt-in-stock {
	color: #2e7d32;
	font-weight: 600;
}

.wvt-out-of-stock-label {
	color: #c0392b;
	font-weight: 600;
}

.wvt-unavailable {
	color: #999;
	font-style: italic;
}

.wvt-qty-input {
	width: 64px;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-align: center;
	-moz-appearance: textfield;
}

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

.wvt-qty-input:disabled {
	background-color: #f0f0f0;
	cursor: not-allowed;
}

.wvt-bulk-actions {
	margin-top: 1em;
	display: flex;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
}

.wvt-case-progress {
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 4px;
	background: #f0f0f0;
	color: #555;
}

.wvt-case-progress.wvt-case-complete {
	background: #e6f4ea;
	color: #2e7d32;
}

.wvt-case-progress.wvt-case-incomplete {
	background: #fdf3e7;
	color: #b15c00;
}

.wvt-add-all-button {
	cursor: pointer;
}

.wvt-add-all-button.wvt-loading {
	opacity: 0.7;
	pointer-events: none;
}

.wvt-bulk-message {
	font-size: 0.95em;
}

.wvt-bulk-message.wvt-success {
	color: #2e7d32;
}

.wvt-bulk-message.wvt-error {
	color: #c0392b;
}

.wvt-bulk-message a {
	text-decoration: underline;
}

/* Responsive: stack table on small screens */
@media screen and (max-width: 600px) {
	.wvt-variation-table thead {
		display: none;
	}

	.wvt-variation-table,
	.wvt-variation-table tbody,
	.wvt-variation-table tr,
	.wvt-variation-table td {
		display: block;
		width: 100%;
	}

	.wvt-variation-table tr {
		border: 1px solid #e0e0e0;
		border-radius: 6px;
		margin-bottom: 10px;
		padding: 8px;
	}

	.wvt-variation-table td {
		border: none;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 6px 4px;
	}

	.wvt-variation-table td::before {
		content: attr(data-label);
		font-weight: 600;
		margin-right: 1em;
	}

	.wvt-col-image {
		justify-content: flex-start !important;
	}

	.wvt-col-image::before {
		content: '' !important;
	}
}
