/* Переименовано с video-modules.css */
.page-video .main.main--tree-standalone {
	grid-template-columns: 300px 420px minmax(0, 1fr);
}


@media (max-width: 1280px) {
	.page-video .main.main--tree-standalone {
		grid-template-columns: 300px minmax(0, 1fr);
		grid-template-rows: auto auto;
	}
	.page-video .panel-modules {
		grid-column: 1 / -1;
		order: 2;
	}
	.page-video .timeline-host {
		order: 3;
	}
}

@media (max-width: 900px) {
	.page-video .main.main--tree-standalone {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto auto;
	}
}

.panel.panel-modules {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	flex: 1 1 0%;
	min-height: 0;
	overflow: hidden;
}

.module-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0;
	flex: 1 1 0%;
	min-height: 0;
}

.module-stack > [data-module] {
	width: 100%;
	display: flex;
	flex-direction: column;
}

/* Video page: don't stretch modules to fill column (prevents huge gaps) */
.page-video .module-stack > [data-module]{
	flex: 0 0 auto;
}

/* Video page: keep timeline panel stretching with grid */
.page-video .timeline-host,
.page-video .panel-center.timeline-host,
.page-video .timeline-host.panel {
	flex: 1 1 0%;
	min-height: 0;
}

.module-stack > [data-module]:last-child {
	flex: 1;
}

.page-video .module-stack > [data-module]:last-child{
	flex: 0 0 auto;
}

/* Video page: allow model settings to take remaining height and scroll */
.page-video .module-stack > [data-module="model-settings"] {
	flex: 1 1 auto;
	min-height: 0;
}

.page-video .module-stack > [data-module="reference-prompt"] {
	flex: 0 0 auto;
}

.module-stack > [data-module] > .ms-shell {
	height: auto;
	max-height: none;
}

/* независимая прокрутка панели дерева */
.page-video .panel.panel-tree {
	flex: 1 1 0%;
	min-height: 0;
	overflow: hidden;
}

