Add styling for pedigree tree visualization

This commit is contained in:
2026-03-09 00:09:03 -05:00
parent 7a16918d66
commit dd26fa00bf

View File

@@ -0,0 +1,137 @@
.pedigree-modal {
position: relative;
width: 95vw;
height: 90vh;
background: white;
border-radius: 12px;
display: flex;
flex-direction: column;
overflow: hidden;
}
.pedigree-container {
flex: 1;
background: linear-gradient(to bottom, #f8fafc 0%, #e2e8f0 100%);
position: relative;
overflow: hidden;
}
.pedigree-controls {
display: flex;
gap: 0.5rem;
align-items: center;
}
.pedigree-legend {
display: flex;
gap: 2rem;
padding: 0.75rem 1.5rem;
background: #f1f5f9;
border-bottom: 1px solid #e2e8f0;
justify-content: center;
}
.legend-item {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
color: #475569;
}
.legend-color {
width: 20px;
height: 20px;
border-radius: 50%;
border: 2px solid #fff;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.legend-color.male {
background: #3b82f6;
}
.legend-color.female {
background: #ec4899;
}
.pedigree-info {
padding: 0.75rem 1.5rem;
background: #f8fafc;
border-top: 1px solid #e2e8f0;
font-size: 0.875rem;
color: #64748b;
text-align: center;
}
.pedigree-info p {
margin: 0;
}
.pedigree-info strong {
color: #334155;
}
/* Override react-d3-tree styles */
.rd3t-tree-container {
width: 100%;
height: 100%;
}
.rd3t-link {
stroke: #94a3b8;
stroke-width: 2;
fill: none;
}
.rd3t-node {
cursor: pointer;
}
.rd3t-node:hover circle {
filter: brightness(1.1);
}
.rd3t-label__title {
font-weight: 600;
fill: #1e293b;
}
.rd3t-label__attributes {
font-size: 0.875rem;
fill: #64748b;
}
/* Loading state */
.pedigree-modal .loading {
display: flex;
align-items: center;
justify-content: center;
height: 400px;
font-size: 1.125rem;
color: #64748b;
}
/* Error state */
.pedigree-modal .error {
margin: 2rem;
padding: 1rem;
background: #fee;
border: 1px solid #fcc;
border-radius: 8px;
color: #c00;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.pedigree-modal {
width: 100vw;
height: 100vh;
border-radius: 0;
}
.pedigree-legend {
flex-wrap: wrap;
gap: 1rem;
}
}