/* header row: tree buttons left, point summary right; art is sliced at 2x and sized in 1x units */
.legacy-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 600px;
	margin: 0 auto 8px;
	padding: 0 8px;
	font-family: 'Friz Quadrata', serif;
	user-select: none;
}

.legacy-tree-buttons {
	display: flex;
	align-items: center;
	gap: 14px;
}

/* LegacyTreeButtonTemplate ring buttons, reduced from 67px */
.legacy-tree-button {
	position: relative;
	width: 48px;
	height: 48px;
	cursor: pointer;
}

.legacy-tree-button-glow {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 54px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.legacy-tree-button-icon {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	filter: brightness(0.7);
	transition: filter 0.15s;
}

.legacy-tree-button:hover .legacy-tree-button-icon,
.legacy-tree-button.active .legacy-tree-button-icon {
	filter: none;
}

.legacy-tree-button-ring {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 50px;
	height: 50px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* LegacyTreePointSummaryTemplate with the shield hanging off its left */
.legacy-summary {
	display: flex;
	align-items: center;
}

.legacy-shield {
	position: relative;
	width: 46px;
	height: 66px;
	margin-right: -18px;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	z-index: 1;
}

.legacy-shield-points {
	position: absolute;
	left: 2px;
	right: 2px;
	top: 31px;
	text-align: center;
	font-size: 14px;
	color: #fff;
	text-shadow: 1px -1px 2px #000;
	font-variant-numeric: tabular-nums;
}

.legacy-summary-bar {
	height: 37px;
	padding: 0 15px 0 30px;
	display: flex;
	align-items: center;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	white-space: nowrap;
}

.legacy-summary-label {
	font-size: 16px;
	color: #fff;
	text-shadow: 1px -1px 2px #000;
	font-variant-numeric: tabular-nums;
}

/* tree canvas */
.legacy-frame {
	position: relative;
	width: 100%;
	max-width: 600px;
	margin: 0 auto;
	overflow: hidden;
}

.legacy-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 600px;
	height: 370px;
	transform-origin: top left;
	font-family: 'Friz Quadrata', serif;
	user-select: none;
}

.legacy-canvas img {
	max-width: none;
}

/* SelectedLegacyTreeIconTemplate */
.legacy-tree-title {
	position: absolute;
	left: 0;
	top: 21px;
	width: 220px;
	height: 28px;
	line-height: 28px;
	text-align: center;
	font-size: 20px;
	color: #fff;
	text-shadow: 1px -1px 2px #000;
	white-space: nowrap;
}

.legacy-tree-portrait {
	position: absolute;
	left: 110px;
	top: 136px;
	width: 110px;
	height: 110px;
	transform: translate(-50%, -50%);
}

.legacy-tree-portrait-icon {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
}

.legacy-tree-portrait-ring {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 130px;
	height: 130px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.legacy-tree-spent {
	position: absolute;
	left: 110px;
	top: 194px;
	width: 64px;
	height: 64px;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	font-size: 24px;
	color: #fff;
	text-shadow: 1px -1px 2px #000;
	font-variant-numeric: tabular-nums;
	padding-top: 2px;
	z-index: 3;
}

/* edges: TalentEdgeArrowTemplate at scale 1.25 */
.legacy-edge-line {
	position: absolute;
	transform-origin: 0 50%;
	background-repeat: repeat-x;
	background-size: 7.5px 7.5px;
	pointer-events: none;
	z-index: 2;
}

.legacy-edge-head {
	position: absolute;
	pointer-events: none;
	z-index: 2;
}

/* gates: TalentFrameGateTemplate, lock icon right edge 13px into the node */
.legacy-gate {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: 13px;
	transform: translate(-100%, -50%);
	z-index: 3;
}

.legacy-gate-text {
	font-size: 22px;
	color: rgb(255, 163, 143);
	text-shadow: 1px -1px 2px #000;
	margin-top: -2px;
}

.legacy-gate-icon {
	width: 84px;
	height: 14px;
	margin-top: -2px;
}

/* nodes: TalentButtonLegacySquareTemplate, 40px button with 46px icon and 60px frame */
.legacy-node {
	position: absolute;
	transform: translate(-50%, -50%);
	cursor: pointer;
	z-index: 4;
}

.legacy-node-shadow {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 78px;
	height: 78px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.legacy-node-icon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 46px;
	height: 46px;
	transform: translate(-50%, -50%);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.legacy-node-icon::after {
	content: '';
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0;
}

.legacy-node-frame {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 60px;
	height: 60px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.legacy-node-rank {
	position: absolute;
	left: 50%;
	bottom: -6px;
	transform: translateX(calc(-50% + 11px));
	font-size: 16px;
	color: #ffd100;
	text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
	pointer-events: none;
	white-space: nowrap;
	z-index: 5;
}

.legacy-node-selectable:hover .legacy-node-icon {
	filter: brightness(1.15);
}

.legacy-node-selectable .legacy-node-rank {
	color: #1eff00;
}

.legacy-node-gated,
.legacy-node-disabled {
	cursor: default;
}

.legacy-node-gated .legacy-node-icon,
.legacy-node-disabled .legacy-node-icon {
	filter: grayscale(1);
}

.legacy-node-gated .legacy-node-icon::after {
	opacity: 0.7;
}

.legacy-node-disabled .legacy-node-icon::after {
	opacity: 0.25;
}

.legacy-node-gated .legacy-node-rank,
.legacy-node-disabled .legacy-node-rank {
	color: #808080;
}

/* actions under the node grid */
.legacy-actions {
	position: absolute;
	left: 392px;
	bottom: 10px;
	width: max-content;
	transform: translateX(-50%);
	z-index: 3;
}

.legacy-actions .talent-btn {
	white-space: nowrap;
}
