
.cell {
	white-space: nowrap;
	overflow: hidden;
	padding: 5px;
	text-overflow: ellipsis;
	width: 350px;
}

.cell--expand {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	width: 100%;
}

        .hide-column { 
        	display: none; 
        }
        .modal {
            display: none;
            position: fixed;
            z-index: 1;
            left: 0;
            top: 110;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.9);
        }

        .modal-content {
            margin: auto;
            display: block;
            width: 50%;
            max-width: 700px;
        }

        .modal-content img {
            width: 100%;
            height: auto;
        }

        img {
            border-radius: 5px;
            cursor: pointer;
            transition: 0.3s;
            width: 100%;
        }

        img:hover {
            opacity: 0.7;
        }

        .images {
            width: 450px;
            display: flex;
        }

	
.prokrutka {
 width:210px;
 height:450px;
 background: #fff;
 border: 1px solid #C1C1C1;
 overflow: auto;
}

.imagecatalog {
  width:600px;
 height:400px;
}

.imageimg {
 max-height:100%; 
 max-width:100%;
 object-fit: contain;
}

.treeline, .treeline ul, .treeline li {
   margin: 0; padding: 0; line-height: 1.2; list-style: none;
}
.treeline ul {margin: 0 0 0 8px; }
.treeline > li:not(:only-child), .treeline li li {
   position: relative;
   padding: 3px 0 0 12px; /* отступ текста */
}
/* Стиль вертикальной линии */
.treeline li:not(:last-child) { border-left: 1px solid #ccc;}
/* Стили горизонтальной линии*/  
.treeline li li:before, .treeline > li:not(:only-child):before {
   content: ""; position: absolute; top: 0; left: 0;
   width: 1.1em; height: .7em; border-bottom:1px solid #ccc;
}
/* Вертикальная линия последнего пункта в списка */  
.treeline li:last-child:before {
   width: calc(1.1em - 1px); border-left: 1px solid #ccc;
}
.treeline .qgExpandClosed {
   position: absolute; left: -6px; top: 5px; width: 10px;
   height: 11px; line-height: 1em; text-align: center;
   background: #9F9F9F; color: #fff; /* Фон и цвет кнопки, раскрывающей список */
   font-size: 78%; /* Размер +/- */
   cursor: pointer; -webkit-user-select: none; -moz-user-select: none;
}
.treeline li:last-child > .qgExpandClosed {margin-left: 1px;}
.treeline .qgExpandClosed + ul {display: none;}
.treeline .qgExpandClosedM + ul {display: block;}

/* Блок подбора */
.ok_catalog_scroll {
	max-width: 100%;
}
.ok_catalog_scroll > table {
	margin-bottom: 0;
}

/* Информация по VIN на десктопе - фиксированные ширины колонок */
@media screen and (min-width: 992px) {
	#answervin .vin_info th,
	#answervin .vin_info td {
		vertical-align: top;
		padding: 4px 6px;
	}
	#answervin .vin_info th:nth-child(1) { width: 200px; }
	#answervin .vin_info th:nth-child(2) { width: 120px; }
	#answervin .vin_info th:nth-child(3) { width: 120px; }
}

/* ================= История запрошенных VIN ================= */
.vin_history_block {
	margin: 6px 0 18px;
}
.vin_history_title {
	margin: 0 0 8px;
	font-size: 18px;
}
.vin_history_block.vh_collapsed .vin_history_title {
	margin: 0 0 10px;
}
.vin_history .vh_title_count {
	display: inline-block;
	margin-left: 2px;
	padding: 0 7px;
	border-radius: 10px;
	background: #eef1f4;
	color: #6b7783;
	font-size: 12px;
	font-weight: 400;
	line-height: 20px;
	vertical-align: 2px;
}
.vin_history_toggle {
	margin-left: 8px;
	font-size: 13px;
	font-weight: 400;
	text-decoration: none;
	border-bottom: 1px dashed currentColor;
	padding-bottom: 1px;
}
.vin_history_toggle:hover {
	text-decoration: none;
}
.vin_history_wrap {
	overflow-x: auto;
}
.vin_history {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #dcdcdc;
	margin: 0 0 10px;
}
.vin_history th,
.vin_history td {
	padding: 9px 18px;
	border: 1px solid #dcdcdc;
	text-align: left;
	vertical-align: middle;
}
.vin_history th {
	background: #f0f0f0;
	color: #333;
	font-weight: 600;
	white-space: nowrap;
}
.vin_history tbody tr:nth-child(even) td {
	background: #fcfcfc;
}
.vin_history tbody tr.vh_row_unresolved td {
	background: #fdf7f6;
}
.vin_history .vh_unresolved {
	color: #b03a2e;
	font-style: italic;
	white-space: nowrap;
}
.vin_history th.vh_col_vin { width: 22%; }
.vin_history th.vh_col_car { width: 34%; }
.vin_history th.vh_col_year { width: 10%; }
.vin_history th.vh_col_note { width: 34%; }

.vin_history .vh_vin {
	font-family: Consolas, "Courier New", monospace;
	white-space: nowrap;
	letter-spacing: 0.4px;
}
.vin_history .vh_vin a {
	color: #1a5fa8;
	text-decoration: none;
	border-bottom: 1px dashed rgba(26, 95, 168, 0.45);
	padding-bottom: 1px;
}
.vin_history .vh_vin a:hover {
	color: #d2401e;
	border-bottom-color: rgba(210, 64, 30, 0.55);
}
.vin_history .vh_year {
	white-space: nowrap;
}
.vin_history .vh_note {
	min-width: 180px;
}
/* Подпись из «Гаража» - только показывается, правится в гараже */
.vin_history .vh_note_garage {
	display: block;
	margin: 0 0 4px;
	font-size: 14px;
	color: #333;
	line-height: 1.35;
	word-break: break-word;
}
.vin_history .vh_note_src {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 6px;
	border-radius: 3px;
	background: #eef3f9;
	border: 1px solid #d3e0ee;
	color: #4a6c93;
	font-size: 11px;
	line-height: 16px;
	text-transform: uppercase;
	letter-spacing: .3px;
	vertical-align: 1px;
}
.vin_history .vh_note_input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #d5d9de;
	border-radius: 4px;
	background: #fff;
	padding: 6px 8px;
	font-size: 14px;
	color: #333;
	transition: border-color .15s ease, background-color .15s ease;
}
.vin_history .vh_note_input::placeholder {
	color: #a8adb3;
	font-style: italic;
}
.vin_history .vh_note_input:hover {
	border-color: #b7bfc8;
}
.vin_history .vh_note_input:focus {
	outline: none;
	border-color: #4a7dbd;
	box-shadow: 0 0 0 2px rgba(74, 125, 189, .15);
}
.vin_history .vh_note_saving {
	border-color: #e0c26a;
	background: #fffdf3;
}
.vin_history .vh_note_saved {
	border-color: #7fb27f;
	background: #f3fbf3;
}
.vin_history .vh_note_error {
	border-color: #c96a5c;
	background: #fdf5f4;
}
.vin_history_pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 4px;
	font-size: 14px;
}
.vin_history_pager a {
	text-decoration: none;
	border-bottom: 1px dashed currentColor;
}
.vin_history_pager .vh_page {
	color: #777;
}

/* ================= АДАПТИВ (телефоны/планшеты) ================= */
@media screen and (max-width: 991px) {
	/* Внешняя таблица "дерево | картинка+таблица" - в столбик */
	.ok_catalog_scroll,
	.ok_catalog_scroll > table,
	.ok_catalog_scroll > table > tbody,
	.ok_catalog_scroll > table > tbody > tr,
	.ok_catalog_scroll > table > tbody > tr > td {
		display: block !important;
		width: 100% !important;
	}

	/* Информация по VIN (таблица из search.php) - карточкой в столбик */
	#answervin .vin_info {
		width: 100% !important;
		border-collapse: collapse;
	}
	#answervin .vin_info th {
		display: none !important;
	}
	#answervin .vin_info tr {
		display: block !important;
		width: 100% !important;
	}
	#answervin .vin_info td {
		display: block !important;
		width: 100% !important;
		padding: 6px 0 !important;
		border-bottom: 1px solid #e4e4e4 !important;
		word-break: break-word;
	}
	#answervin .vin_info td::before {
		content: attr(data-label);
		display: block;
		font-weight: bold;
		color: #333;
		margin-bottom: 2px;
	}
	#answervin .cell {
		width: auto !important;
		white-space: normal !important;
		overflow: visible !important;
		text-overflow: clip !important;
	}

	/* Дерево узлов - на всю ширину, с ограничением высоты и отступом до картинки */
	#answervintree {
		margin-bottom: 16px;
	}
	.prokrutka {
		width: 100% !important;
		height: auto !important;
		max-height: 300px;
	}

	/* Форма ввода VIN */
	.ok_vin_form,
	.ok_vin_form > tbody,
	.ok_vin_form > tbody > tr,
	.ok_vin_form > tbody > tr > td {
		display: block !important;
		width: 100% !important;
	}
	.ok_vin_form td {
		padding: 3px 0 !important;
	}
	.ok_vin_form input[type="text"] {
		width: 100%;
		box-sizing: border-box;
	}
	.ok_vin_form input[type="submit"] {
		width: 100%;
		margin-top: 5px;
	}

	/* Таблица "картинка | список запчастей" - в столбик, с отступом между блоками */
	#answervininfo > table,
	#answervininfo > table > tbody,
	#answervininfo > table > tbody > tr,
	#answervininfo > table > tbody > tr > td {
		display: block !important;
		width: 100% !important;
	}
	#answervininfo > table > tbody > tr > td {
		margin-bottom: 14px;
	}

	/* Картинка каталога - на всю ширину */
	.imagecatalog {
		width: 100% !important;
		height: auto !important;
		margin: 0 0 14px 0;
		padding: 0 4px;
		box-sizing: border-box;
	}
	.imageimg {
		width: 100%;
		height: auto;
		max-height: none;
	}

	/* Отступ между иллюстрацией и таблицей запчастей */
	#answervininfo #imagelistart {
		margin-top: 12px;
	}

	/* Таблица запчастей - по ширине экрана, с переносом */
	#imagelistart {
		width: 100% !important;
		table-layout: auto !important;
	}
	#imagelistart th,
	#imagelistart td {
		width: auto !important;
		padding: 2px 3px !important;
		word-break: break-word;
	}

	/* История запрошенных VIN - карточками */
	.vin_history {
		border: 0 !important;
	}
	.vin_history thead {
		display: none !important;
	}
	.vin_history,
	.vin_history tbody {
		display: block !important;
		width: 100% !important;
	}
	.vin_history tr {
		display: block !important;
		width: 100% !important;
		padding: 10px 12px;
		margin: 0 0 10px;
		border: 1px solid #dcdcdc !important;
		background: #fcfcfc;
	}
	.vin_history td {
		display: block !important;
		width: 100% !important;
		padding: 3px 0 !important;
		border: 0 !important;
		text-align: left !important;
		background: none !important;
	}
	.vin_history td::before {
		content: attr(data-label);
		display: block;
		font-weight: bold;
		color: #333;
		font-size: 12px;
		margin-bottom: 2px;
	}
	.vin_history td:empty::before {
		content: none;
	}
	.vin_history .vh_vin {
		white-space: normal;
		word-break: break-all;
	}
}
