/**
 * Mind-map style site map (/maps/).
 */

.qng-site-map-mindmap-wrap.siteMap {
	padding-top: 32px;
	padding-bottom: 72px;
	overflow: visible;
}

.qng-mm {
	position: relative;
	max-width: 100%;
}

.qng-mm__toolbar {
	margin-bottom: 28px;
}

.qng-mm__summary {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: #5f6b7a;
}

.qng-mm__canvas {
	display: grid;
	grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
	gap: 0 28px;
	align-items: stretch;
	position: relative;
	min-height: 320px;
}

.qng-mm__root-col {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 8px;
}

.qng-mm__root-spine {
	position: absolute;
	right: -14px;
	top: 12%;
	bottom: 12%;
	width: 3px;
	border-radius: 999px;
	background: linear-gradient(180deg, #3b82f6 0%, #22c55e 28%, #f59e0b 56%, #ef4444 78%, #8b5cf6 100%);
}

.qng-mm-node {
	display: inline-block;
	max-width: 100%;
	color: #111827;
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	word-break: break-word;
}

.qng-mm-node--root {
	position: relative;
	z-index: 2;
	padding: 14px 18px;
	border-radius: 12px;
	background: #fff;
	border: 2px solid #1a2332;
	box-shadow: 0 8px 24px rgba(26, 35, 50, 0.08);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	text-align: right;
}

.qng-mm-node--root:hover {
	color: var(--main-color, #095fa8);
	border-color: var(--main-color, #095fa8);
}

.qng-mm-node--text {
	cursor: default;
}

.qng-mm-count {
	margin-left: 6px;
	font-size: 0.82em;
	font-weight: 500;
	color: #6b7280;
}

.qng-mm__branches {
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
}

.qng-mm-branch {
	position: relative;
	display: grid;
	grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
	gap: 18px 24px;
	align-items: start;
	padding: 18px 20px 18px 28px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e8edf2;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.qng-mm-branch__rail {
	position: absolute;
	left: 0;
	top: 50%;
	width: 28px;
	height: 2px;
	transform: translateY(-50%);
	border-radius: 999px;
}

.qng-mm-branch::before {
	content: "";
	position: absolute;
	left: -28px;
	top: 50%;
	width: 28px;
	height: 2px;
	transform: translateY(-50%);
	background: currentColor;
	opacity: 0.35;
}

.qng-mm-branch--0 { color: #3b82f6; }
.qng-mm-branch--1 { color: #16a34a; }
.qng-mm-branch--2 { color: #d97706; }
.qng-mm-branch--3 { color: #dc2626; }
.qng-mm-branch--4 { color: #7c3aed; }
.qng-mm-branch--5 { color: #0891b2; }
.qng-mm-branch--6 { color: #db2777; }

.qng-mm-branch__rail {
	background: currentColor;
}

.qng-mm-branch__head {
	position: relative;
	padding-left: 14px;
}

.qng-mm-branch__head::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}

.qng-mm-node--l1 {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.45;
	color: #111827;
}

.qng-mm-node--l1:hover {
	color: currentColor;
}

.qng-mm-branch__body {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 18px 22px;
	min-width: 0;
}

.qng-mm-lane {
	position: relative;
	padding: 12px 14px 12px 18px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #edf2f7;
}

.qng-mm-lane__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
}

.qng-mm-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: 0.55em;
	border-radius: 50%;
	background: currentColor;
}

.qng-mm-node--l2 {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	color: #1f2937;
}

.qng-mm-node--l2:hover,
.qng-mm-node--l3:hover,
.qng-mm-node--l4:hover {
	color: currentColor;
	text-decoration: underline;
}

.qng-mm-leaves {
	list-style: none;
	margin: 0;
	padding: 0 0 0 18px;
	border-left: 2px solid color-mix(in srgb, currentColor 24%, #e5e7eb);
}

.qng-mm-leaves--l3,
.qng-mm-leaves--l4 {
	margin-top: 8px;
}

.qng-mm-leaf {
	position: relative;
	margin: 0;
	padding: 4px 0 4px 12px;
}

.qng-mm-leaf::before {
	content: "";
	position: absolute;
	left: -2px;
	top: 0.95em;
	width: 12px;
	height: 2px;
	background: color-mix(in srgb, currentColor 30%, #d1d5db);
}

.qng-mm-node--l3,
.qng-mm-node--l4 {
	font-size: 14px;
	line-height: 1.55;
	color: #374151;
}

.qng-mm-leaf--has-sub > .qng-mm-node--l3,
.qng-mm-leaf--has-sub > .qng-mm-node--l4 {
	font-weight: 600;
	color: #111827;
}

.qng-mm-empty {
	margin: 0;
	font-size: 14px;
	color: #9ca3af;
}

.qng-mm-empty--leaf {
	padding: 8px 0 0 18px;
	font-style: italic;
}

.qng-mm-branch:not(:has(.qng-mm-lane)) .qng-mm-branch__body {
	display: none;
}

.qng-mm__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
}

@media (max-width: 991px) {
	.qng-mm__canvas {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.qng-mm__root-col {
		justify-content: flex-start;
		padding-right: 0;
		padding-bottom: 8px;
	}

	.qng-mm__root-spine {
		display: none;
	}

	.qng-mm-node--root {
		text-align: left;
	}

	.qng-mm-branch {
		grid-template-columns: 1fr;
		padding-left: 20px;
	}

	.qng-mm-branch::before {
		display: none;
	}

	.qng-mm-branch__rail {
		left: 12px;
		top: 0;
		width: 2px;
		height: 100%;
		transform: none;
	}
}

@media (max-width: 640px) {
	.qng-mm-branch__body {
		grid-template-columns: 1fr;
	}

	.qng-site-map-mindmap-wrap.siteMap {
		padding-top: 24px;
		padding-bottom: 48px;
	}
}
