feat(pedigree): retheme PedigreeTree to match app dark/warm design system

This commit is contained in:
2026-03-09 22:44:06 -05:00
parent c898ea850f
commit dee4769ad2

View File

@@ -1,11 +1,17 @@
/* ─── Pedigree Tree Wrapper ──────────────────────────────────────── */
.pedigree-tree-wrapper { .pedigree-tree-wrapper {
position: relative; position: relative;
width: 100%; width: 100%;
height: calc(100vh - 200px); height: calc(100vh - 200px);
background: #f9fafb; background: radial-gradient(
border-radius: 8px; ellipse at 20% 50%,
rgba(194, 134, 42, 0.06) 0%,
var(--bg-primary) 60%
);
border-radius: var(--radius);
overflow: hidden; overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border: 1px solid var(--border);
box-shadow: var(--shadow-lg);
} }
.tree-container { .tree-container {
@@ -13,117 +19,142 @@
height: 100%; height: 100%;
} }
/* ─── SVG Link Paths ─────────────────────────────────────────────── */
.pedigree-tree-wrapper svg .rd3t-link {
stroke: var(--border-light) !important;
stroke-width: 1.5px !important;
stroke-opacity: 0.6;
}
/* ─── Controls ───────────────────────────────────────────────────── */
.pedigree-controls { .pedigree-controls {
position: absolute; position: absolute;
top: 20px; top: 16px;
right: 20px; right: 16px;
z-index: 10; z-index: 10;
display: flex; display: flex;
gap: 1rem; gap: 0.75rem;
align-items: center; align-items: center;
} }
.control-group { .control-group {
display: flex; display: flex;
gap: 0.5rem; gap: 0.25rem;
background: white; background: var(--bg-elevated);
padding: 0.5rem; padding: 0.375rem;
border-radius: 8px; border-radius: var(--radius-sm);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border: 1px solid var(--border);
box-shadow: var(--shadow);
backdrop-filter: blur(8px);
} }
.control-btn { .control-btn {
background: white; background: transparent;
border: 1px solid #e5e7eb; border: 1px solid transparent;
border-radius: 6px; border-radius: var(--radius-sm);
padding: 0.5rem; padding: 0.4rem;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: all 0.2s; color: var(--text-secondary);
transition: var(--transition);
} }
.control-btn:hover { .control-btn:hover {
background: #f3f4f6; background: var(--bg-tertiary);
border-color: #d1d5db; border-color: var(--border);
color: var(--primary-light);
} }
.control-btn:active { .control-btn:active {
transform: scale(0.95); transform: scale(0.93);
} }
/* ─── COI Display ────────────────────────────────────────────────── */
.coi-display { .coi-display {
background: white; background: var(--bg-elevated);
padding: 0.75rem 1rem; padding: 0.5rem 0.875rem;
border-radius: 8px; border-radius: var(--radius-sm);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border: 1px solid var(--border);
box-shadow: var(--shadow);
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
backdrop-filter: blur(8px);
} }
.coi-label { .coi-label {
font-weight: 600; font-weight: 600;
color: #6b7280; color: var(--text-muted);
font-size: 0.875rem; font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
} }
.coi-value { .coi-value {
font-weight: 700; font-weight: 700;
font-size: 1.25rem; font-size: 1.1rem;
letter-spacing: -0.02em;
} }
.coi-value.low { .coi-value.low { color: var(--success); }
color: #10b981; .coi-value.medium { color: var(--warning); }
} .coi-value.high { color: var(--danger); }
.coi-value.medium {
color: #f59e0b;
}
.coi-value.high {
color: #ef4444;
}
/* ─── Legend ─────────────────────────────────────────────────────── */
.pedigree-legend { .pedigree-legend {
position: absolute; position: absolute;
bottom: 20px; bottom: 16px;
left: 20px; left: 16px;
z-index: 10; z-index: 10;
background: white; background: var(--bg-elevated);
padding: 1rem; padding: 0.625rem 1rem;
border-radius: 8px; border-radius: var(--radius-sm);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border: 1px solid var(--border);
box-shadow: var(--shadow);
display: flex; display: flex;
gap: 1.5rem; gap: 1.25rem;
backdrop-filter: blur(8px);
} }
.legend-item { .legend-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.4rem;
font-size: 0.875rem; font-size: 0.8rem;
color: #6b7280; color: var(--text-secondary);
font-weight: 500;
} }
.legend-color { .legend-color {
width: 20px; width: 14px;
height: 20px; height: 14px;
border-radius: 50%; border-radius: 50%;
border: 2px solid white; border: 2px solid rgba(255,255,255,0.15);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); box-shadow: 0 0 6px rgba(0,0,0,0.4);
} }
.legend-color.male { .legend-color.male { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.4); }
background: #3b82f6; .legend-color.female { background: #ec4899; box-shadow: 0 0 8px rgba(236,72,153,0.4); }
/* ─── Zoom Indicator ─────────────────────────────────────────────── */
.zoom-indicator {
position: absolute;
bottom: 16px;
right: 16px;
z-index: 10;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 0.3rem 0.6rem;
font-size: 0.7rem;
color: var(--text-muted);
font-variant-numeric: tabular-nums;
backdrop-filter: blur(8px);
} }
.legend-color.female { /* ─── Mobile ─────────────────────────────────────────────────────── */
background: #ec4899;
}
/* Mobile responsive */
@media (max-width: 768px) { @media (max-width: 768px) {
.pedigree-tree-wrapper { .pedigree-tree-wrapper {
height: calc(100vh - 150px); height: calc(100vh - 150px);
@@ -133,52 +164,39 @@
top: 10px; top: 10px;
right: 10px; right: 10px;
flex-direction: column; flex-direction: column;
gap: 0.5rem; gap: 0.4rem;
} }
.coi-display { .coi-display {
padding: 0.5rem 0.75rem; padding: 0.375rem 0.625rem;
} }
.coi-label { .coi-label { font-size: 0.7rem; }
font-size: 0.75rem; .coi-value { font-size: 0.95rem; }
}
.coi-value {
font-size: 1rem;
}
.pedigree-legend { .pedigree-legend {
bottom: 10px; bottom: 10px;
left: 10px; left: 10px;
padding: 0.75rem; padding: 0.5rem 0.75rem;
gap: 1rem; gap: 0.875rem;
} }
.legend-item { .legend-item { font-size: 0.75rem; }
font-size: 0.75rem; .legend-color { width: 12px; height: 12px; }
}
.legend-color {
width: 16px;
height: 16px;
}
} }
/* Print styles */ /* ─── Print ──────────────────────────────────────────────────────── */
@media print { @media print {
.pedigree-controls, .pedigree-controls,
.pedigree-legend { .pedigree-legend,
display: none; .zoom-indicator { display: none; }
}
.pedigree-tree-wrapper { .pedigree-tree-wrapper {
height: 100vh; height: 100vh;
box-shadow: none; box-shadow: none;
background: white; background: white;
border: none;
} }
.tree-container { .tree-container { page-break-inside: avoid; }
page-break-inside: avoid;
}
} }