/*!
Theme Name: ecommerce
*
*	Стили для блока "Комплектации" (таблица сравнения комплектаций)
*/

.complect {
	grid-template-rows: 3em 1fr;
	gap: 1em;
}

.complect_title {
	font-size: var(--h4);
	font-weight: 700;
	text-align: center;
	border-radius: 6px;
	background: var(--bg2);
	align-self: stretch;
	display: grid;
	place-items: center;
}

.lp-complect {
	display: flex;
	flex-direction: column;
	gap: 2em;
}

.lp-complect .section_header {
	padding-bottom: 0;
	text-align: center;
}

/* Свёртываемый контент блока "Цены и комплектации" */
.lp-complect__collapse {
	position: relative;
	max-height: var(--lp-complect-max, 66vh);
	overflow: hidden;
	transition: max-height 0.5s ease;
}

.lp-complect__collapse::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 10em;
	z-index: 3;
	background: linear-gradient(to bottom, transparent, #ffffff);
	pointer-events: none;
}

.lp-complect__collapse.is-open {
	overflow: visible;
}

.lp-complect__collapse.is-open::after {
	display: none;
}

.lp-complect__toggle {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	margin: 1em auto 0;
	padding: 0.4em 2em;
	font-size: var(--h7);
	font-weight: 600;
	line-height: 1.2;
	background: transparent;
	color: var(--hovlink_color2);
	border: 0;
	cursor: pointer;
	transition: color 0.3s;
}

.lp-complect__toggle:hover {
	color: var(--hovelem_color1);
}

/* Стрелка-галочка */
.lp-complect__toggle-arrow {
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.3s;
}

.lp-complect__toggle.is-open .lp-complect__toggle-arrow {
	transform: rotate(225deg);
}

.complect__scroll {
	overflow-x: auto;
	border: 1px solid var(--bg2);
	border-radius: 6px;
	background: var(--bg1);
}

table.complect-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--h6);
}

.complect-table thead th {
	padding: 1.2em 1.2em;
	text-align: center;
	vertical-align: middle;
	border-bottom: 1px solid var(--bg2);
	background: var(--bg2);
	color: var(--text_color2);
}

.complect-table thead th:first-child {
	text-align: left;
}

/* Крупное название комплектации */
.complect-table__name {
	display: block;
	font-size: var(--h4);
	font-weight: 700;
	color: var(--text_color2);
}

/* Цена "от" под названием */
.complect-table__price {
	display: block;
	font-size: var(--h6);
	font-weight: 700;
	color: var(--elem_color1);
	margin-top: 0.4em;
}

.complect-table tbody th,
.complect-table tbody td,
.complect-table tfoot th,
.complect-table tfoot td {
	padding: 0.75em 1.2em;
	text-align: center;
	border-bottom: 1px solid var(--bg2);
}

.complect-table tbody th {
	text-align: left;
	font-weight: 500;
	color: var(--text_color2);
}

/* Строка-заголовок раздела (Фундамент, Отделка наружная, Окна и двери, ...) */
.complect-table tbody tr.complect-table__section th {
	background: var(--bg3);
	font-size: var(--h7);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: center;
	color: var(--text_color3);
	padding: 0.6em 1.2em;
	border-bottom: 1px solid var(--bg1);
}

/* Колонка "Стандарт" — популярная */
.complect-table .complect-table__featured {
	position: relative;
	background: var(--bg2);
	border-left: 2px solid var(--elem_color1);
	border-right: 2px solid var(--elem_color1);
}

.complect-table thead .complect-table__featured {
	border-top: 2px solid var(--elem_color1);
	background: var(--elem_color1);
	color: var(--text_color1);
}

.complect-table thead .complect-table__featured .complect-table__name,
.complect-table thead .complect-table__featured .complect-table__price,
.complect-table thead .complect-table__featured .complect-table__badge {
	color: var(--text_color1);
}

.complect-table tfoot .complect-table__featured {
	border-bottom: 2px solid var(--elem_color1);
}

.complect-table__badge {
	display: block;
	margin: 0 0 0.5em;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--elem_color1);
}

/* Галочки (зелёные) и крестики (серые) */
.complect-mark {
	display: inline-block;
	font-style: normal;
	font-weight: 700;
	font-size: 1.1em;
	line-height: 1;
}

.complect-mark--yes {
	color: var(--elem_color1);
}

.complect-mark--no {
	color: var(--text_color4);
}

/* Подвал с кнопками */
.complect-table tfoot th:first-child {
	text-align: left;
	font-weight: 600;
	color: var(--text_color2);
}

.complect__button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	line-height: 2.2rem;
	font-size: var(--h7);
	font-weight: 600;
	padding: 0.2em 1.4em;
	background: var(--elem_color1);
	color: var(--text_color1);
	border-radius: 6px;
}

.complect__button:hover {
	background: var(--hovelem_color1);
	color: var(--text_color1);
}

@media (max-width: 980px) {

	.complect-table__name {
		font-size: var(--h4-980);
	}

	.complect-table__price {
		font-size: var(--h6-980);
	}
}

@media (max-width: 760px) {

	.complect-table__name {
		font-size: var(--h4-600);
	}

	.complect-table__price {
		font-size: var(--h6-600);
	}

	/* Строки-заголовки разделов */
	.complect-table tbody tr.complect-table__section th {
		background: var(--bg3);
	}
}
