/* HTML Timeline styles */
.html-timeline {
  width: 100%;
  margin: 2rem 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.timeline-header {
  display: flex;
  border-bottom: 2px solid #ddd;
  font-weight: bold;
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px 8px 0 0;
}

.timeline-month-header {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.timeline-month-header:last-child {
  border-right: none;
}

.timeline-row {
  display: flex;
  border-bottom: 1px solid #eee;
}

.timeline-row:last-child {
  border-bottom: none;
}

.timeline-initiative {
  width: 200px;
  padding: 10px;
  font-weight: bold;
  background-color: #f5f5f5;
  border-right: 1px solid #ddd;
  display: flex;
  align-items: center;
}

.timeline-months {
  display: flex;
  flex: 1;
}

.timeline-cell {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-right: 1px solid #eee;
  position: relative;
}

.timeline-cell:last-child {
  border-right: none;
}

.timeline-active {
  background-color: var(--accent-color);
  color: white;
}

.timeline-planning {
  background-color: var(--light-color);
}

.timeline-implementation {
  background-color: var(--primary-color);
  color: white;
}

.timeline-evaluation {
  background-color: var(--secondary-color);
  color: white;
}

.timeline-legend {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 0 1rem 0.5rem 0;
}

.legend-color {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 4px;
}

.legend-planning {
  background-color: var(--light-color);
}

.legend-implementation {
  background-color: var(--primary-color);
}

.legend-evaluation {
  background-color: var(--secondary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-container {
    overflow-x: auto;
  }
  
  .html-timeline {
    min-width: 800px;
  }
}

/* Additional CSS for timeline tooltip */
.timeline-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  max-width: 200px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Ensure the timeline container is responsive */
@media (max-width: 992px) {
  .timeline-container {
    min-width: 800px;
    overflow-x: auto;
  }
  
  .timeline-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Improve visibility on smaller screens */
@media (max-width: 768px) {
  .timeline-initiative {
    width: 150px;
    font-size: 0.9rem;
  }
  
  .timeline-cell, .timeline-month-header {
    font-size: 0.8rem;
    padding: 8px 5px;
  }
  
  .legend-item {
    font-size: 0.8rem;
  }
}
