.timeline-container {
  position: relative;
  margin-bottom: 0.5rem;
}

.empty-timeline {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3rem;
  color: var(--clr-surface-tonal-a20);
  border-radius: var(--border-radius);
  border: 1px solid var(--clr-surface-tonal-a20);
}

.empty-timeline h3 {
  margin: 0;
  font-weight: normal;
}

#timeline {
  display: flex;
  height: 3rem;
}

.timeline-segment {
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  cursor: pointer;
}

.timeline-segment.current {
  animation: segment-bounce 0.5s;
  animation-direction: alternate;
  animation-timing-function: cubic-bezier(.5, 1, 0.05, .5);
  animation-iteration-count: infinite;
}

a.timeline-segment,
a.timeline-segment:hover {
  border: none;
}

@keyframes segment-throb {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.1);
  }
}

@keyframes segment-bounce {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, -10px, 0);
  }
}

.timeline-segment.highlighted {
  opacity: 1 !important;
}

.timeline:has(.timeline-segment.highlighted) .timeline-segment:not(.highlighted) {
  opacity: 0.1;
}

/* ── Tick ruler ───────────────────────────────────────────── */

.timeline-ticks {
  position: relative;
  height: 2.5rem;
  border-top: 1px solid var(--clr-surface-tonal-a30);
  margin-top: 4px;
}

.timeline-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.timeline-tick:first-of-type .timeline-tick-label {
  transform: translateX(50%);
  text-align: left;
}

.timeline-tick:last-of-type .timeline-tick-label {
  transform: translateX(-50%);
  text-align: right;
}

.timeline-tick::before {
  content: '';
  display: block;
  width: 1px;
  height: 5px;
  background: var(--clr-surface-tonal-a30);
}

.timeline-tick-label {
  font-size: 0.75rem;
  color: var(--clr-surface-tonal-a30);
  white-space: nowrap;
  line-height: 1.3;
  margin-top: 2px;
  text-align: center;
}

.timeline-tick-date {
  font-size: 0.75rem;
  color: var(--clr-surface-tonal-a30);
}

/* ▲ upward-pointing triangle that tracks current time */
.timeline-tick-marker {
  position: absolute;
  top: -1px;
  transform: translateX(-50%) translateY(-100%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid white;
  pointer-events: none;
}

.adjustment-segment {
  position: relative;
}

.adjustment-segment::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255, 255, 255, 0.20) 20px,
    rgba(255, 255, 255, 0.20) 40px
  );
  pointer-events: none;
  transition: opacity 0.2s ease;
}
