/*
 * Timeline Component Styles
 * Proportional visual timeline for ADHD-friendly time perception
 */

/* NOW Indicator with Pulse Animation */
.timeline-now-pulse {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background-color: #3B82F6;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
}

/* Timeline Track Styling */
.timeline-track {
  position: relative;
  min-height: 200px;
}

/* Timeline Flow Line (SVG connector) */
.timeline-flow-line {
  z-index: 0;
}

/* Day Divider Styling */
.timeline-day-divider {
  position: relative;
  z-index: 10;
}

/* Time Gap Label */
.timeline-gap-label {
  position: relative;
  z-index: 5;
}

/* Event Card Base Styling */
.timeline-event {
  position: relative;
  z-index: 20;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.timeline-event-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-card {
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-card:hover {
  transform: translateY(-2px);
}

/* Urgency-based shadows (subtle depth cues) */
.shadow-red-100 {
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.15),
              0 2px 4px -1px rgba(239, 68, 68, 0.1);
}

.shadow-orange-100 {
  box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.15),
              0 2px 4px -1px rgba(249, 115, 22, 0.1);
}

.shadow-yellow-100 {
  box-shadow: 0 4px 6px -1px rgba(234, 179, 8, 0.15),
              0 2px 4px -1px rgba(234, 179, 8, 0.1);
}

.shadow-blue-100 {
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.15),
              0 2px 4px -1px rgba(59, 130, 246, 0.1);
}

.shadow-green-100 {
  box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.15),
              0 2px 4px -1px rgba(34, 197, 94, 0.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .timeline-track {
    padding-left: 2rem;
  }

  .timeline-card {
    font-size: 0.9rem;
  }

  .timeline-event {
    margin-bottom: 0.75rem;
  }
}

/* Print styles (clean timeline for printing) */
@media print {
  .timeline-now-pulse {
    animation: none;
    background: #333;
  }

  .timeline-event {
    opacity: 1;
    transform: none;
    page-break-inside: avoid;
  }

  .timeline-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .timeline-now-pulse,
  .timeline-event,
  .timeline-card {
    animation: none;
    transition: none;
  }

  .timeline-event:hover {
    transform: none;
  }
}

/* Focus states for keyboard navigation */
.timeline-card:focus-within {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .timeline-flow-line line {
    stroke: #000;
    stroke-width: 3;
  }

  .timeline-card {
    border-width: 2px;
  }
}
