/* ── Matrix wrapper ── */
.wpm-matrix-wrapper {
	padding-bottom: var(--wp--style--block-gap);
}

/* ── Price matrix table ── */
.wpm-matrix-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
	table-layout: auto;
}

.wpm-matrix-table th,
.wpm-matrix-table td {
	padding: 0.65em 1em;
	text-align: center;
	vertical-align: middle;
	border: 1px solid #e0e0e0;
}

/* Corner cell */
.wpm-matrix-corner {
	background: #f8f8f8;
	font-weight: 600;
	font-size: 0.85em;
	color: #666;
	text-align: left !important;
}

/* Column headers */
.wpm-matrix-col-head {
	background: #f8f8f8;
	font-weight: 600;
	white-space: nowrap;
	border-bottom: 2px solid #d0d0d0;
}

/* Row headers */
.wpm-matrix-row-head {
	background: #f8f8f8;
	font-weight: 600;
	text-align: left !important;
	white-space: nowrap;
	border-right: 2px solid #d0d0d0;
}

/* ── Cell states ── */
.wpm-matrix-cell-available {
	cursor: pointer;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
	color: #333;
}

.wpm-matrix-cell-available:hover {
	background-color: #f0f7ff;
	box-shadow: inset 0 0 0 1px #77d94a;
}

.wpm-matrix-cell-available.wpm-selected {
	background-color: #e3f0ff;
	box-shadow: inset 0 0 0 1px #2eb122;
	/* font-weight: 700; */
}

.wpm-matrix-cell-unavailable {
	color: #aaa;
	cursor: not-allowed;
}

.wpm-matrix-cell-unavailable .wpm-oos {
	text-decoration: line-through;
	opacity: 0.6;
}

.wpm-matrix-cell-empty {
	color: #ccc;
}

/* ── No variations message ── */
.wpm-no-variations {
	color: #666;
	font-style: italic;
	padding: 1em 0;
}

/* ── Hidden rows (replace mode) ── */
.wpm-hidden-row {
	display: none !important;
}

/* ── Responsive ── */
.wpm-matrix-table-container {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
	.wpm-matrix-table th,
	.wpm-matrix-table td {
		padding: 0.45em 0.6em;
		font-size: 0.85em;
	}

	.wpm-matrix-col-head,
	.wpm-matrix-row-head {
		font-size: 0.8em;
	}
}
