/* animation-sizing-fixes.css */
/* Adjustments for animation panel sizing to ensure all elements are visible */

/* Adjust the SVG container to maintain proper proportions */
.svg-container {
  min-height: 450px !important; /* Increased now that controls are moved */
  padding-bottom: 15px !important; /* Add space at bottom */
  margin-bottom: 15px !important;
  position: relative !important;
  /* Use a consistent height that will be adjusted by JavaScript */
  height: 450px !important; 
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  background-color: white !important;
}

/* Ensure the SVG itself doesn't overflow */
.svg-container svg {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

/* Fix for the animation column to ensure proper spacing */
.animation-column {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
  padding-bottom: 20px !important; /* Extra padding to avoid cutting off */
  overflow: visible !important;
}

/* Make legend more visible */
.legend {
  padding: 12px 16px !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  position: relative !important;
  z-index: 5 !important; /* Ensure it's above other elements */
  background-color: #f8f9fa !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  /* Force specific height to avoid resizing */
  min-height: 50px !important;
}

/* Ensure legend items wrap nicely */
.legend-item {
  margin-right: 12px !important;
  margin-bottom: 6px !important;
  white-space: nowrap !important;
}

/* Improvement for timeline container */
.timeline-container {
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  padding: 10px !important;
  background-color: #f8f9fa !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
  /* Force specific height to avoid resizing */
  min-height: 60px !important;
  position: relative !important;
  z-index: 5 !important;
}

/* Improvement for timeline scrubber */
.timeline-scrubber {
  width: 100% !important;
  margin: 5px 0 !important;
}

/* Timeline labels spacing */
.timeline-labels {
  display: flex !important;
  justify-content: space-between !important;
  margin-top: 5px !important;
  font-size: 12px !important;
  font-weight: bold !important;
}

/* Adjust overall layout for better use of vertical space */
.four-column-layout {
  height: auto !important;
  min-height: 600px !important; /* Increased to accommodate all elements */
  overflow: visible !important;
}

/* Ensure main container doesn't get cut off */
main {
  padding-bottom: 30px !important; /* Extra padding at bottom */
  overflow: visible !important;
}

/* Ensure the visualization container has enough space */
.visualization-container {
  min-height: 600px !important; /* Ensure enough height for all elements */
  padding-bottom: 40px !important; /* Extra padding at bottom */
  margin-bottom: 20px !important;
  background-color: white !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Match panel heights for consistency */
.side-panel {
  min-height: 600px !important;
  display: flex !important;
  flex-direction: column !important;
}

.panel-content {
  flex: 1 !important;
  overflow-y: auto !important;
}

/* Adjustments for smaller screens */
@media (max-width: 1200px) {
  .svg-container {
    height: 400px !important; /* Smaller fixed height on medium screens */
    min-height: 400px !important;
  }
  
  .four-column-layout {
    min-height: 550px !important;
  }
  
  .visualization-container {
    min-height: 550px !important;
  }
  
  .side-panel {
    min-height: 550px !important;
  }
}

@media (max-width: 767px) {
  .svg-container {
    height: 300px !important; /* Even smaller on mobile */
    min-height: 300px !important;
  }
  
  .visualization-container {
    min-height: 500px !important;
  }
  
  .legend {
    padding: 8px !important;
    font-size: 12px !important;
    min-height: 40px !important;
  }
  
  .legend-item {
    margin-right: 8px !important;
    margin-bottom: 4px !important;
  }
  
  .four-column-layout {
    min-height: 500px !important;
  }
  
  .side-panel {
    min-height: 500px !important;
  }
}

/* Fix for the debug info positioning */
#debug-info {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  max-width: 500px !important;
  max-height: 300px !important;
  z-index: 9999 !important;
}

/* Ensure app container can scroll if needed */
.app-container {
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

/* Add space at the bottom of the page for scrolling */
body::after {
  content: '';
  display: block;
  height: 50px;
  width: 100%;
}


