/* =====================================================================
   KungfuPu — tree.css
   Pure CSS org-chart-style connector lines for the family/lineage tree
   (application/helpers/family_tree_helper.php renders the matching
   markup). No JS dependency — safe to reuse as-is on a future public
   frontend, just link this file + call the same helper function.
   ===================================================================== */

.ft-scroll {
	overflow-x: auto;
	padding: 24px 0;
}

.ft-tree, .ft-tree ul, .ft-tree li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ft-tree {
	text-align: center;
}

.ft-tree, .ft-tree ul {
	display: table;
	margin: 0 auto;
}

.ft-tree ul {
	padding-top: 30px;
}

.ft-tree li {
	display: table-cell;
	text-align: center;
	vertical-align: top;
	padding: 30px 14px 0 14px;
	position: relative;
}

/* connector lines drawn with pseudo-elements — no images/JS */
.ft-tree li::before,
.ft-tree li::after {
	content: '';
	position: absolute;
	top: 0;
	right: 50%;
	border-top: 2px solid #cbd3dd;
	width: 50%;
	height: 30px;
}
.ft-tree li::after {
	right: auto;
	left: 50%;
	border-left: 2px solid #cbd3dd;
}
.ft-tree li:only-child::before,
.ft-tree li:only-child::after {
	display: none;
}
.ft-tree li:only-child { padding-top: 0; }
.ft-tree li:first-child::before,
.ft-tree li:last-child::after {
	border: 0 none;
}
.ft-tree li:last-child::before {
	border-right: 2px solid #cbd3dd;
	border-radius: 0 6px 0 0;
}
.ft-tree li:first-child::after {
	border-radius: 6px 0 0 0;
}
.ft-tree ul::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	border-left: 2px solid #cbd3dd;
	width: 0;
	height: 30px;
}

/* --- Node card --- */
.ft-node {
	display: inline-block;
	background: #fff;
	border: 1px solid #dde3ec;
	border-radius: 8px;
	padding: 10px 12px;
	width: 118px;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	text-decoration: none;
	color: inherit;
}
.ft-node-root {
	border-color: #1f2d3d;
	border-width: 2px;
	background: #f7f9fc;
}
.ft-node-placeholder {
	opacity: 0.65;
	border-style: dashed;
}

.ft-photo {
	width: 56px;
	height: 78px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ddd;
	background: #eee;
	margin: 0 auto 6px;
	display: block;
}

.ft-name { font-size: 12px; font-weight: 600; color: #1f2d3d; line-height: 1.3; }
.ft-title { font-size: 10px; color: #888; margin-top: 2px; line-height: 1.3; }
.ft-badge-unregistered {
	display: inline-block;
	margin-top: 4px;
	font-size: 9px;
	padding: 1px 6px;
	border-radius: 8px;
	background: #fff4e0;
	color: #a3620a;
}

.ft-legend {
	font-size: 12px;
	color: #666;
	margin-bottom: 8px;
	display: flex;
	gap: 16px;
	align-items: center;
	flex-wrap: wrap;
}
.ft-legend-swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	margin-right: 4px;
	vertical-align: middle;
}
