/* Сравнение программ реестра. Scoped under .tour-registry-page, префиксы registry-* / tr-*. */

.tour-registry-page .registry-bulk-compare {
	min-height: 44px;
	padding: 0 15px;
	border: 1px solid var(--tr-orange);
	border-radius: 13px;
	background: #fff;
	color: var(--tr-orange);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.tour-registry-page .registry-bulk-compare:hover:not(:disabled) {
	background: #fdeee9;
	border-color: #c5371a;
	color: #b63217;
}

.tour-registry-page .registry-bulk-compare:disabled {
	border-color: var(--tr-line);
	color: var(--tr-muted);
	opacity: 0.75;
	cursor: not-allowed;
}

.tour-registry-page .registry-compare-hint {
	font-size: 13px;
	line-height: 1.3;
	color: var(--tr-muted);
}

.tour-registry-page .registry-compare-hint[hidden] {
	display: none !important;
}

/* Модалка */
.tour-registry-page .registry-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 600;
	display: grid;
	place-items: center;
	padding: 20px;
}

.tour-registry-page .registry-compare-modal[hidden] {
	display: none !important;
}

.tour-registry-page .registry-compare-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 38, 23, 0.52);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

body.registry-compare-open {
	overflow: hidden;
}

.tour-registry-page .registry-compare-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(100%, 1180px);
	max-height: min(92vh, 900px);
	padding: 26px 26px 22px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 28px 70px rgba(10, 44, 26, 0.3);
	overflow: hidden;
}

.tour-registry-page .registry-compare-close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--tr-line);
	border-radius: 12px;
	background: #fff;
	color: var(--tr-muted);
	font-size: 21px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.tour-registry-page .registry-compare-close:hover {
	background: var(--tr-mist);
	color: var(--tr-ink);
}

.tour-registry-page .registry-compare-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px 20px;
	padding-right: 44px;
	margin-bottom: 16px;
}

.tour-registry-page .registry-compare-eyebrow {
	display: block;
	margin-bottom: 4px;
	color: var(--tr-orange);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tour-registry-page .registry-compare-title {
	margin: 0;
	color: var(--tr-ink);
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 700;
	line-height: 1.15;
}

.tour-registry-page .registry-compare-subtitle {
	margin: 6px 0 0;
	max-width: 70ch;
	color: var(--tr-muted);
	font-size: 14px;
	line-height: 1.4;
}

.tour-registry-page .registry-compare-subtitle:empty {
	display: none;
}

.tour-registry-page .registry-compare-head-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
}

.tour-registry-page .registry-compare-diff {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--tr-ink);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.tour-registry-page .registry-compare-diff input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--tr-pine);
	cursor: pointer;
}

.tour-registry-page .registry-compare-share {
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--tr-line);
	border-radius: 12px;
	background: #fff;
	color: var(--tr-pine);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease;
}

.tour-registry-page .registry-compare-share:hover {
	background: #edf6ef;
	border-color: #b9d0bf;
}

/* Таблица */
.tour-registry-page .registry-compare-body {
	flex: 1 1 auto;
	overflow: auto;
	margin: 0 -6px;
	padding: 0 6px 4px;
	overscroll-behavior: contain;
}

.tour-registry-page .registry-compare-status {
	margin: 24px 0;
	color: var(--tr-muted);
	font-size: 15px;
	text-align: center;
}

.tour-registry-page .registry-compare-table {
	display: grid;
	gap: 7px;
	min-width: 640px;
}

.tour-registry-page .registry-compare-row {
	display: grid;
	grid-template-columns: minmax(150px, 210px) repeat(var(--compare-cols, 2), minmax(0, 1fr));
	align-items: stretch;
	gap: 7px;
}

.tour-registry-page .registry-compare-row > b {
	position: sticky;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	align-content: flex-start;
	flex-wrap: wrap;
	gap: 4px 6px;
	padding: 10px 12px;
	background: #fff;
	color: var(--tr-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
}

.tour-registry-page .registry-compare-cell {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 13px;
	border: 1px solid var(--tr-line);
	border-radius: 12px;
	background: var(--tr-mist);
	color: var(--tr-ink);
	font-size: 14px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.tour-registry-page .registry-compare-row--head > .registry-compare-cell {
	background: #fff;
	border-color: #cfe0d4;
}

.tour-registry-page .registry-compare-link {
	color: var(--tr-pine-dark);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}

.tour-registry-page a.registry-compare-link:hover {
	text-decoration: underline;
}

.tour-registry-page .registry-compare-variant {
	margin-top: 3px;
	color: var(--tr-muted);
	font-size: 12px;
	font-weight: 600;
}

.tour-registry-page .registry-compare-note {
	color: var(--tr-muted);
	font-size: 12px;
}

.tour-registry-page .registry-compare-empty {
	color: #9aa79e;
}

.tour-registry-page .registry-compare-line {
	display: block;
	padding: 2px 0;
}

.tour-registry-page .registry-compare-line--extra {
	display: none;
}

.tour-registry-page .registry-compare-row.is-expanded .registry-compare-line--extra {
	display: block;
}

.tour-registry-page .registry-compare-more {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 6px;
	border-radius: 7px;
	background: #e3ece5;
	color: var(--tr-pine-dark);
	font-size: 11px;
	font-weight: 700;
}

.tour-registry-page .registry-compare-row.is-expanded .registry-compare-more {
	display: none;
}

.tour-registry-page .registry-compare-expand {
	padding: 0;
	border: 0;
	background: none;
	color: var(--tr-pine);
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.tour-registry-page .registry-compare-tip {
	display: inline-grid;
	place-items: center;
	width: 16px;
	height: 16px;
	border: 1px solid var(--tr-line);
	border-radius: 50%;
	background: var(--tr-mist);
	color: var(--tr-muted);
	font-size: 10px;
	font-weight: 700;
	cursor: help;
}

/* Списки: одинаковые позиции стоят напротив друг друга, различия подсвечены.
   Полосы лежат в общей сетке на все колонки — тогда строка остаётся ровной
   даже когда длинное название переносится на две строки. */
.tour-registry-page .registry-compare-list {
	grid-column: 2 / -1;
	display: grid;
	grid-template-columns: repeat(var(--compare-cols, 2), minmax(0, 1fr));
	gap: 4px 7px;
}

.tour-registry-page .registry-compare-slot {
	display: flex;
	align-items: center;
	padding: 7px 12px;
	border: 1px solid var(--tr-line);
	border-radius: 10px;
	background: var(--tr-mist);
	color: var(--tr-ink);
	font-size: 14px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.tour-registry-page .registry-compare-slot.is-match {
	background: #fafbfa;
	border-color: #e8ede9;
	color: var(--tr-muted);
}

/* Пустое место напротив объекта, которого в этой программе нет. */
.tour-registry-page .registry-compare-slot.is-empty {
	justify-content: center;
	border-style: dashed;
	border-color: #e5eae6;
	background: transparent;
	color: #c3ccc6;
}

.tour-registry-page .registry-compare-slot--extra {
	display: none;
}

.tour-registry-page .registry-compare-row.is-expanded .registry-compare-slot--extra {
	display: flex;
}

.tour-registry-page .registry-compare-label-note {
	flex: 1 1 100%;
	color: #9aa79e;
	font-size: 12px;
	font-weight: 500;
}

/* «Только различия»: в списках прячем совпавшие полосы целиком — колонки
   сдвигаются на одну строку все разом, выравнивание не рассыпается. */
.tour-registry-page .registry-compare-body.is-diff-only .registry-compare-slot.is-match {
	display: none;
}

.tour-registry-page .registry-compare-body.is-diff-only .registry-compare-slot--extra:not(.is-match) {
	display: flex;
}

/* Разворачивать в этом режиме нечего: совпавшие позиции скрыты все до одной. */
.tour-registry-page .registry-compare-body.is-diff-only .registry-compare-expand {
	display: none;
}

/* Совпавшие значения приглушены — глаз сразу цепляется за различия. */
.tour-registry-page .registry-compare-row.is-same > .registry-compare-cell,
.tour-registry-page .registry-compare-cell.is-match {
	background: #fafbfa;
	border-color: #e8ede9;
	color: var(--tr-muted);
}

.tour-registry-page .registry-compare-diff-note {
	margin: 0 0 12px;
	color: var(--tr-muted);
	font-size: 13px;
	line-height: 1.35;
}

.tour-registry-page .registry-compare-diff-note[hidden] {
	display: none !important;
}

.tour-registry-page .registry-compare-row.is-hidden {
	display: none;
}

@media (max-width: 720px) {
	.tour-registry-page .registry-compare-modal {
		padding: 0;
	}

	.tour-registry-page .registry-compare-dialog {
		width: 100%;
		max-height: 100vh;
		height: 100%;
		padding: 20px 14px 16px;
		border-radius: 0;
	}

	.tour-registry-page .registry-compare-head {
		align-items: flex-start;
		flex-direction: column;
	}

	.tour-registry-page .registry-compare-table {
		min-width: 0;
	}

	.tour-registry-page .registry-compare-row {
		grid-template-columns: 108px repeat(var(--compare-cols, 2), minmax(140px, 1fr));
	}

	.tour-registry-page .registry-compare-row > b {
		padding: 10px 8px 10px 0;
		font-size: 12px;
	}

	.tour-registry-page .registry-compare-cell {
		padding: 9px 10px;
		font-size: 13px;
	}

	.tour-registry-page .registry-compare-slot {
		padding: 6px 9px;
		font-size: 12px;
	}

	.tour-registry-page .registry-compare-hint {
		width: 100%;
	}

	.tour-registry-page .registry-bulk-compare {
		flex: 1 1 100%;
	}
}
