/**
 * Responsive price matrix (CNC cutting rates)
 */

.stelladesign-price-table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 8px 0 20px;
	border: 1px solid rgba(0, 54, 74, 0.12);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 54, 74, 0.04);
}

.stelladesign-price-table-wrap:focus-within {
	outline: 2px solid rgba(0, 194, 224, 0.45);
	outline-offset: 2px;
}

.stelladesign-price-table {
	width: 100%;
	min-width: 720px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	line-height: 1.35;
	color: #1e293b;
}

.stelladesign-price-table caption {
	caption-side: top;
	text-align: left;
	padding: 14px 16px 10px;
	font-weight: 600;
	font-size: 15px;
	color: #00364a;
}

.stelladesign-price-table thead th {
	background: #00364a;
	color: #fff;
	font-weight: 600;
	padding: 12px 10px;
	text-align: center;
	white-space: nowrap;
	border-bottom: 0;
}

.stelladesign-price-table thead th:first-child {
	text-align: left;
	padding-left: 16px;
	min-width: 160px;
}

.stelladesign-price-table tbody th {
	text-align: left;
	font-weight: 600;
	color: #00364a;
	padding: 12px 16px;
	background: #f4f8fa;
	border-top: 1px solid rgba(0, 54, 74, 0.08);
	white-space: nowrap;
}

.stelladesign-price-table tbody td {
	padding: 12px 10px;
	text-align: center;
	border-top: 1px solid rgba(0, 54, 74, 0.08);
	border-left: 1px solid rgba(0, 54, 74, 0.06);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.stelladesign-price-table tbody tr:nth-child(even) td {
	background: #fafcfd;
}

.stelladesign-price-table tbody tr:hover td,
.stelladesign-price-table tbody tr:hover th {
	background: rgba(0, 194, 224, 0.08);
}

.stelladesign-price-table .is-empty {
	color: #94a3b8;
}

/* Sticky first column while scrolling horizontally */
.stelladesign-price-table thead th:first-child,
.stelladesign-price-table tbody th {
	position: sticky;
	left: 0;
	z-index: 2;
}

.stelladesign-price-table thead th:first-child {
	z-index: 3;
	box-shadow: 4px 0 8px -4px rgba(0, 54, 74, 0.35);
}

.stelladesign-price-table tbody th {
	box-shadow: 4px 0 8px -4px rgba(0, 54, 74, 0.18);
}

.stelladesign-price-note {
	margin: 0 0 8px;
	font-size: 13px;
	color: #64748b;
	line-height: 1.45;
}

.stelladesign-price-scroll-hint {
	display: none;
	margin: 0 0 8px;
	font-size: 12px;
	color: #00a4be;
	font-weight: 500;
}

@media (max-width: 900px) {
	.stelladesign-price-scroll-hint {
		display: block;
	}

	.stelladesign-price-table {
		font-size: 13px;
		min-width: 640px;
	}

	.stelladesign-price-table thead th,
	.stelladesign-price-table tbody td,
	.stelladesign-price-table tbody th {
		padding: 10px 8px;
	}

	.stelladesign-price-table thead th:first-child,
	.stelladesign-price-table tbody th {
		padding-left: 12px;
		min-width: 132px;
	}
}

/* Stacked cards on very small screens */
@media (max-width: 600px) {
	.stelladesign-price-table-wrap {
		border: 0;
		box-shadow: none;
		background: transparent;
		overflow: visible;
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0;
		margin-right: 0;
	}

	.stelladesign-price-scroll-hint {
		display: none;
	}

	.elementor-widget-text-editor .stelladesign-price-table-wrap,
	.elementor-widget-text-editor .stelladesign-price-table {
		width: 100% !important;
		max-width: 100% !important;
	}

	.stelladesign-price-table,
	.stelladesign-price-table thead,
	.stelladesign-price-table tbody,
	.stelladesign-price-table th,
	.stelladesign-price-table td,
	.stelladesign-price-table tr {
		display: block;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.stelladesign-price-table {
		min-width: 0 !important;
	}

	.stelladesign-price-table caption {
		padding: 0 0 12px;
	}

	.stelladesign-price-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		border: 0;
	}

	.stelladesign-price-table tbody tr {
		margin: 0 0 12px;
		border: 1px solid rgba(0, 54, 74, 0.12);
		border-radius: 10px;
		overflow: hidden;
		background: #fff;
	}

	.stelladesign-price-table tbody th {
		position: static;
		display: block;
		background: #00364a;
		color: #fff;
		box-shadow: none;
		border: 0;
		padding: 12px 14px;
		white-space: normal;
	}

	.stelladesign-price-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		text-align: right;
		border: 0;
		border-top: 1px solid rgba(0, 54, 74, 0.08);
		padding: 10px 14px;
		background: #fff !important;
		white-space: normal;
	}

	.stelladesign-price-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #00364a;
		text-align: left;
	}

	.stelladesign-price-table tbody td.is-empty {
		display: none;
	}
}
