/* 
 * Growth Chart Styles - V7.0
 * 
 * Interactive bar graph showing 112% visibility increase over 6 months
 * Uses Toronto red color palette with gradient effects
 */

.growth-chart {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  max-width: 500px;
  margin: 0 auto;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f5f5f5;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.chart-result {
  font-size: 2rem;
  font-weight: 900;
  color: #DC143C;
  letter-spacing: -0.02em;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 280px;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 8px;
  position: relative;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  height: 100%;
}

.bar-item:hover {
  transform: translateY(-8px);
}

.bar {
  width: 100%;
  min-height: 20px;
  height: var(--height);
  background: linear-gradient(180deg, #FCA5A5 0%, #DC143C 100%);
  border-radius: 8px 8px 4px 4px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: growBar 1.2s ease-out forwards;
  transform-origin: bottom;
  box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2);
}

@keyframes growBar {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.bar-item:nth-child(1) .bar { animation-delay: 0s; }
.bar-item:nth-child(2) .bar { animation-delay: 0.1s; }
.bar-item:nth-child(3) .bar { animation-delay: 0.2s; }
.bar-item:nth-child(4) .bar { animation-delay: 0.3s; }
.bar-item:nth-child(5) .bar { animation-delay: 0.4s; }
.bar-item:nth-child(6) .bar { animation-delay: 0.5s; }

.bar-item:hover .bar {
  background: linear-gradient(180deg, #FEE2E2 0%, #DC143C 100%);
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(220, 20, 60, 0.4);
}

.bar-label {
  margin-top: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
}

/* Tooltip on hover */
.bar-item::before {
  content: attr(data-value) '%';
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, top 0.2s ease;
}

.bar-item::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #1a1a1a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, top 0.2s ease;
}

.bar-item:hover::before {
  opacity: 1;
  top: -40px;
}

.bar-item:hover::after {
  opacity: 1;
  top: -16px;
}

.chart-baseline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 2px solid #f5f5f5;
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
}

.chart-baseline span:last-child {
  color: #DC143C;
  font-weight: 700;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .growth-chart {
    padding: 20px 16px;
    max-width: 100%;
    margin-bottom: 0;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .chart-title {
    font-size: 1.125rem;
  }
  
  .chart-result {
    font-size: 1.75rem;
  }
  
  .chart-bars {
    height: 220px;
    gap: 8px;
    padding: 0 4px;
  }
  
  .bar {
    border-radius: 6px 6px 3px 3px;
  }
  
  .bar-label {
    font-size: 0.75rem;
    margin-top: 6px;
  }
  
  /* Simplified tooltips for mobile */
  .bar-item::before {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/* Dark mode removed - always use white background for chart */
