/* Timeline Component Styles */

.timeline-container {
  width: 100vw; /* Full viewport width */
  position: relative;
  padding: 1rem 0;
  margin: 0;
  /* Ensure it's at the very top */
}

.timeline-track {
  position: relative;
  width: 100%;
  height: 60px;
  overflow: visible;
  cursor: grab;
  touch-action: none;
}

.timeline-track:active,
.timeline-track.dragging {
  cursor: grabbing;
}

/* Center indicator triangle - perfectly centered */
.timeline-center-indicator {
  position: absolute;
  top: 10px;
  left: 50vw; /* Use viewport width for perfect centering */
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--ground-primary);
  z-index: 20;
  pointer-events: none;
}

/* Timeline hours container */
.timeline-hours {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  transform: translateX(0px);
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Hour marker */
.hour-marker {
  position: relative;
  width: 80px; /* Each hour takes 80px */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

/* Hour line */
.hour-line {
  width: 1px;
  height: 30px;
  background: var(--ground-accent);
  opacity: 0.4;
  margin-bottom: 8px;
}

/* Current time line - special styling */
.hour-marker.current-time .hour-line {
  background: var(--ground-primary);
  opacity: 1;
  width: 2px;
  height: 40px;
  box-shadow: 0 0 4px rgba(212, 163, 115, 0.5);
}

/* Hour label */
.hour-label {
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ground-accent);
  opacity: 0.7;
  text-align: center;
  line-height: 1;
  pointer-events: none;
}

/* Current time label */
.hour-marker.current-time .hour-label {
  color: var(--ground-primary);
  opacity: 1;
  font-weight: 400;
}

/* Center time display */
.timeline-current-time {
  position: absolute;
  bottom: -1.5rem;
  left: 50vw; /* Use viewport width for perfect centering */
  transform: translateX(-50%);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ground-primary);
  text-align: center;
  pointer-events: none;
  white-space: nowrap; /* Prevent text wrapping */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline-container {
    padding: 1.5rem 0 1rem 0;
  }
  
  .hour-marker {
    width: 60px; /* Smaller spacing on mobile */
  }
  
  .hour-label {
    font-size: 0.7rem;
  }
  
  .timeline-current-time {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hour-marker {
    width: 50px; /* Even smaller on very small screens */
  }
  
  .hour-label {
    font-size: 0.65rem;
  }
}

/* Animation for smooth timeline movement */
.timeline-hours.animating {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.timeline-track:focus {
  outline: 2px solid rgba(212, 163, 115, 0.6);
  outline-offset: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .timeline-hours {
    transition: none;
  }
  
  .timeline-hours.animating {
    transition: none;
  }
}
