/* RootsPersona tree chart viewer: [rootspersona_chart]. */
.rp-treechart {
	--rp-treechart-bg: #fbf8f2;
	--rp-treechart-line: rgba(0, 0, 0, 0.15);
	--rp-treechart-hit: #e8a400;
	--rp-treechart-current: #c0392b;
	--rp-treechart-sel: #c0392b;
	--rp-treechart-anc: #2f6fb0;
	--rp-treechart-desc: #2e8b57;
	--rp-treechart-sp: #8e44ad;
	position: relative;
	margin: 1em 0;
	color: inherit;
}
/* Wider than the text column: the chart is long, the screen is the limit. */
.rp-treechart--wide {
	width: min(100vw - 32px, 1800px);
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}
.rp-treechart--wide:fullscreen,
.rp-treechart--wide.is-full {
	width: auto;
	margin-left: 0;
	transform: none;
}
.rp-treechart__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
}
.rp-treechart__search {
	flex: 1 1 220px;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid var(--rp-treechart-line);
	border-radius: 6px;
	font: inherit;
	background: #fff;
	color: #222;
}
.rp-treechart__found {
	min-width: 3.5em;
	font-size: 0.9em;
	opacity: 0.8;
	text-align: center;
}
.rp-treechart__sep {
	width: 6px;
}
.rp-treechart__btn {
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--rp-treechart-line);
	border-radius: 6px;
	background: #fff;
	color: #222;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.rp-treechart__btn:hover,
.rp-treechart__btn:focus-visible {
	border-color: currentColor;
}
.rp-treechart__view {
	position: relative;
	height: var(--rp-treechart-height, 80vh);
	min-height: 320px;
	overflow: hidden;
	border: 1px solid var(--rp-treechart-line);
	border-radius: 8px;
	background: var(--rp-treechart-bg);
	cursor: grab;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}
.rp-treechart__view:focus-visible {
	outline: 2px solid var(--rp-treechart-hit);
	outline-offset: 2px;
}
.rp-treechart__view.is-dragging {
	cursor: grabbing;
}
.rp-treechart__view > svg {
	display: block;
	width: 100%;
	height: 100%;
}
.rp-treechart__loading {
	margin: 0;
	padding: 2em;
	text-align: center;
	color: #666;
}
.rp-treechart__hint {
	margin: 6px 0 0;
	font-size: 0.85em;
	opacity: 0.7;
}
.rp-treechart a.rp-treechart-person,
.rp-treechart a.rp-treechart-person * {
	cursor: pointer;
	text-decoration: none !important;
}
.rp-treechart a.rp-treechart-person:hover rect {
	stroke: #333 !important;
	stroke-width: 2 !important;
}
.rp-treechart .rp-treechart-hit rect {
	stroke: var(--rp-treechart-hit) !important;
	stroke-width: 4 !important;
}
.rp-treechart .rp-treechart-current rect {
	stroke: var(--rp-treechart-current) !important;
	stroke-width: 6 !important;
}
/* A chosen person and their family line; everyone else steps back. The frames keep
   their width on the screen at any zoom (non-scaling-stroke). */
.rp-treechart.is-selecting a.rp-treechart-person:not(.rp-treechart-sel):not(.rp-treechart-anc):not(.rp-treechart-desc):not(.rp-treechart-sp) {
	opacity: 0.3;
}
.rp-treechart .rp-treechart-sel rect {
	stroke: var(--rp-treechart-sel) !important;
	stroke-width: 5px !important;
	vector-effect: non-scaling-stroke;
}
.rp-treechart .rp-treechart-anc rect {
	stroke: var(--rp-treechart-anc) !important;
	stroke-width: 4px !important;
	vector-effect: non-scaling-stroke;
}
.rp-treechart .rp-treechart-desc rect {
	stroke: var(--rp-treechart-desc) !important;
	stroke-width: 4px !important;
	vector-effect: non-scaling-stroke;
}
.rp-treechart .rp-treechart-sp rect {
	stroke: var(--rp-treechart-sp) !important;
	stroke-width: 3px !important;
	vector-effect: non-scaling-stroke;
}
.rp-treechart__card {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	width: min(300px, calc(100% - 20px));
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid var(--rp-treechart-line);
	border-radius: 8px;
	background: #fff;
	color: #222;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	cursor: default;
	user-select: text;
	-webkit-user-select: text;
	font-size: 15px;
	line-height: 1.4;
}
.rp-treechart__card[hidden] {
	display: none;
}
.rp-treechart__card-x {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: none;
	color: #666;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.rp-treechart__card-photo {
	float: left;
	width: 64px;
	height: 80px;
	margin: 2px 12px 6px 0;
	border-radius: 4px;
	object-fit: cover;
}
.rp-treechart__card-photo[hidden] {
	display: none;
}
.rp-treechart__card-name {
	padding-right: 22px;
	font-weight: 600;
	white-space: pre-line;
}
.rp-treechart__card-counts {
	clear: both;
	margin: 8px 0 10px;
	padding: 0;
	list-style: none;
	font-size: 0.9em;
}
.rp-treechart__card-counts li {
	margin: 2px 0;
	padding-left: 18px;
	position: relative;
}
.rp-treechart__card-counts li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--rp-treechart-anc);
}
.rp-treechart__card-counts .rp-treechart__card-desc::before {
	background: var(--rp-treechart-desc);
}
.rp-treechart__card-counts .rp-treechart__card-sp::before {
	background: var(--rp-treechart-sp);
}
.rp-treechart__card-acts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.rp-treechart__card-open,
.rp-treechart__card-all {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--rp-treechart-sel);
	border-radius: 6px;
	font: inherit;
	font-size: 0.9em;
	line-height: 1.3;
	text-decoration: none !important;
	cursor: pointer;
}
.rp-treechart__card-open {
	background: var(--rp-treechart-sel);
	color: #fff !important;
}
.rp-treechart__card-all {
	background: #fff;
	color: var(--rp-treechart-sel);
}
.rp-treechart__card-all[hidden] {
	display: none;
}
:root[data-theme="dark"] .rp-treechart__card,
:root[data-theme="dark"] .rp-treechart__card-all {
	background: #2a231c;
	color: #efe6da;
}
.rp-treechart:fullscreen,
.rp-treechart.is-full {
	margin: 0;
	padding: 12px;
	background: var(--rp-treechart-bg);
}
.rp-treechart.is-full {
	position: fixed;
	inset: 0;
	z-index: 99999;
}
.rp-treechart:fullscreen .rp-treechart__view,
.rp-treechart.is-full .rp-treechart__view {
	height: calc(100vh - 90px);
}
:root[data-theme="dark"] .rp-treechart {
	--rp-treechart-line: rgba(255, 255, 255, 0.2);
}
:root[data-theme="dark"] .rp-treechart__search,
:root[data-theme="dark"] .rp-treechart__btn {
	background: #2a231c;
	color: #efe6da;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .rp-treechart {
		--rp-treechart-line: rgba(255, 255, 255, 0.2);
	}
}
