From dca3c5709b78301e0cf15f00ad1634efbe1b79a1 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 9 Mar 2026 00:42:39 -0500 Subject: [PATCH] Add PedigreeTree styling with responsive design --- client/src/components/PedigreeTree.css | 184 +++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 client/src/components/PedigreeTree.css diff --git a/client/src/components/PedigreeTree.css b/client/src/components/PedigreeTree.css new file mode 100644 index 0000000..072a51c --- /dev/null +++ b/client/src/components/PedigreeTree.css @@ -0,0 +1,184 @@ +.pedigree-tree-wrapper { + position: relative; + width: 100%; + height: calc(100vh - 200px); + background: #f9fafb; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.tree-container { + width: 100%; + height: 100%; +} + +.pedigree-controls { + position: absolute; + top: 20px; + right: 20px; + z-index: 10; + display: flex; + gap: 1rem; + align-items: center; +} + +.control-group { + display: flex; + gap: 0.5rem; + background: white; + padding: 0.5rem; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.control-btn { + background: white; + border: 1px solid #e5e7eb; + border-radius: 6px; + padding: 0.5rem; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s; +} + +.control-btn:hover { + background: #f3f4f6; + border-color: #d1d5db; +} + +.control-btn:active { + transform: scale(0.95); +} + +.coi-display { + background: white; + padding: 0.75rem 1rem; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + display: flex; + align-items: center; + gap: 0.5rem; +} + +.coi-label { + font-weight: 600; + color: #6b7280; + font-size: 0.875rem; +} + +.coi-value { + font-weight: 700; + font-size: 1.25rem; +} + +.coi-value.low { + color: #10b981; +} + +.coi-value.medium { + color: #f59e0b; +} + +.coi-value.high { + color: #ef4444; +} + +.pedigree-legend { + position: absolute; + bottom: 20px; + left: 20px; + z-index: 10; + background: white; + padding: 1rem; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + display: flex; + gap: 1.5rem; +} + +.legend-item { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.875rem; + color: #6b7280; +} + +.legend-color { + width: 20px; + height: 20px; + border-radius: 50%; + border: 2px solid white; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} + +.legend-color.male { + background: #3b82f6; +} + +.legend-color.female { + background: #ec4899; +} + +/* Mobile responsive */ +@media (max-width: 768px) { + .pedigree-tree-wrapper { + height: calc(100vh - 150px); + } + + .pedigree-controls { + top: 10px; + right: 10px; + flex-direction: column; + gap: 0.5rem; + } + + .coi-display { + padding: 0.5rem 0.75rem; + } + + .coi-label { + font-size: 0.75rem; + } + + .coi-value { + font-size: 1rem; + } + + .pedigree-legend { + bottom: 10px; + left: 10px; + padding: 0.75rem; + gap: 1rem; + } + + .legend-item { + font-size: 0.75rem; + } + + .legend-color { + width: 16px; + height: 16px; + } +} + +/* Print styles */ +@media print { + .pedigree-controls, + .pedigree-legend { + display: none; + } + + .pedigree-tree-wrapper { + height: 100vh; + box-shadow: none; + background: white; + } + + .tree-container { + page-break-inside: avoid; + } +} \ No newline at end of file