/* Family Tree View Styles */

#tree-container {
  position: relative;
  background: 
    radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 96px 0;
}

#tree-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #93c5fd #e5e7eb;
}

#tree-wrapper::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

#tree-wrapper::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 6px;
}

#tree-wrapper::-webkit-scrollbar-thumb {
  background: #93c5fd;
  border-radius: 6px;
}

#tree-wrapper::-webkit-scrollbar-thumb:hover {
  background: #60a5fa;
}

#tree-svg {
  pointer-events: none;
  overflow: visible;
}

#tree-nodes {
  position: relative;
}

/* Person Node Styles */
.person-node {
  position: absolute;
  cursor: pointer;
  transition: all 0.3s ease;
}

.person-node:hover {
  transform: scale(1.1);
  z-index: 20;
}

.person-node-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dbeafe;
  border: 2px solid #93c5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.person-node:hover .person-node-circle {
  border-color: #ae1717;
  box-shadow: 0 4px 16px rgba(174, 23, 23, 0.3);
}

/* Tree Arrow Styles */
.tree-arrow {
  stroke: #3b82f6;
  stroke-width: 2;
  fill: none;
  marker-end: url(#arrowhead);
}

/* Card View Styles */
#current-person-card {
  position: relative;
  animation: cardAppear 0.5s ease-out;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-transition {
  transition: all 0.3s ease;
}

/* Scrollable Sections */
.scrollable-section {
  scrollbar-width: thin;
  scrollbar-color: #93c5fd #e5e7eb;
}

.scrollable-section::-webkit-scrollbar {
  height: 8px;
}

.scrollable-section::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 4px;
}

.scrollable-section::-webkit-scrollbar-thumb {
  background: #93c5fd;
  border-radius: 4px;
}

.scrollable-section::-webkit-scrollbar-thumb:hover {
  background: #60a5fa;
}

/* Family Member Cards */
.family-member-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.family-member-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Year Line Styles */
.year-line {
  stroke: #e5e7eb;
  stroke-width: 2;
  stroke-dasharray: 4, 4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .person-node-circle {
    width: 48px;
    height: 48px;
    font-size: 0.75rem;
  }

  #tree-container {
    min-height: 400px;
  }

  #current-person-card {
    padding: 1.5rem;
  }
}

/* Smooth Transitions */
.view-transition {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Loading States */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Tooltip Styles */
.person-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #1f2937;
  color: white;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
  text-align: center;
  min-width: max-content;
}

.person-node:hover .person-tooltip {
  opacity: 1;
}

.person-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

