.TrailProgress {
  margin: 0.25rem 0 0.5rem;
}

.TrailProgress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Invisible spacer to balance layout when one button is missing */
.TrailProgress-spacer {
  visibility: hidden;
  font-size: 0.6875rem;
  line-height: 1;
  white-space: nowrap;
}

/* Mobile: center when completed (no buttons) */
@media (max-width: 768px) {
  .TrailProgress-row--completed {
    justify-content: center;
  }
}

.TrailProgress-path {
  display: flex;
  align-items: center;
  gap: 0;
}

.TrailProgress-nodeWrapper {
  display: flex;
  align-items: center;
}

.TrailProgress-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.4s ease;
}

.TrailProgress-node--clickable {
  cursor: pointer;
}

.TrailProgress-node--clickable:hover {
  transform: scale(1.2);
}

.TrailProgress-node--upcoming {
  background-color: rgba(0, 0, 0, 0.08);
  border: none;
}

@media (prefers-color-scheme: dark) {
  .TrailProgress-node--upcoming {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

.TrailProgress-node--current {
  background-color: var(--accent-color);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--accent-color-transparent);
  animation: progressPulse 3s ease-in-out infinite;
  filter: var(--user-content-filter);
}

@keyframes progressPulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--accent-color-transparent);
  }
  50% {
    box-shadow: 0 0 0 5px var(--accent-color-transparent);
  }
}

.TrailProgress-node--current.TrailProgress-node--clickable:hover {
  transform: scale(1.4);
}

.TrailProgress-node--completed {
  background-color: var(--accent-color);
  opacity: 0.6;
  filter: var(--user-content-filter);
}

.TrailProgress-node--visited {
  background-color: var(--accent-color);
  opacity: 0.4;
  filter: var(--user-content-filter);
}

.TrailProgress-node--visited.TrailProgress-node--clickable:hover {
  transform: scale(1.2);
  opacity: 0.7;
}

.TrailProgress-line {
  width: 14px;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.08);
  margin: 0 2px;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .TrailProgress-line {
    background-color: rgba(255, 255, 255, 0.15);
  }
}

.TrailProgress-statusWalking {
  color: var(--text-secondary);
  text-transform: lowercase;
  font-size: 0.6875rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition:
    color 0.2s ease,
    text-decoration 0.2s ease,
    filter 0.2s ease;
}

.TrailProgress-statusWalking:hover {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  filter: var(--user-content-filter);
}

.TrailProgress-statusLeave {
  font-family: inherit;
  font-size: 0.6875rem;
  line-height: 1;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: lowercase;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.TrailProgress-statusLeave:hover {
  color: var(--accent-color);
  text-decoration: underline;
  filter: var(--user-content-filter);
}

/* Tablet and desktop enhancements */
@media (min-width: 481px) {
  .TrailProgress-node {
    width: 10px;
    height: 10px;
  }

  .TrailProgress-line {
    width: 18px;
    margin: 0 3px;
  }
}

@media (min-width: 769px) {
  .TrailProgress-row {
    justify-content: center;
    gap: 2rem;
  }

  .TrailProgress-node {
    width: 12px;
    height: 12px;
  }

  .TrailProgress-node--current {
    transform: scale(1.3);
  }

  .TrailProgress-line {
    width: 24px;
    margin: 0 4px;
  }

  .TrailProgress-statusWalking,
  .TrailProgress-statusLeave,
  .TrailProgress-spacer {
    font-size: 0.75rem;
  }
}
