/**
 * DarCommerce table skin: dense price-list table with sticky header,
 * zebra rows, horizontal scroll and compact mode. AAA-полировка:
 * тень sticky-шапки, акцентная подсветка строки, табличные цифры.
 */

.dc-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--dag-r, 12px);
}

.dc-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.dc-table th,
.dc-table td {
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--dc-border, var(--dag-line-2, rgba(11, 26, 51, 0.07)));
	text-align: left;
	vertical-align: middle;
}

.dc-table thead th {
	background: var(--dc-head-bg, var(--dag-zebra, #f7f7f8));
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--dc-muted, var(--dag-tx-dim, #8a94a6));
	white-space: nowrap;
	border-bottom: 2px solid var(--dc-border, rgba(11, 26, 51, 0.12));
}

.dc-table--sticky thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	box-shadow: 0 1px 0 var(--dc-border, rgba(11, 26, 51, 0.12));
	transition: box-shadow 0.2s ease;
}

/* Залипшая шапка получает тень, когда под ней едет контент. */

.dc-table--sticky.dc-is-stuck thead th {
	box-shadow: 0 6px 16px -8px rgba(11, 26, 51, 0.22);
}

.dc-table tbody tr {
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dc-table tbody tr:nth-child(even) {
	background: var(--dc-zebra, rgba(11, 26, 51, 0.015));
}

.dc-table tbody tr:hover {
	background: color-mix(in srgb, var(--dag-acc, #f2661c) 4%, transparent);
	box-shadow: inset 3px 0 0 var(--dag-acc, #f2661c);
}

.dc-table tbody td {
	font-variant-numeric: tabular-nums;
}

/* Image column: узкая колонка, картинка не расползается даже без инлайн-стилей */

.dc-table td.dc-cell--image,
.dc-table th.dc-th--image {
	width: 1%;
	white-space: nowrap;
}

.dc-table .dc-col-image img {
	max-width: 64px;
	width: auto;
	height: auto;
	border-radius: 6px;
	transition: transform 0.25s ease;
}

.dc-table-wrap--compact th,
.dc-table-wrap--compact td {
	padding: 0.35rem 0.6rem;
	font-size: 0.9em;
}

/* Sorting */

th[data-dc-sortable] {
	cursor: pointer;
	user-select: none;
}

th[data-dc-sortable]:hover {
	color: var(--dag-acc, #f2661c);
}

th[data-dc-sortable] .dc-th__label::after {
	content: "\2195"; /* up-down arrow */
	margin-left: 0.3em;
	opacity: 0.35;
}

th.dc-sorted .dc-th__label::after {
	content: "\2191"; /* up arrow */
	opacity: 1;
	color: var(--dag-acc, #f2661c);
}

th.dc-sorted.dc-sorted--desc .dc-th__label::after {
	content: "\2193"; /* down arrow */
}

/* Alignment */

.dc-align--center {
	text-align: center;
}

.dc-align--right {
	text-align: right;
}

/* Row template mode */

.dc-row--template .dc-cell--template {
	padding: 0;
}

/* Mobile: keep the table a table, scroll horizontally */

@media (max-width: 768px) {
	.dc-table th,
	.dc-table td {
		white-space: nowrap;
	}
}
/* --- SKU-таблица «как в Битриксе»: строка на артикул склада --- */

.dc-sku-table-wrap .dc-sku-table {
	font-variant-numeric: tabular-nums;
}

.dc-sku-row--empty {
	opacity: 0.45;
}

.dc-sku-row--empty .dc-cell--add {
	visibility: hidden;
}

.dc-sku-row .dc-cell--code code {
	background: transparent;
	border: 0;
	padding: 0;
	font-size: 0.92em;
	color: inherit;
	opacity: 0.8;
}

.dc-sku-row .dc-cell--brand,
.dc-sku-row .dc-cell--city {
	color: #8a94a6;
	white-space: nowrap;
}

.dc-sku-row .dc-cell--title {
	min-width: 16em;
}

.dc-sku-row .dc-cell--add {
	white-space: nowrap;
}

.dc-sku-add {
	width: 30px;
	height: 30px;
	line-height: 1;
	font-size: 16px;
	color: #8a94a6;
}

.dc-sku-add:hover {
	color: var(--dc-acc, #2d5bff);
	border-color: var(--dc-acc, #2d5bff);
}
