/* Виджет «Таблица сравнения» (inc/elementor/class-compare-table-widget.php) */
/* Селекторы с префиксом .dst-compare — иначе их перебивают .elementor-kit-6 h2/a/p и стили таблиц темы */

.dst-compare {
	--dct-accent: #ff8a00;
	--dct-heading: #1c2226;
	--dct-text: #6b7378;
	--dct-head-bg: #1c2226;
	--dct-head-text: #fff;
	--dct-cell-text: #2b3135;
	--dct-row-alt: #f2f4f6;
	--dct-border: #dfe4e8;
	font-family: 'Raleway', sans-serif;
	/* У Raleway по умолчанию «старинные» цифры разной высоты — в таблице нужны ровные */
	font-variant-numeric: lining-nums;
}

.dst-compare .dst-compare__head {
	margin-bottom: 40px;
}

.dst-compare .dst-compare__eyebrow {
	margin-bottom: 14px;
	color: var(--dct-accent);
	font-size: 15px;
	letter-spacing: .06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.dst-compare .dst-compare__title {
	margin: 0 0 22px;
	color: var(--dct-heading);
	font-family: inherit;
	font-size: 50px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.dst-compare .dst-compare__sub {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 40px;
}

.dst-compare .dst-compare__subtitle {
	margin: 0;
	color: var(--dct-text);
	font-size: 15px;
	line-height: 1.5;
}

.dst-compare .dst-compare__aside {
	flex: 0 0 auto;
	color: var(--dct-heading);
	font-size: 13px;
	letter-spacing: .02em;
	text-transform: uppercase;
}

/* Таблица */

.dst-compare .dst-compare__scroll {
	overflow-x: auto;
	border: 1px solid var(--dct-border);
	border-radius: 8px;
	-webkit-overflow-scrolling: touch;
}

.dst-compare .dst-compare__table {
	width: 100%;
	min-width: 860px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: #fff;
}

.dst-compare .dst-compare__table th,
.dst-compare .dst-compare__table td {
	padding: 22px 16px;
	border: 0;
	color: var(--dct-cell-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	vertical-align: middle;
}

.dst-compare .dst-compare__table thead th {
	padding-top: 17px;
	padding-bottom: 17px;
	background: var(--dct-head-bg);
	color: var(--dct-head-text);
	font-weight: 700;
	white-space: nowrap;
}

.dst-compare .dst-compare__table tbody tr:nth-child(even) th,
.dst-compare .dst-compare__table tbody tr:nth-child(even) td {
	background: var(--dct-row-alt);
}

.dst-compare .dst-compare__table tbody th {
	background: #fff;
	color: var(--dct-heading);
	font-weight: 700;
	white-space: nowrap;
}

.dst-compare .dst-compare__table tbody th a {
	color: inherit;
	text-decoration: none;
	transition: color .2s;
}

.dst-compare .dst-compare__table tbody th a:hover {
	color: var(--dct-accent);
}

/* Подпись и кнопка */

.dst-compare .dst-compare__footer {
	margin-top: 40px;
}

.dst-compare .dst-compare__note {
	margin: 0 0 18px;
	color: var(--dct-text);
	font-size: 14px;
	line-height: 1.5;
}

.dst-compare .dst-compare__btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 15px 34px;
	background: var(--dct-accent);
	border-radius: 2px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: filter .2s;
}

.dst-compare .dst-compare__btn:hover,
.dst-compare .dst-compare__btn:focus-visible {
	color: #fff;
	filter: brightness(1.08);
	text-decoration: none;
}

.dst-compare .dst-compare__btn svg {
	transition: transform .2s;
}

.dst-compare .dst-compare__btn:hover svg {
	transform: translateX(3px);
}

@media (max-width: 1024px) {
	.dst-compare .dst-compare__title {
		font-size: 38px;
	}
}

@media (max-width: 767px) {
	.dst-compare .dst-compare__head {
		margin-bottom: 28px;
	}

	.dst-compare .dst-compare__title {
		font-size: 28px;
	}

	.dst-compare .dst-compare__sub {
		flex-direction: column;
	}

	.dst-compare .dst-compare__table th,
	.dst-compare .dst-compare__table td {
		padding: 16px 12px;
		font-size: 13px;
	}

	/* Колонка с моделью закреплена слева, остальное листается вбок */
	.dst-compare .dst-compare__table thead th:first-child,
	.dst-compare .dst-compare__table tbody th {
		position: sticky;
		left: 0;
		z-index: 1;
		box-shadow: 1px 0 0 var(--dct-border);
	}

	.dst-compare .dst-compare__footer {
		margin-top: 28px;
	}

	.dst-compare .dst-compare__btn {
		justify-content: center;
		width: 100%;
		box-sizing: border-box;
	}
}
